简体   繁体   English

我们可以使用POI Apache将xlsm转换为xlsx吗

[英]Can we convert xlsm to xlsx using POI apache

It is possible to convert xlsm file to xlsx file using Apache poi. 可以使用Apache poi将xlsm文件转换为xlsx文件。 I am trying to writing a xlsm file but after writing i want it to be converted into xlsx file. 我正在尝试编写一个xlsm文件,但是写完后我希望将其转换为xlsx文件。 can you give me any solution. 你能给我任何解决方案吗?

xlsm means that the Excel Workbook containts macros (VBA code) xlsm表示Excel工作簿包含宏(VBA代码)

If you want to save that workbook as an xlsx (an Excel Workbook WITHOUT macros), Excel will notice and will REMOVE all VBA code. 如果要将该工作簿另存为xlsx(不带宏的Excel工作簿),Excel将注意到并删除所有VBA代码。

So, there's no point in saving as xlsm to an xlsx (as all VBA code will be removed), unless you have no VBA code in your xlsm (and then there's no point to using a xlsm in the first place). 因此,除非将xlsm另存为xlsm(因为所有VBA代码都将被删除),否则没有意义,除非您在xlsm中没有VBA代码(然后首先没有必要使用xlsm)。

使用Excel将.xlsm版本另存为.xlsx。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM