ADOX: how to get true ordinal of Excel Table
- From: mackey.tim@xxxxxxxxx
- Date: 19 May 2006 05:49:30 -0700
hi,
i am importing excel data through a web form, using ADOX with C#.
i only want to grab the first work***, but unfortunately if the user
re-arranges the worksheets in the excel file, the ADOX Catalog.Tables
collection still presents the tables in the original order of the
worksheets.
does anyone know how to identify the actual ordinal of an excel
work***, using ADOX?
thanks
tim.
if it is of relevance, the code i'm using is below:
ADOX.CatalogClass cat = new ADOX.CatalogClass();
ADODB.ConnectionClass connAdox = new ADODB.ConnectionClass();
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\"" + path + "\";Extended Properties=Excel 8.0;";
connAdox.Open(connectionString, "admin","",0);
cat.ActiveConnection = connAdox;
DataSet ds = new DataSet();
OleDbConnection connOleDb = new OleDbConnection (connectionString);
connOleDb.Open();
cat.Tables[0]... etc. etc. // isn't the first work*** in the file.
.
- Prev by Date: Re: what's wrong with this?
- Next by Date: Insufficient base table information for updating or refreshing.
- Previous by thread: RE: Reminder
- Next by thread: Insufficient base table information for updating or refreshing.
- Index(es):