string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+ Path +";"+"Extended Properties=Excel 12.0;";OleDbConnection conn = new OleDbConnection(strConn);conn.Open(); string strExcel = ""; OleDbDataAdapter myCommand = null;DataSet ds = null;strExcel="select * from [sheet1$]";myCommand = new OleDbDataAdapter(strExcel, strConn);ds = new DataSet();myCommand.Fill(ds,"table1"); return ds;紅色代碼拋一場:找不到可安裝的 ISAM,我懷疑藍(lán)色代碼有問題,但是找不到原因
- 1 回答
- 0 關(guān)注
- 929 瀏覽
添加回答
舉報(bào)
0/150
提交
取消