Home » SQL & PL/SQL » SQL & PL/SQL » How to load data from an excel file to a table
How to load data from an excel file to a table [message #434778] Thu, 10 December 2009 12:07 Go to next message
astik.mondal
Messages: 14
Registered: March 2008
Location: Kolkata
Junior Member
Hi All,

We have a requirement. We need to read an excel file from a server directory and load data into a table using PL/SQL program.
Here we shouldn't convert the excel file to csv/txt file and shouldn't use sql loader.

Is there any way to acheive this requirement?
Any input on this would be appreciated.


Thanks,
Astik
Re: How to load data from an excel file to a table [message #434779 is a reply to message #434778] Thu, 10 December 2009 12:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use hsodbc.

Regards
Michel
Re: How to load data from an excel file to a table [message #434781 is a reply to message #434778] Thu, 10 December 2009 12:14 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Is there any way to acheive this requirement?
NO & if you would have followed Posting Guidelines you would have already answered this FAQ!

Excel can connect to Oracle via ODBC & directly do SQL against DB.
Exactly how this is done is purely an Excel issue & should be post in MS Excel forum; not here.
Re: How to load data from an excel file to a table [message #434787 is a reply to message #434781] Thu, 10 December 2009 12:37 Go to previous messageGo to next message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Another option that I have used (when line feeds in he Excel cells made CSV files problematic) was to export the data to XML from Excel, load that XML into an XMLTYPE variable/table cell and then run a query on that to load the data.

As a rule you should second-guess any "don't use X" requirement, unless it is also stated why X it shouldn't be used.

If you try to find a new solution without knowing why, you don't know if your new solution doesn't have the same problem that motivated someone to put in the "don't use X" requirement in the first place.
Re: How to load data from an excel file to a table [message #434816 is a reply to message #434778] Thu, 10 December 2009 23:27 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Quote:
Is there any way to acheive this requirement?


Oracle ApEx!!! /forum/fa/449/0/

regards,
Delna
Re: How to load data from an excel file to a table [message #434833 is a reply to message #434816] Fri, 11 December 2009 02:59 Go to previous message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Quote:
Here we shouldn't convert the excel file to csv/txt file and shouldn't use sql loader


As an option, you could have a look at Excel-DB.I have never used it thou.
Previous Topic: PL/SQL sometimes performs faster than a single SQL
Next Topic: Writable materialized view with a custom column (merged)
Goto Forum:
  


Current Time: Thu Nov 14 06:09:40 CST 2024