RE: Producing Excel spreadsheet from XML data
Well, obviously support for <xsl:output method="ms-excel"/> is a long way off. But a common technique for producing Excel-compatible data without Excel-interfacing DLLs and the like is to produce a comma-separated values file. You would use method="text" and output one line for each row of the spreadsheet you are creating; the columns would be separated by commas, and non-numeric columns would be surrounded by quotes ("). If you put this in a file whose extension is ".csv", most Windows systems with Excel loaded will fire up Excel to import this when the file is double-clicked. Of course this is data only and doesn't allow you to specify fonts, formulas, and so on. Another option, if your users are up to Excel 2000, is to check out what Excel does when you say "Save As HTML". This option produces an HTML file that Excel can convert back to a spreadsheet. If you can duplicate the HTML format that Excel uses, then you would be able to produce an HTML file that Excel could read. (From what I see, reverse-engineering that format would be non-trivial -- and perhaps even illegal in the United States, from what I've heard -- but you might find documentation for it somewhere in Microsoft's web site.) PC2 -----Original Message----- From: MacEwan, James (Information Services) [mailto:James.MacEwan@xxxxxxxxxxxxxxxxxx] Sent: June 8, 2001 09:29 To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: Producing Excel spreadsheet from XML data Hi, My question is of the general architectural type, similar to the one about Quark yesterday. I am investigating populating an Excel 97 spreadsheet with an XSLT transformation of existing XML data. I would like to produce the spreadsheet file as an enhancement to an existing batch process on a (DONS ASBESTOS SUIT) Unix server (ASBESTOS SUIT OFF). XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format