乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > C#导出数据到<em>Excel</em>过程中遇到的异常来自 HRESULT...-0x800

C#导出数据到<em>Excel</em>过程中遇到的异常来自 HRESULT...-0x800

作者:乔山办公网日期:

返回目录:excel表格制作


导致这种错误的原因有很多种。可能是因为你的数据太多,或者使用了剪贴板操作。

可以做一下延时处理,最终再生成Excel

我遇到了遇到与你相同的问题,后来发现是要打开的excel模板无法打开错误,模板文件错误。
你这个程序是读取一个本地的XLS内容?我记得好像运行期的时候,读取XLS之前要先关闭EXCEL

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格式636f7079e799bee5baa6364与本机安装的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);

相关阅读

关键词不能为空
极力推荐
  • -jsp poi 读取excel,poi读取excel

  • POI 生成Excel 封装好的util可以直接百使用http://hi.baidu.com/a363359983/blog/item/a4901dffda3466265c6008f4.html这是度我空间的一片文问章,相信可以解决你的问题。附有答Demo,支持下载。内如果可以解

ppt怎么做_excel表格制作_office365_word文档_365办公网