创建Excel文件时生成错误 [英] Error generated when creating excel file

查看:442
本文介绍了创建Excel文件时生成错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试生成excel报告时,在我的计算机的APPDATA文件夹中创建的日志文件都会显示以下错误:

Whenever I try generating an excel report, the log file created in my computer's APPDATA folder shows the following error :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error009480_01.xml</logFileName><summary>Errors were detected in file 'E:\fb\report\resources\g_Report.xlsx'</summary><additionalInfo><info>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</info></additionalInfo></recoveryLog>



如何避免这种情况?


How can I avoid this ?

推荐答案

这通常意味着有一些Excel文件中的一些损坏。也许,如果您显示用于生成文件的代码,有人可以建议发生损坏的位置。
This generally means there is some sort of corruption in the Excel file. Maybe, if you show the code you are using to generate the file, someone can suggest where the corruption is occurring.


确保在响应逻辑结束时有以下内容:





Response.Flush();

Response.End();
Make sure you have the following at the end of your "response" logic:


Response.Flush();
Response.End();


这篇关于创建Excel文件时生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆