I am trying to read an xls file in the column format:
File Name File Size
Hello 45
World 11
I want to read all the first name column entries as a list of strings and all the file size column entries as a list of ints. How can i do this? I have the following code:
OleDbDataReader reader;
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + xlsFilePath + ";Extended Properties=Excel 8.0");
OleDbCommand command = new OleDbCommand("select * from [sheet1$]", con);
con.Open();
use this query: