开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜