使用JavaScript将XML电子表格转换为XLSX
我需要将XML电子表格转换为本机Excel文件(XLSX),而无需使用MSOFFICE。 特别是我需要使用JavaScript进行此转换。
我正在在“ Stackoverflow”网页中搜索以及在Google和其他门户网站中搜索,但是我什么也没发现。
XML电子表格示例文件是这样的:
另一方面,我是我'' ve发现了MSOffice Excel安装中的“ excelcnv.exe”命令,以进行转换,但我只需要从XLS转换为XLSX,但是从XML电子表格转换为XLSX ...实际上我还没有找到任何文档关于此“ excelcnv.exe”命令,所以我不知道是否有可能进行转换。
另外,我发现了一些JavaScript库,例如Oxml.js或XLSX,但我认为此库允许从头开始创建本机Excel文件,而不是以XML电子表格格式的输入文件转换。
也许任何人都可以使用JavaScript或一些JavaScript库知道这是如何知道的。 任何帮助将非常欢迎
:)
I need to convert a XML SpreadSheet to a native Excel file (XLSX), without using MSOffice.
In particular I need to make this conversion using Javascript.
I'm searching for in "StackOverflow" web page and also in google and other portals, but I don't find nothing about it.
The XML SpreadSheet sample file is like this:
On the other hand, I've discovered the "excelcnv.exe" command for conversion between formats, included in MSOffice Excel installation, but just I got to convert from XLS to XLSX, but not from XML SpreadSheet to XLSX...In fact I haven't found any documentation about this "excelcnv.exe" command so I don't know if it is possible this conversion.
Also I've found about some javascript libraries like oxml.js or XLSX but I think this libraries allow create a native excel file from scratch, not convert from input files in XML SpreadSheet format.
Maybe anybody could know how do this using javascript or some javascript library.
Any help will be very welcome :)
Thanks in advance,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要更改文件扩展名。从XML到XLS。
然后ExcelCNV将正确转换。
You need to change the file extension. From xml to xls.
Then excelcnv will convert correctly.