使用JavaScript将XML电子表格转换为XLSX

发布于 2025-02-01 15:31:00 字数 589 浏览 2 评论 0原文

我需要将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:

enter image description here

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 技术交流群。

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

发布评论

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

评论(1

荭秂 2025-02-08 15:31:00

您需要更改文件扩展名。从XML到XLS。
然后ExcelCNV将正确转换。

excelcnv.exe -oice <INPUT> <OUPUT>

You need to change the file extension. From xml to xls.
Then excelcnv will convert correctly.

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