General discussion

Locked

xml to excel conversion

By khanhqhoang ·
Hi,

I wonder if someone could let us know how to convert an xml doc to an excel spread sheet. We don't want to use csv approach or using a third party vendor software. We also want to minimize client download as much as we can.
Our excel spread sheet need to have outline, formatting features like bold headings and borderlines.

Thanks a lot,

KH,

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

xml to excel

by CPMCBM In reply to xml to excel conversion

Contact Mr. Excel at www.mrexcel.com.

Collapse -

XML to Excel

by gibcire In reply to xml to excel

Excel handles html in its native format. It will render any style attributes that are embedded in the html output. Your xsl simply outputs the xml as you wish it to look in Excel but as html.

To handle the opening of the file we used the following statement in our jsp:

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","inline; filename=bscreport.xls;");

Find more information on this on microsoft.com by searching for, "Microsoft Excel Web Connectivity Kit."

A word of caution on css: Excel doesn't interpret css statements. style attributes must be within the html tags. Excel also "interprets" the data and will automatically apply different formatting to cells that have "$" content vs. cells that have numbers.

Excel has a few other style classes that it will interpret. These are defined in the toolkit documentation.

Good luck,

Lorie Gibbons

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums