RE: [xsl] Producing Excel spreadsheet from XML data

Subject: RE: [xsl] Producing Excel spreadsheet from XML data
From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx>
Date: Fri, 8 Jun 2001 10:01:13 -0700
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

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.)


-----Original Message-----
From: MacEwan, James (Information Services)
Sent: June 8, 2001 09:29
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] Producing Excel spreadsheet from XML data


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

 XSL-List info and archive:

Current Thread