in reply to Create Excel and HTML from same source

From Excel::Template docs:
This is a module used for templating Excel files. Its genesis came from the need to use the same datastructure as HTML::Template, but provide Excel files instead.
Isn't this what you want? If not you'll have to provided a bit more detail of what you are trying to do.
  • Comment on Re: Create Excel and HTML from same source

Replies are listed 'Best First'.
Re^2: Create Excel and HTML from same source
by andreas1234567 (Vicar) on Mar 23, 2007 at 21:15 UTC
    .. 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.
      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:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?