Excel with C# connection
I have this code
exapplication = new Excel.A开发者_开发技巧pplication();
Excel.Workbook WB = exapplication.ThisWorkbook;
WB.Connections.AddFromFile("C:\test.odc");
and when I trying to compile it, it gives me the following exception:
Exception from HRESULT: 0x800A03EC
You should replace
WB.Connections.AddFromFile("C:\test.odc");
by
WB.Connections.AddFromFile(@"C:\test.odc");
although I don't really think that exception is because of this.
精彩评论