How to avoid macro loss in PHPExcel?

I use PHPExcel to read data from a database and put it in a spreadsheet. I also have a template (.xlsm file) to follow. As you know, PHPExcel does not support macros. But I do not want to edit or create macros. I just want to make sure that they stay where they are. I don’t even want to touch them.

So does anyone know of a <workaround for this?

I have been working on this for a week now. I already read this and this . The problem with the first solution is that my server is Debian, so I can not try Libxl.

In codeplex, I found the following solution in a Chads2000 comment, but it looks like I can get it working. I'm desperate.

Thank you all for your attention, in antecipation.

+6
source share
1 answer

Well, I understood this a long time ago: here is the answer. The guy made a detour. First, it separates the macro (VBA) files from the worksheet, then it left PHPExcel to "do its job" and then put it back (macros!). That was enough for me !: D

+6
source

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


All Articles