ASP.NET - How to avoid alphabetical sorting of Excel sheet names when using GetOleDbSchemaTable?

Asked By Priya on 02-Apr-13 06:46 AM
Hello Everyone,
I need to get the excel sheet names in the order in which they are placed in the excel file.
When using GetOleDbSchemaTable, it automatically sorts the table names alphabetically.
How i can i avoid this?
(I need to use OleDB. Can i achieve this without using Interop services or any third party tool?)
Kindly reply.
Robbe Morris replied to Priya on 02-Apr-13 08:03 AM
If you must use GetOleDbSchemaTable, I'm not aware of any other alternative or workaround.
Priya replied to Robbe Morris on 03-Apr-13 07:16 AM
Ok. Thanks for the reply.
So is there any other way to do it apart from GetOleDbschemaTable?
Robbe Morris replied to Priya on 03-Apr-13 07:33 AM
There are a few products out there that are safe for ASP.NET development.  One is spreadsheetgear.com.  It is essentially the Excel object model with a few tweaks.  Makes working with Excel via .NET much, much easier.  I know you could accomplish this specific task with it.