dotnet0824
asked on
c# Reading WorkSheets from Excel File
Hi,
I have an Excel file with 3 work sheets namely (Order of Tabs is) 1)ZR 2)JIMP 3) STON
When I read them the Order is not accordingly .. The array is populated like list(0) = STON
list(1) = JIMP
list(2) = ZR
I dont want it like this.. It should be in the order of the Tabs in the Exel Sheet.
Here is the code
dataTable tables = connection.GetSchema("Tabl es");
List<string> list = new List<string>();
foreach (DataRow row in tables.Rows)
list.Add(row["TABLE_NAME"] .ToString( ));
return list;
I have an Excel file with 3 work sheets namely (Order of Tabs is) 1)ZR 2)JIMP 3) STON
When I read them the Order is not accordingly .. The array is populated like list(0) = STON
list(1) = JIMP
list(2) = ZR
I dont want it like this.. It should be in the order of the Tabs in the Exel Sheet.
Here is the code
dataTable tables = connection.GetSchema("Tabl
List<string> list = new List<string>();
foreach (DataRow row in tables.Rows)
list.Add(row["TABLE_NAME"]
return list;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
vbturbo