DataTable xls = new DataTable(); OleDbConnection SQLConn = new OleDbConnection(strConnectionString); SQLConn.Open(); OleDbDataAdapter SQLAdapter = new OleDbDataAdapter(); string sql = "SELECT * FROM [" + sheetName + "]"; OleDbCommand selectCMD = new OleDbCommand(sql, SQLConn); SQLAdapter.SelectCommand = selectCMD; SQLAdapter.Fill(xls); SQLConn.Close();
sheetName
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)