Thread: jdbc with excel
View Single Post
  #22 (permalink)  
Old 09-06-2007, 07:35 AM
amansundar amansundar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 325
amansundar is on a distinguished road
Red face Re: jdbc with excel

It's not quite clear what you want to do.

1) Do you want to connect to an Excel file over JDBC? This would be quite similiar like to any other data source / DBMS.

But I know this approach only with JDBC-ODBC. Since Excel can't run on LINUX, you would have to do a remote connection. There seems to be an ODBC for LINUX, but I don't know much about it. (It was mentioned in this forum sometimes - search, if you want.) But I think you would need a Win machine as "server" then which runs your Excel.

or

2) Does your Java Bean (planned or existing?) read the Excel file format directly, as File I/O, without calling the Excel app? Then you would need no JDBC, no Excel, only the Excel file and the logic how to interpret it.

If this is available, then this JavaBean will run on LINUX of course and can be simply used by your server app.

If you want to program this Bean yourself, I would not do the hard work of understanding the Excel file format, but rather cause the "creator" of the Excel file (a user on a Win machine using Excel app) to export the data as a csv file. This can be read much easier. Since it has internally the same logical structure like a RDBMS table, you maybe can connect to this flat file over JDBC.

Probably you can find a lot of help for both ways, in this forum and elsewhere.
__________________
cheers
Aman
Reply With Quote