token replacement

Topics: Developer Forum, Project Management Forum, User Forum
May 3, 2012 at 1:00 PM


I am using phpexcel to generate some reports based on data pulled from a database.

I am considering using a "token replacement" approach to this. I'd create a template with tokens in certain cells; these would be identified by some delimiter, e.g. {my_token}.

It looks like the only way to do this is to iterate through each cell in the worksheet and perform the token replacement if the cell value matches.

Does this approach make sense? Is there a better way to do it than what I've described above?

Many thanks!

- Michael