This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@investorsgroup.com]
Sent: June 8, 2001 09:29
To: 'xsl-list@lists.mulberrytech.com'
Subject: [xsl] 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]