Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法将 excel 表读取到数据表中,该表的方向发生了变化,以供参考我试图在 asp.net 中上传的 excel 表
为了获得更多帮助,我什至上传了上面 excel 表的生成数据表图像
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];
试试这个,因为您需要提供源表的名称以用于表映射。