473,402 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

XSLT and Excel

Hello,

Is there a way to develop a style sheet that runs on the client that will
open the file in excel?

Thanks,
Dan
Nov 12 '05 #1
2 5298
"solex" <so***@nowhere.com> wrote in message news:#f**************@tk2msftngp13.phx.gbl...
Is there a way to develop a style sheet that runs on the client that will
open the file in excel?


In general, XSLT style sheets can be used to transform one node
tree into another node tree, but they can't portably execute program
code.

Depending upon what XSLT processor you're using, it may be
possible to write an XSLT extension that executes program code
outside of the style sheet, but then strictly speaking you're not
writing XSLT anymore, but COM or something else.

If you run an XSLT style sheet on some data and produce a basic
HTML table, and the user is running Internet Explorer, and the user
has a recent release of Microsoft Excel installed; then the user can
sort of launch Excel by right-clicking on your HTML table and choosing
to Launch Microsoft Excel.

That's probably not as automatic a launch as you'd have liked.

What you probably want to do to accomplish this is to emit Javascript
into the web page that launchs Excel through OLE Automation, some-
thing like the following [untested] line,

var excel = new ActiveXObject( "Excel.Application");

Script is a superior means of executing code on the client compared
to XSLT style sheets.
Derek Harmon
Nov 12 '05 #2
Derek,

Thank you for your response. I tried setting the content type in the XLST
but that did not seem to help. If I was executing this on the server there
would be no problem.

Regards,
Dan

"Derek Harmon" <lo*******@msn.com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
"solex" <so***@nowhere.com> wrote in message

news:#f**************@tk2msftngp13.phx.gbl...
Is there a way to develop a style sheet that runs on the client that will open the file in excel?


In general, XSLT style sheets can be used to transform one node
tree into another node tree, but they can't portably execute program
code.

Depending upon what XSLT processor you're using, it may be
possible to write an XSLT extension that executes program code
outside of the style sheet, but then strictly speaking you're not
writing XSLT anymore, but COM or something else.

If you run an XSLT style sheet on some data and produce a basic
HTML table, and the user is running Internet Explorer, and the user
has a recent release of Microsoft Excel installed; then the user can
sort of launch Excel by right-clicking on your HTML table and choosing
to Launch Microsoft Excel.

That's probably not as automatic a launch as you'd have liked.

What you probably want to do to accomplish this is to emit Javascript
into the web page that launchs Excel through OLE Automation, some-
thing like the following [untested] line,

var excel = new ActiveXObject( "Excel.Application");

Script is a superior means of executing code on the client compared
to XSLT style sheets.
Derek Harmon

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Luther Miller | last post by:
I am using an XSLT file to convert data in a DataSet to XMLSS format for opening in Excel. Excel doesn't like the way Dates in the DataSet are being ouput. It appears that a timezone offset is...
7
by: Doug Heeren | last post by:
I have the following section of VB.NET code that transforms a simple dataset into an Excel xml workbook. It works fine for < 50 rows or so, but I have about 8,000 rows I need to transform. Is there...
2
by: Wilson Wu | last post by:
hi, how can i use xslt to transform xml data into excel worksheet ? XML file : <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="test5.xsl"?> <dataroot...
2
by: Fabio Goncalves | last post by:
Hi Guys, I do need to transform some excel spreadsheets into xml files through an automated process. Is it possible to do it using XSLT? Could anybody give me any direction? Cheers, ...
0
by: ronc85 | last post by:
My environment is ASP.NET 2.0, C# and AJAX. I'm having a problem with 'Button Click' logic which is trying to display a Gridview and then use XML/XSLT to build an Excel file. The following code...
2
by: Ch Pravin | last post by:
Hi All: I am having the following xml which i need to convert to excel using xslt. Please help me out. Afghanistan.xml <?xml version="1.0" encoding="utf-16"?> <Languages...
1
by: =?Utf-8?B?R2xlbm4gR29tZXo=?= | last post by:
Does Office Excel 2000 support XSLT transformation of data from XML cause am having problem when the attachment is opened in the client side if the Excels version is in Office 2000 and also its...
0
by: vikasthukral17 | last post by:
Hello Friends i want to convert xml shown under into excel file,xml is as <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="AggrPositions.xsl"?> <DataOut> ...
0
by: vikasthukral17 | last post by:
Hello Friends i want to convert xml shown under into excel file,xml is as <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="AggrPositions.xsl"?> <DataOut>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.