Question Locked

Need Help in Acting Excel files As DataBase

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi All,

We wrote a logic which uses a Excel file as a database and reads data from it. We executed the logic successfully in my local system which is using windows xp as an operating system.but when i uploaded the code in the client's server which is running on the unix platform.We got "Null Pointer Exception".
Here is our code snippet:
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" + "Name of the file");

Actually the problem is the ODBC-JDBC driver which we are using will support only for Windows Platform.In server it is in UNIX platform.JDBC-odbc bridge driver can't support MS Excel on Unix.We need to run sql queries on Excel files in unix platform.

is there any way to solve this problem.please guide us to solve this problem.

Please give your valuable suggestions.

Thanking You,

Regards,
Java Team.

4 replies

by maqsud_27

Hi pavani, is ur problem resolved in reading data from excel file from unix server?? iam struck in a similar situation where im unable to read data from UNix server but could read from local machine.

any help is greatly appreciated
thanks,
maq

by dawgit

Ok, first there are a whole lot of folks here with a far more expirence than me, but I'll start. "Excel" is not a data base. It can be a good place (one such) to collect and set-up data to be pluged into a SQL data base. Naturally since "Excel" is a MS product, it will work seemlessly (supposed to anyway) with the MS-SQL program. (It will work well with My-SQL also) Then, and only then, when your (SQL) data base is up and running can you refer to it from another system. Or get it loaded or your server. (since it is "Unix I would sugest My-SQL, or one of the others made to work on both OSs). You'll need to have one (a SQL server already loaded on the gaining sys. your Unix sys.) you should than have a seemless transfer. (the SQL data from one computer to another, both with the same SQL data base installed) That IMO would be the quickest, easiest way for you. You'll also be able to run your queries with-out a problem, since the actual data will no longer be in an "Excel File", but will be real (SQL) data. (you're correct in the "...can't support MS Excel on Unix." statement. Apples and Oranges.)
I hope that helps you a little. -d

by tvl_sudhakar

Iam facing same problem u got solution for it.If you have XL drivers which works on unix environment can u send me.I want to run it in my own pc for testing ...Plz respond to my mail ASAP.

This discussion is closed to new replies.