I am wrinting some code which will benefit from a good templating system on Excel.
What I was expecting was the ability to insert TT [% ucfirst user.name %] in a binary .xls file and then run it through some "TT::Excel" and get a nice binary .xls with my data in it.
To my surprise "TT::Excel" does not exist. That is Excel::Template::TT and Excel::Template::Plus::TT (the two that come the closest to my dirty desires) use an xml template instead of a binary .xls.
My thing with the binary .xls template is it can be a really nice "user config file" for really basic users, it is really straight forward when it comes to formating WYSIWYG-ishly.
In trying to getting starter on a new module that merges TT with binary .xls templates (.xlsx would be nice too, should be covered by another nice Spreadsheet::xxxx) I have read TT docs and the Badger book to no avail (yes, "Extending the Template Toolkit" too). Seems that nobody tackles into reading a non-text based template; thus, no one goes past XML templates. I have skimmed through the code of Template::Service and Template::Provider (which seems like nice candidates) but it seems that from then on everything should be text or a really big rewrite (which is far from my abilities as was reading to full understanding the code itself).
Then comes request for thoughts on implementing this...
Maybe suggestions on an approach. My to three has: 1-Contacting someone who has this module already working by this means, failing that... 2-Reading the original .xls outputting to XML then Excel::Template::Plus::TT which will work but seems sloppy and some limitations arise from the commands being "in" the cells (specially for loops), 3-Finding some magic hook in TT where each line is read and extending that to Excel cells, 4-Using the grammar, stash and other modules from Template::Toolkit to create a new front end and never getting it done (again my limitations arise).
Comments welcome!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Binary Excel Templates
by Corion (Patriarch) on Sep 14, 2010 at 06:54 UTC | |
|
Re: Binary Excel Templates
by jmcnamara (Monsignor) on Sep 14, 2010 at 09:59 UTC | |
|
Re: Binary Excel Templates
by locked_user sundialsvc4 (Abbot) on Sep 16, 2010 at 18:56 UTC | |
|
Re: Binary Excel Templates
by Anonymous Monk on Sep 15, 2010 at 00:10 UTC | |
|
Re: Binary Excel Templates
by psini (Deacon) on Sep 15, 2010 at 10:07 UTC | |
|
Re: Binary Excel Templates
by Anonymous Monk on Sep 14, 2010 at 06:41 UTC | |
|
Re: Binary Excel Templates
by gbarco (Novice) on Sep 28, 2010 at 13:55 UTC | |
by roboticus (Chancellor) on Sep 28, 2010 at 15:43 UTC |