导出数据时出现XML电子表格问题 [英] xml spreadsheet issue while exporting data
问题描述
我创建了一个程序,该程序可以将大数据(例如1000万行)导出为excel,文本或其他格式.
现在我发现excel导出有问题.
我有大量数据要在excel中导出.我正在使用"XML Spreadsheet",其中将构造xml文件并使用流编写器将其写入excel文件.
一切正常,并且可以成功导出,但是当我尝试打开文件时,它不会显示该文件.它将显示消息加载xls文件时出现问题",仅此而已.我也检查xls日志,就像这样
表中的XML电子表格警告
原因:字符串太长
动作:截断字符串
FILE:C:\ Users \ sunder \ AppData \ Local \ Microsoft \ Windows \ Temporary Internet Files \ Content.MSO \ FFB7679E.xls
组:行
标签:单元格
表中的XML电子表格警告
原因:字符串太长
动作:截断字符串
FILE:C:\ Users \ sunder \ AppData \ Local \ Microsoft \ Windows \ Temporary Internet Files \ Content.MSO \ FFB7679E.xls
组:行
标签:单元格
我觉得编码没有问题.也许是一个单元格将不允许更多字符或其他问题.可能是我存储在单元格中的数据无效或其他问题.
但是在这里,我限制一个单元格的长度不能超过1000个字符.
任何人以前都遇到过这个问题.我现在有点笨吗?
谢谢
Hi There,
I have created a program which will export large data say 10 million rows to excel, text or other formats.
Now I am finding problem with excel export.
I have huge data to be exported in excel. I am using "XML Spreadsheet" where I will construct xml file and write into excel file using stream writer.
Every thing goes fine and exported successfully but when I try to open file it will not show the file. It will show message "problem during loading xls file" and that’s all. I check xls log also which is like that
XML Spreadsheet Warning in Table
REASON: String too long
ACTION: Truncating string
FILE: C:\Users\sunder\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.MSO\FFB7679E.xls
GROUP: Row
TAG: Cell
XML Spreadsheet Warning in Table
REASON: String too long
ACTION: Truncating string
FILE: C:\Users\ sunder \AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.MSO\FFB7679E.xls
GROUP: Row
TAG: Cell
I feel there are no issues with coding. Perhaps may be a cell will not allow more characters or some other issue. May be the data which I am storing in cell is not valid or some other issue.
But here I am restricting a cell should not have more than 1000 characters.
Anyone faced this issue before. I am kind of no brainer now?
Thanks
推荐答案
XLS限制为65536行.
XLSX(Excel 2007+)限制为一百万行.
如果您要查询提到的行数,请查看 Microsoft PowerPivot [
XLS is limited to 65536 rows.
XLSX (Excel 2007+) is limited to 1 million rows.
If you are going for the rows counts you mentioned take a look at Microsoft PowerPivot[^].
这篇关于导出数据时出现XML电子表格问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!