Microsoft Interop无法在服务器上安装Microsoft Excel

时间:2016-08-25 15:09:30

标签: c# asp.net excel

在这里您可以看到我的代码

使用Microsoft.Office.Interop.Excel;

        Microsoft.Office. Interop.Excel.Application oexcel;
        Microsoft.Office.Interop.Excel.Workbook obook;
        oexcel = new Microsoft.Office.Interop.Excel.Application();
        oexcel.DisplayAlerts = false;
        obook = oexcel.Workbooks.Open(FileName, 0, false, 5, "", "", true,     
        System.Reflection.Missing.Value, "\t", false, false, 0, true, 1, 0);
        try
        {
            obook.SaveAs(Path, Password: password, ConflictResolution:                                                                                XlSaveConflictResolution.xlLocalSessionChanges);
        }
        finally
        {
            obook.Close();
            oexcel.Quit();
        }
    }

如果不在服务器上安装Microsoft Excel

,可以给我下面的解决方案吗?

0 个答案:

没有答案