Is there a PHP library for XLSM (Excel with Macro) for parsing / editing?

  • I know that PHPExcel does not support XLSM files.
  • I tried to wrap Iliaal around Libxl, can be found here

However, both of them do not support XLSM , but they are really cool with XLS . I searched all over the internet and did not find a library or method with PHP to do this.

By the way, my environment is * NIX .

EDIT I do not need to edit macros myself. I donโ€™t want to touch them, but I want the executable library / shell / command line (as a last resort) to work with XLSM files (XML spreadsheets with macros).

Thanks.

+1
source share
2 answers

We are faced with the same problem that you talked about when we need to modify Excel workbooks but donโ€™t want to affect existing macros.

To do this, we used the LibXL library, and since version 3.3.1 it supports saving macros for .xls files. It is not written in PHP, so we wrote a little C ++ program, and then we call this program from php using the exec() method of PHP. It works very well.

+3
source

This is completely from my knowledge, since I am familiar with PHPExcel ... However, maybe there is something for you in this discussion about Read/Write macro in .xlsm ? It seems that there is no library , but it seems promising.

Read / write macros in .xlsm

+3
source

Source: https://habr.com/ru/post/950074/


All Articles