I've tackled this task several ways including sending a csv file and building an excel file with SpreadSheet::WriteExcel

My favourite trick for delivering dynamically generated Excel spreadsheets over the web is this:
Send an html file to the browser with the Content-type header set to the MIME type for Excel (application/msexcel).

The browser should prompt the user to open the file in Excel. Excel will parse and display the contents of the file, in cells so if your page is a bunch of tables, Excel will create a 1-to-1 cell mapping for the HTML table cells to Excel cells. You can make the tables as complex as you like, style them and the information and formatting comes through. It's a very fast way to get up and running especially if you are using a templating system like Template-Toolkit, HTML::Template or Petal.

This has worked since the version of Excel before Office XP (2003)

--
Clayton

In reply to Re: XML to Excel with Stylesheet by clscott
in thread XML to Excel with Stylesheet by rashley

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.