This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Need help Connecting to Excel  (driver problem) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Need help Connecting to Excel  (driver problem)" Watch "Need help Connecting to Excel  (driver problem)" New topic
Author

Need help Connecting to Excel (driver problem)

Farooq Ali
Ranch Hand

Joined: Sep 30, 2000
Posts: 43
Hi all
I am having problems connecting to Excel files through ODBC
my code compiles perfectly but when I run it gives me the following error:
java.sql.SQLException: [Microsoft][ODBC Excel Driver] Could not find installable ISAM.
please helpme out.
It happened to me once when I was using VB to connect to an excel file
I re-installed visual studio in which I check the ISAM tabs in the DATA access dir
if any body can help me out on this
Thanks
Farooq
Lee Wallen
Greenhorn

Joined: Jul 14, 2001
Posts: 10
Try something like:
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection( "jdbcdbc:excel_dsn", "", "" );
stmnt = c.createStatement();
String query = "select * from [main$] where [Field1]='Test';";
ResultSet rs = stmnt.executeQuery( query );
With a DSN of "excel_dsn" pointing to your Excel workbook file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help Connecting to Excel (driver problem)
 
Similar Threads
Can't connect to remote sql server
Establishing Connections to a Data base on a different machine
Unable to access data from MS-Ecel sheet
problems with microsoft excel driver
Topspeed INSERT statement issue