I have an issue getting worksheet names from an Excel spreadsheet using OLEDB. The problem is that when I use GetOleDbSchemaTable, the resulting DataTable has more than jus
The question is old, but for those who found it now, the skipping can be done as Jim found...
// skip those that do not end correctly
foreach (DataRow row in schemTable.Rows)
{
string sheetName = row["TABLE_NAME"].ToString();
if (!sheetName.EndsWith("$") && !sheetName.EndsWith("$'"))
continue;
Console.WriteLine(sheetName);
}
That is the wanted are or those that end with $ or those that end with $'.