Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: XML to Excel with Stylesheet

by clscott (Friar)
on Feb 06, 2007 at 19:50 UTC ( [id://598623]=note: print w/replies, xml ) Need Help??


in reply to XML to Excel with Stylesheet

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://598623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-25 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found