Replace keywords in an existant file

Apr 14, 2009 at 11:20 AM
Hi,
I had to realize a system wich had to replace a keyword in an existant template.
The problem is that I hadn't find an existant function in PHPExcel 1.6.5 which can do that. 
I don't want to loop on the entire file because it can take very important time.
So I thought to transform the existant Excel file to CSV text file and replace the keyword by the value before transforming it again in excel format.
The problem is that I'm losing the format applied on the template.
Do you have some method to save the style of the workbook and apply it to the new file ?
Thanks
Developer
Apr 15, 2009 at 7:00 AM
>>Do you have some method to save the style of the workbook and apply it to the new file ?
Not apart from applying the styles the usual way using the same methods as when creating an Excel file from scratch.

Generating from template is likely to become much faster in the future with PHPExcel. I think looping through the entire cell collection replacing keywords / fields is the correct approach.