Charts with no changes.

Topics: Developer Forum
Oct 8, 2012 at 7:05 PM

Hello,

first thanks for the great class and the great work you are doing.

I've been playing a bit with the code and doing some tests I know you are working hard to add more functionality to it and I'm just wondering if it can be added an option to keep the excel file unchanged. 

With unchanged I mean that once you open it with the reader everything that is not touched will be exactly as it was. Not even sure if this is possible but it will be a great option so that we could cover things that are not yet implemented directly on the excel file. 

For example as an easy test, the colors of a chart. The original excel file has some colors and the final output file as the chart has not been modified in any way keeps original colors. Again not sure if is even possible... just an idea.

 

Many thanks again for the great work!

Coordinator
Oct 11, 2012 at 9:17 AM

Sadly impossible without a complete rewrite of the way PHPExcel works (and I'm not going to rewrite every single line of code to folloow a completely new architecture). PHPExcel works by providing a representation of a workbook in memory; the readers parse a file and set the appropriate properties and cell objects in that internal representation; the writers convert that representation to an appropriate file format.

Elements of Excel that aren't represented in the PHPExcel object are discarded when reading, as are elements that the readers aren't configured to support yet (such as pivot tables), or where the writers don't yet have the code to handle conversion of specific features to a save format. There is no connection between the PHPExcel object and the file that it was populated from, so "unchanged" is meaningless.