• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in connecting Excel to Java

 
Rakesh Keerthi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i'm trying to read the contents of my Excel through Java and i'm getting an Exception.

The code is as below.



the exception is as below.


I'm using Java 32 bit, Eclipse 32 bit, Excel 32 bit and odbc5.jar. please let me know where am i going wrong.

Thanks
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error is pretty self-explanatory. " Data source name not found and no default driver specified".

When you call DriverManager.getDrivers() , what is returned in your list ?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message seems to be -at least partially- off-topic: no data source name is needed, as this is the DSN-less form of ODBC connection.

Apparently "{Microsoft Excel Driver (*xl, *.xls)}" is not recognized. Try "{Microsoft Excel Driver (*.xls)}" instead.
 
Rakesh Keerthi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Dittmer this worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic