Read from an Excel file [message #7088] |
Tue, 20 May 2003 12:35 |
Nathan Darby
Messages: 1 Registered: May 2003
|
Junior Member |
|
|
Hi All,
I need some help here. I know SQL pretty good, but I have never tried reading from Excel using SQL.
Here's my situation:
I have an Excel file with 2000+ Phone Numbers.
I need to write a script that will iterate through these Phone Numbers and update my DataBase accordingly. I simply don't know how to access the excel cells using SQL. Anyone have a clue? Because I don't know how to do this.
Thanks in advance for any help.
Nathan
|
|
|
Re: Read from an Excel file [message #7090 is a reply to message #7088] |
Tue, 20 May 2003 12:50 |
Mike T
Messages: 32 Registered: August 2002
|
Member |
|
|
Nor do I, but I'm sure it's possible (VBA maybe?). What I do is add and extra step to the process and Import the Excel file into Access. From there you can update your Database using SQL.
|
|
|
|
Re: Read from an Excel file [message #7099 is a reply to message #7090] |
Wed, 21 May 2003 01:59 |
Martin Chadderton
Messages: 35 Registered: May 2003
|
Member |
|
|
There's no direct mechanism for accessing an excel spreadsheet (unless somebody can come up with a Java stored procedure for it? ;-)), but there are quite a few indirect mechanisms....
Probably the easiest way is (as mentioned earlier) load the data into access and use the append queries (or whatever they're called nowadays).
But, you could also
1. Export the file as a delimited text file and either use sqlldr or external tables (at 9i, very cool), or even UTL_FILE (as a last resort ;-)) to get the data in.
2. Export the excel file in SYLK format and use OWA_SYLK built-in to get the data
There are loads of options, but none (unless some java expert can come up with a way of accessing excel from a jsp) which are DIRECT access, every mechanism involves some intermediate step.
Regards
|
|
|
|