File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Excel worksheet name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Excel worksheet name" Watch "Excel worksheet name" New topic

Excel worksheet name

Stelian Iancu

Joined: Feb 20, 2002
Posts: 21
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!

--<br />Linux registered user 287835<br /> <br />Be different. Think.
hob hartman

Joined: Mar 04, 2002
Posts: 11
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.
Stelian Iancu

Joined: Feb 20, 2002
Posts: 21
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.
I agree. Here's the link:
subject: Excel worksheet name
jQuery in Action, 3rd edition