将我的C#代码连接到外部Excel文件

时间:2016-12-03 15:19:29

标签: c# excel interop

我用来从我的C#Interop应用程序中打开Excel文件。 但是,我已经无法接收(或连接到)Excel文件,当它已经在空中" - 打开manualy。

app = new Excel.Application();
foreach(var w in app.Workbooks)
{
    if(w.name == "MyFile") found = true;    //never ever found 
}

请问您如何连接到MyFile.xlsx,而不仅仅是打开它?

0 个答案:

没有答案