The Microsoft Jet database engine could not find the object 'S
Actually, I understand now. The problem doesn't occur if the spreadsheet is
open in Excel. However, the spreadsheet won't be open in production.
At the moment I am using a work around, which is to filter out any table
names ending in $_ and to request column info for each of the remaining
tables individulally, using the "restrictions" overload, e.g.
DataTable tempTable = excelCtn.GetSchema("Columns", new string[] { null,
null, row["TABLE_NAME"].ToString(), null });
This works fine. But I still think it is a bug that the call to
GetSchema("Columns") fails if you've used filtering in the spreadsheet (even
if you've subsequently turned filtering off).
|