5

I'm developing a webapp using PHP (Zend Framework) & JS (extJS 4) that reads Excel files sent by our customer. The problem is they use macro a lot, meaning all the files sent are in xlsm format. We read the files and update our database with the data, but sometimes we also need tu edit their file, to update some of the data in it.

We use a lot PHPExcel for all our PHP/excel needs, but I'm kinda stuck on this one. I know the library doesn't officially support Macro-enabled files, but as far as I'm concerned, all I need is to open the file, edit the "sheet data" part and save the file along with its macros. I will never need to access/edit the macro part of the file. I've ran some tests, and all I could manage, was editing the file, then writing it back in xlsx format.

It's really important that I return them a file containing their macros, because they use this file everyday, and sometimes make several imports a day. I cannot ask them to change the way they work, so I'm trying to work this around on my end. I've searched Google for other libraries that implement xlsm writing, but the only lead I could find was the PHP built-in COM object, along with a very sparse documentation...

So I'm trying to see if anyone here has already been there, and has tips or tutorials for this specific need.

By the way, I have technical requirements for this : I can only use PHP, and maybe .NET languages, but Java is not an option...

Thanks

3rgo
  • 3,115
  • 7
  • 31
  • 44
  • Hi Squ36, I'm in the same boat as you! Have you found an answer yet? I also need to read in a .xlsm file - luckily I don't need to write to it. Have you found any other libraries to do this? – Gerrit Wessels Oct 09 '12 at 12:32
  • @Gerrit : If you only need to read the file, PHPExcel if just fine. It just doesn't allow you to save it back into xlsm – 3rgo Oct 11 '12 at 15:19
  • I tried PHPExcel, but found that it was very memory intensive - I assume it has a lot of overhead. In the end I used SimpleXLSX, which worked 100% for reading data from a nominated worksheet. Thanks – Gerrit Wessels Dec 13 '12 at 14:04

0 Answers0