Page 1 of 1

Replace String in existing Excel document

Posted: Tue Nov 21, 2006 5:16 pm
by amir
I need a simple php script that would allow me to replace a string with another in an existing .xls file. Fo example, the first cell contains the word "yellow". I should be able to replace "yellow" with the string "red" without corrupting the .xls file. If "yellow" was in the second cell, that the second cell would be the one that gets modified.

TIA!

Posted: Tue Nov 21, 2006 5:54 pm
by feyd
Get the Excel reader from PEAR. It may support what you want. Otherwise, you're going to need to use COM or have to do it another way.