.. the same datastructure as HTML::Template, but provide Excel files instead.
The datastructure is the same, but the markup is very different. I would like to keep both the datastructure and the markup the same for both Excel and HTML.
I do recognize dragonchild's comment that Excel and HTML layout are indeed driven by different needs. Meanwhile I'm curious as to whether it is possible to use the same datastructure and markup for both Excel and HTML output, at least for the most simple cases.
| [reply] |
If you can guarantee that your output will only be opened by Microsoft Excel itself, you can provide an HTML file with a table in it and Excel will do the appropriate thing. If I'm not mistaken, it will even handle basic CSS, but I wouldn't fool around with your full HTML page. So, you'll want to create a template for the table and include it into the main HTML wrapper template for HTML output and use it with a simplified wrapper for XLS output.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] |