• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Excel worksheet name

 
Stelian Iancu
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all !
I am accessing an Excel file from a java application (through the jdbc dbc
bridge). Now I have to fing out the names of the worksheets inside that
file. I know about the getTables() method of the DatabaseMetaData interface.
But what are the parameters of the method in this case? (catalog,
schemaPattern, etc).
Also, what exactly is a catalog? What is the difference between a catalog
and a schema?
I am using JDBC 1.0 (don't want to, but I can't do anything about that).
Any help is appreciated!
 
hob hartman
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me suggest a book- The Complete Guide to Java Database Programming by Matthew Siple. ISBN 0-07-913286-3. In particular , Chapter 10 addresses Database Meta Data via the DatabaseMetaData Interface. I think this is what you need to solve your difficulty. One example "demonstrates how to combine the getCatalogs(),getSchemas(), getTablesTypes(), and getTables() methods to dynamically discover all of table objects available in a database".
Check it out, and I hope it helps.
hob
 
Stelian Iancu
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, but it seems that what I want is impossible with sun's jdbcdbc bridge. I am now considering Jakarta's POI project for direct access to the Excel file.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic