Problems with phpExcel and cell formatting

Topics: Developer Forum
Oct 16, 2013 at 4:04 AM
Hello, I am a newb to this forum and to phpExcel so please be gentle ;p

os linux 64bit (not sure of the exact flavor)
php version 5.3.27
phpexcel version 1.7.9, 2013-06-02
memory limit set to 256 Mb

I am having an issue with cell formatting within phpExcel.

I am writing a spreadsheet from data in a mysql database. I am not using a template or doing any reads.

During the process writing the spreadsheet, cell formatting disappears. It would seem to be a memory issue but I am not getting any errors thrown and the spreadsheet does get written to the disk so it is not erroring out. I have tried this with cell caching in place and without. I have suspended the memory limit. Same results no matter what.

Depending on how I write the formatting (single cell versus range) I get either more or less data formatted properly in my output. If I do single cell formatting I lose the formatting about 15-20 rows into the sheet. If I do ranged formatting I can get further but it still eventually disappears.

Stranger still, further down, the formatting comes back.

The data stays intact.

I am posting an image of a test sheet that I wrote on the server to illustrate what I am talking about.

Any help is appreciated.

Thank you in advance,

Russ

Image
Oct 16, 2013 at 4:56 AM
Well, changed it from writing Excel 2005 to writing Excel 2007 and it all works right.

I can live with that ;p