Re: [xsl] Display XML as excel spreadsheet

Subject: Re: [xsl] Display XML as excel spreadsheet
From: "rajith r" <ajth_r@xxxxxxxxxxx>
Date: Fri, 30 May 2003 10:39:57 +0000

When the content type is set to "application/vnd.ms-excel", the excel spreadsheet opens up in the browser, but the excel spreadsheet just shows a dump of the XML file, the transformation by the XSL file does not seem to have taken place.


My XML comes from a Database, and I am using XSL to get a formatted display. If the content type is html it works perfectly, but when I change the content type to "application/vnd.ms-excel", I just get a XML dump in the spreadsheet, and not a properly formatted output. Where am I going wrong?

Regards
Rajith

From: "I-Lin Kuo" <ikuoikuo@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Display XML as excel spreadsheet
Date: Thu, 29 May 2003 19:43:16 +0000

I want to display XML as excel spreadsheet on the browser using XSL. Any suggestions.

Set the mime-type to "application/vnd.ms-excel". That tells the browser to forward the file to excel for display.


As to the actual format of the file, it can be any of the following (non-exhaustive):

1) regular plain ole xml -- this works best if it's xml that comes from a database in rows and fields, as excel doesn't intellligently display xml with nesting)
2) html table -- this allows you to control formatting, borders, etc. But it's quite verbose so you don't want to do this with a large file
3) csv
4) tab-delimited file


I-Lin Kuo, Ann Arbor, MI
Macromedia Certified ColdFusion 5.0 Advanced Developer
Sun Certified Java 2 Programmer
Ann Arbor Java Users Group (http://www.aajug.org)

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



_________________________________________________________________
Attention NRIs! Send money to India. http://server1.msn.co.in/msnleads/citibankrca/citibankrca2.asp Do it in a jiffy!



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread