views:

3738

answers:

6

I have an Excel file that I need to import into a (new) Oracle table. What is the best way to do this?

+3  A: 

The simplest (technically) way is to export the contents as a CSV and use SQL*Loader to import it into the table. This link goes to the documentation for SQL*Loader, which will explain how to write a SQL*Loader control file.

If you need to automate the export to CSV this can be done through OLE automation or VBA code within the spreadsheet. You could also use VBA (shell) to execute the SQL*Loader command if you want to provide a facility for the end-user to initiate the load.

ConcernedOfTunbridgeWells
+1  A: 

I'm pretty sure it's possible to set up an Excel file as an ODBC source, but don't ask me how to do that.

I generally just save the spreadsheet as CSV and import it using Oracle APEX's CSV import wizard.

Jeffrey Kemp
+1  A: 

If you need to perform any validation or cross-referencing on the data, I suggest using an entity relationship manager like Talend, etc. You can write scripts to do things like this, but a tool can make this a bit less painful.

Dana the Sane
A: 

Try Excel-to-Oracle, easy-to-use conversion tool with wizard-style interface and command line support:

http://www.convert-in.com/xls2ora.htm

Oleg Fedorov