matt23lucier
MIS
I have a program that opens an excel sheet and selects all the data from the sheet and then loads it into a DataTable.
The problem is that it skips the first row an loads the rest of data. Here is my code.
conn = new OleDbConnection(sConnectionString);
conn.Open();
OleDbCommand cmd =new OleDbCommand(statement, conn);
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = cmd;
dt = new DataTable();
conn.Close();
da.Fill(dt);
Thanks
Matt
The problem is that it skips the first row an loads the rest of data. Here is my code.
conn = new OleDbConnection(sConnectionString);
conn.Open();
OleDbCommand cmd =new OleDbCommand(statement, conn);
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = cmd;
dt = new DataTable();
conn.Close();
da.Fill(dt);
Thanks
Matt