Click here to Skip to main content
15,902,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to check the column header in Excel is equat to the list item in C#
Posted
Comments
[no name] 5-Nov-12 4:03am    
Just use oledb. jet/ace

OleDbConn = new OleDbConnection(sExcelConnectionString);
logInfo.Info(OleDbConn);
OleDbConn.Open();
schemaTable = OleDbConn.GetSchema("Columns");

the schemaTable is a datatable where u can find all the columns of ur excel sheet. and u can easily make a comparison using linq or something ...

1 solution

First get the list of column names from the excel sheet:
How to get Excel column Header names[^]
Then compare the values present in your list box. I think you should be there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900