11-17-2006, 08:09 AM
How can I get the headers and sheet name of a Excel file using Database Class?
Excel database (enumerating database tables, fields, etc)
|
11-17-2006, 08:09 AM
How can I get the headers and sheet name of a Excel file using Database Class?
11-17-2006, 10:21 PM
An Excel sheet is the same as a table in a database. I don't know what is the SQL for enumerating tables. With Excel sheets can be used the same SQL as with Access, so I would try to find this information in MS Access Help.
11-17-2006, 11:28 PM
Didn't find how to get that info using MS Jet SQL. But can get using ADO.
Get only table names (or sheet names) out Get table names and column names out ADO reference is available in MSDN Library (search for OpenSchema). The same information also is available in MS Access Help.
11-20-2006, 06:22 AM
Thanks.
11-20-2006, 09:16 AM
and for CSV files?
11-20-2006, 09:30 AM
When using text/csv files:
database = folder, table = file, header = first line. out
11-20-2006, 09:37 AM
Thanks again.
11-20-2006, 10:03 AM
This code shows me the first row but NOT header.
11-20-2006, 10:17 AM
I confused it with something. Use the same code as with Excel database. Only change d.Open line (see updated example).
11-20-2006, 10:19 AM
Ok.
Thanks for all. |
« Next Oldest | Next Newest »
|