Microsoft.Office.Interop.Excel.dll
は、次のエラーにつながる:Microsoft.Office.Interop.Excel登録されていないDLL使用して
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154 Klasse nicht registriert (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
エラーは、このコードの4行目にoccures:
using EX = Microsoft.Office.Interop.Excel;
private void LoopBANFDokumenteLibrary(System.Uri Link)
{
EX.Application MSExcel = new EX.Application();
EX.Workbook WB = MSExcel.Workbooks.Add(new EX.Workbook()); //ERROR: Exception thrown
EX.Worksheet WS = WB.Worksheets.Add(new EX.Worksheet());
/*...and further code...*/
}
何年か前私はこのInterop.Excel.DLLを毎日使っていましたが、この問題は一度もありませんでした。あなたはこのスクリーンショットで見ることができるようにregedit.exeのオープニング、DLLが登録されている:
誰が間違っていただきましたアイデアを、持っていますか?
EX.Workbook WB = MSExcel.Workbooks.Add();
へ
よろしくとお願いします、 月
を使用.. – stuartd
私は現在それを実行しています:-) – Jan021981
..それはバージョンのミスマッチかもしれませんか? – stuartd