xls 文件中有语法错误?

发布于 2024-12-04 06:27:23 字数 2296 浏览 1 评论 0原文

不知道源代码中的错误在哪里,excel将所有内容打印成1行?

<?xml version="1.0" encoding="utf-8"?\>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"><Styles>
</Styles>
<Worksheet ss:Name="Export">
<Table>
<ROW>
<CELL><Data ss:Type="String">id</Data></CELL><CELL><Data ss:Type="String">barcode</Data></CELL><CELL><Data ss:Type="String">name</Data></CELL><CELL><Data ss:Type="String">price</Data></CELL><CELL><Data ss:Type="String">currency</Data></CELL><CELL><Data ss:Type="String">store</Data></CELL><CELL><Data ss:Type="String">timestamp</Data></CELL><CELL><Data ss:Type="String">longitude</Data></CELL><CELL><Data ss:Type="String">latitude</Data></CELL><CELL><Data ss:Type="String">deal</Data></CELL><CELL><Data ss:Type="String">type</Data></CELL><CELL><Data ss:Type="String">devicename</Data></CELL>
</ROW>
<ROW>
<CELL><Data ss:Type="String">1</Data></CELL>

<CELL><Data ss:Type="String">9783827328168</Data></CELL>

<CELL><Data ss:Type="String">123</Data></CELL>

<CELL><Data ss:Type="String">345</Data></CELL>

<CELL><Data ss:Type="String">EUR</Data></CELL>

<CELL><Data ss:Type="String">Lidl</Data></CELL>

<CELL><Data ss:Type="String">1315573726</Data></CELL>

<CELL><Data ss:Type="String">8.666193</Data></CELL>

<CELL><Data ss:Type="String">49.552096</Data></CELL>

<CELL><Data ss:Type="String">dealyes</Data></CELL>

<CELL><Data ss:Type="String">typebrutto</Data></CELL>

<CELL><Data ss:Type="String">m.münzner</Data></CELL>
</ROW>

</Table></Worksheet></Workbook>

dont know where the error is in the sourcecode, excel print all the content into 1 line?

<?xml version="1.0" encoding="utf-8"?\>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"><Styles>
</Styles>
<Worksheet ss:Name="Export">
<Table>
<ROW>
<CELL><Data ss:Type="String">id</Data></CELL><CELL><Data ss:Type="String">barcode</Data></CELL><CELL><Data ss:Type="String">name</Data></CELL><CELL><Data ss:Type="String">price</Data></CELL><CELL><Data ss:Type="String">currency</Data></CELL><CELL><Data ss:Type="String">store</Data></CELL><CELL><Data ss:Type="String">timestamp</Data></CELL><CELL><Data ss:Type="String">longitude</Data></CELL><CELL><Data ss:Type="String">latitude</Data></CELL><CELL><Data ss:Type="String">deal</Data></CELL><CELL><Data ss:Type="String">type</Data></CELL><CELL><Data ss:Type="String">devicename</Data></CELL>
</ROW>
<ROW>
<CELL><Data ss:Type="String">1</Data></CELL>

<CELL><Data ss:Type="String">9783827328168</Data></CELL>

<CELL><Data ss:Type="String">123</Data></CELL>

<CELL><Data ss:Type="String">345</Data></CELL>

<CELL><Data ss:Type="String">EUR</Data></CELL>

<CELL><Data ss:Type="String">Lidl</Data></CELL>

<CELL><Data ss:Type="String">1315573726</Data></CELL>

<CELL><Data ss:Type="String">8.666193</Data></CELL>

<CELL><Data ss:Type="String">49.552096</Data></CELL>

<CELL><Data ss:Type="String">dealyes</Data></CELL>

<CELL><Data ss:Type="String">typebrutto</Data></CELL>

<CELL><Data ss:Type="String">m.münzner</Data></CELL>
</ROW>

</Table></Worksheet></Workbook>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一绘本一梦想 2024-12-11 06:27:23

XML 区分大小写。将“单元格”和“行”替换为“单元格”和“行”。有了这个和 Pekka 建议的修复,你的文件加载到 Excel 中对我来说很好。

XML is case-sensitive. Replace "CELL" and "ROW" with "Cell" and "Row". With that and the fix suggested by Pekka, your file loads into Excel fine for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文