The content disappears...

Topics: Developer Forum
Oct 11, 2011 at 2:35 PM

Dear team,

I need your help!

Each time I work with PHPExcel on a template pre-filed, it one is competely emptied and filed with my generated data.
My question is: How to keep my Excel macro or chart after PHPExcel work?? 

For example,

1. I create an Excel template with 2 empty columns (only the header) and I build a chart referencing these 2 columns. 
2. I save my template on the server
3. After a click on "Export Excel" button, my procedure to insert data in my template start and a new Excel file is created on the server
4. When I open my new file, the two columns are filed and the header is still here... but no more chart... 

How to manage that?

Thank you in advance for your help.

Oct 11, 2011 at 3:41 PM

As far as I know this is not possible. PHPExcel reads an entire file and converts all structures it supports into an internal representation. At file-write-time, this is converted to the requested format by the appropriate output writer. The disadvantage of this, is that all not-supported content is lost.