System.Runtime.InteropServices.COMException (0x800A03EC)

后端 未结 7 1232
梦谈多话
梦谈多话 2020-11-29 02:07

Microsoft.Office.Interop.Excel.WorkbookClass.SaveAs() method is working fine on Windows server 2003 and also on XP but not on Windows server 2008. I copied it a

7条回答
  •  粉色の甜心
    2020-11-29 02:24

    Some googling reveals that potentially you've got a corrupt file:

    http://bitterolives.blogspot.com/2009/03/excel-interop-comexception-hresult.html

    and that you can tell excel to open it anyway with the CorruptLoad parameter, with something like...

    Workbook workbook = excelApplicationObject.Workbooks.Open(path, CorruptLoad: true);
    

提交回复
热议问题