I am able to read data from an Excel sheet using JDBC in a windows environment. But I have no idea how to create an ODBC data source in linux and use it for reading from an Excel sheet. Can someone help me on this please.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35257
7
posted
0
I'm not sure that ODBC exists for Linux. have you looked at libraries like POI and jExcelApi which let you XLS files directly?
The are ODBC drivers for Linux; however, I don't happen to know of any free ones (there might be some).
ODBC is not built into the operating system in Linux, the way it is in Windows. If you insist on using the JDBC-ODBC bridge, you will need to find a Linux ODBC driver that can read an Excel file.
There's probably a good chance that someone has either written a JDBC type 4 driver for excel, or that there's a good non-JDBC Java way to read Excel files.
stu derby
Ranch Hand
Joined: Dec 15, 2005
Posts: 333
posted
0
Originally posted by stu derby: The are ODBC drivers for Linux; however, I don't happen to know of any free ones (there might be some).
ODBC is not built into the operating system in Linux, the way it is in Windows. If you insist on using the JDBC-ODBC bridge, you will need to find a Linux ODBC driver that can read an Excel file.
The non-JDBC packages mentioned in the other response are probably a better choice though; Excel really isn't a database and accessing it through JDBC is a semi-crufty hack, IMHO.
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
vishwanath nadimpally
Ranch Hand
Joined: Jan 25, 2005
Posts: 116
posted
0
Originally posted by stu derby:
The non-JDBC packages mentioned in the other response are probably a better choice though; Excel really isn't a database and accessing it through JDBC is a semi-crufty hack, IMHO.
I took your advice and wrote a control file and put it in oracle using sqlldr.