I am unable to read excel sheet to data table which has change in orientation for reference of excel sheet i am trying to upload in asp.net
For more help i am even uploading the generated DATA TABLE IMAGE of above excel sheet
OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", oledbConn);
OleDbDataAdapter oleda = new OleDbDataAdapter();
oleda.SelectCommand = cmd;
DataSet ds = new DataSet();
oleda.Fill(ds, "XLData");
ExcelSheetData = ds.Tables[0];
Try this, because you need to give Name of the source table to use for table mapping.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.