Solved

XSL transformation that converts XML to Excel?

Posted on 2002-05-10
7
274 Views
Last Modified: 2012-06-21
Hi.

I would like to do the following-

The results of a query are sent to the client as XML and displayed on-screen as an HTML table using an XSL. However, I'd like to give users the option to click a button which will open Excel inside their browser and display the data there. I know how to use Javascript to change the XSL file being used on the client and re-transform the data, so really I want to know how to use an XSL to create a CSV file (probably) with an application/vnd.ms-excel content type.

Thanks in advance,
JP
0
Comment
Question by:jonpers
7 Comments
 
LVL 23

Expert Comment

by:b1xml2
ID: 7001216
to expedite matters, what dont you provide your sample XML and expected CSV syntax.

Also, the CSV syntax could be sent via an ASP Page without any need to save it as a file anywhere.

e.g.
<%
Response.ContentType = "application/vnd.ms-excel"
....
oXML.transformNodeToObject oXSL, Response
%>
0
 
LVL 1

Author Comment

by:jonpers
ID: 7001243
I don't actually have an example of my XML yet - I'm just working on a concept.

As for the CSV format, I don't really mind, it's possible that CSV is not the best solution. The main thing is to get the data displayed in an in-place Excel window in the browser without having to re-send all the data.

The ASP solution is nice but
a) I am working on a JSP server and
b) It doesn't allow me to change the format on the client side, it would have to be done server-side.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7001257
yes, that's my point with regard to the ASP thingy,

You can set the Content-Type HTTP Header to "application/vnd.ms-excel" on the JSP Server and output the transform on the server-side. The client will see the header and if it has Excel will load the csv inside excel.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 1

Author Comment

by:jonpers
ID: 7005761
I don't think you understand what it is I'm trying to achieve.

I want to be able to dynamically change the format of the output between html and excel on the client without re-downloading the data.
0
 
LVL 1

Expert Comment

by:vijayneema
ID: 7029607
listening ...
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7976737
PAQ'd and points refunded

SpideyMod
Community Support Moderator @Experts Exchange
0
 

Expert Comment

by:micahtoland
ID: 11592707
Has anyone ever firgured out how to convert XML to Excel on the Client Side without making a round trip back to the server?
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question