• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"[Microsoft][ODBC Excel Driver] 'Sheet1$' is not a valid name. "

 
Samrudhi Sha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my code:




I'm getting the error as : [Microsoft][ODBC Excel Driver] 'Sheet1$' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
I have saved the file as Sheet1.xls . "mede" is my data source name which links to this workbook : C:\ETL\Sheet1.xls

Can someone please help me out and tell me what changes i should make to the query !
 
Paul Clapham
Sheriff
Posts: 21586
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Samrudhi, welcome to the Ranch!

It's pretty clear to me that the error message is referring to these lines of code:



So whatever [Sheet1$] is supposed to mean, that isn't right.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pardon me for the extremely late reply, nonetheless, I suggest using java.sql.DatabaseMetaData to interrogate the data source you are connecting to in order to find the table names.
I leave you to peruse the javadoc for DatabaseMetaData.

Good Luck,
Avi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic