1
Excelファイルを読み込み、ファイルの内容をデータテーブルに変換しようとしていますが、この例外が発生し続けます。特定の行を指すE_FAIL(0x80004005)でIErrorInfo.GetDescriptionが失敗しました。POCCommand.Fill(dt);
これはこれまで試みました。私は何が間違っていますか?IErrorInfo.GetDescriptionはasp.net C#でE_FAIL(0x80004005)で失敗しましたか?
string POCpath = @"p.xlsx";
string POCConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + POCpath + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=1\";";
OleDbConnection POCcon = new OleDbConnection(POCConnection);
OleDbCommand POCcommand = new OleDbCommand();
DataTable dt = new DataTable();
OleDbDataAdapter POCCommand = new OleDbDataAdapter("select * from [Sheet1$] ", POCcon);
POCCommand.Fill(dt);
Console.WriteLine(dt.Rows.Count);
[ExcelシートをDataTableに読み込むための最善の方法/最も速い方法はありますか?](http://stackoverflow.com/questions/14261655/best-fastest-way-to-read-an-excel-sheet-データ出力可能) – MrAmazing