Solved

XSL transformation that converts XML to Excel?

Posted on 2002-05-10
7
271 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Author Comment

by:jonpers
Comment Utility
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
Comment Utility
listening ...
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
Comment Utility
PAQ'd and points refunded

SpideyMod
Community Support Moderator @Experts Exchange
0
 

Expert Comment

by:micahtoland
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

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.
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now