不知道源代码中的错误在哪里,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>
答案 0 :(得分:0)
XML区分大小写。将“CELL”和“ROW”替换为“Cell”和“Row”。有了这个和Pekka建议的修复,你的文件加载到Excel中对我来说很好。