1

I'm using PHPexcel to load a Excel file(.xlsm) and update some cells and save it to a new excel file. The original one has formulas including IF, OR, ISNA, VLOOKUP,/ and some macros as well.

After I load the file into php, The formulas are not working(when I run it, the answer is always N/A.). So i decided to save it to another file then read again. Because the excel application will recalculate all cells. But I found that after I save it to another file, it doesn't actually save it. After I manually open the file and try to close, it will ask me if I want to save the changes. If i dont and load it with PHP. All data will be 0. But after I manually save it again. Everything is okay.

I know it sounds weird. But if anyone knows how to fix it, that will be great! Thx.

xilingwu
  • 11
  • 2
  • Does this help you? http://stackoverflow.com/questions/17809652/how-to-avoid-losing-macros-in-phpexcel – Halcyon Jan 15 '16 at 16:01
  • Thanks But I saw this one before. Even if I disable all the macro, it still happens. I would say this is cause by some formulas are not supported. I decided to implement the calculation part by myself. – xilingwu Jan 18 '16 at 15:41

0 Answers0