PhpExcel stops working after setting 20 cell types

Topics: Developer Forum
Aug 5, 2013 at 3:21 AM
I have a script that generates a little xls table (~25x15). It contains percentages and strings and i have an if operator that sets the current cell as percentage type with this code:


But when i export and look at the file I see it only managed to set type and style about 20 cells. And all the rest are with default settings. I debugged it and realized the problem isn't in my logic. I read about increasing php cache memory - tried it but it didn't work. Please help because i need to export at least 15 times larger table. Thanks in advance!
Aug 5, 2013 at 8:01 AM
Edited Aug 5, 2013 at 8:02 AM
As PHPExcel doesn't impose any limit on the number of styles (though Excel itself does, it's well above 20), and a number of our demo scripts in the /Examples folder use more than 20 different styles, can you please provide a working example of code that demonstrates this problem. It may be that the problem is in a particular style that you are setting rather than after a number of styles.
Aug 5, 2013 at 3:23 PM
I managed to extract only the functionality that handles exports and pass it sample data. Here is a sample code . When i uncomment cell-border settings export breaks, if i uncomment set-cell-to-percent functionality it breaks earlier. It seems the more styling and/or cell types i'm using the earlier export stops working. I'd be happy if you can give me any advice! Thanks in advance.

P.S. (by stop working i mean it stops styling and setting cell types, but it manages to fill in the whole data).
Aug 7, 2013 at 2:40 PM
Please let me know if you need any other information
Aug 9, 2013 at 11:56 AM
Here is a simplified version of the problem. The code is reduced to almost 35 lines. And I don't find any problem in the code...