解决C#导出excel异常来自 HRESULT:0x800A03EC的方法 .

解决C#导出excel异常来自 HRESULT:0x800A03EC的方法 .

 

xlBook.SaveAs(FilePath,Microsoft.Office.Interop.Excel.XlFileFormat.xlExcel8, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);

发现Office.Interop.Excel.XlFileFormat.xlExcel8格式与本机安装的office对不上,用Office.Interop.Excel.XlFileFormat.xlWorkbookNormal则可以

xlBook.SaveAs(FilePath, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing)

上一篇:stm32工程模板的创建


下一篇:keras模块学习之泛型模型学习笔记