Solved

XSL transformation that converts XML to Excel?

Posted on 2002-05-10
7
275 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Extract XML Data from using TSQL 5 69
Test ddwrt:UserLookup 1 71
write xml in vb.net 2 41
parsing xml using powershell 6 35
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 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