 |
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

December 14th, 2006, 04:39 AM
|
Registered User
|
|
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to set the excel page to landscape using XSLT?
I have converted a XSLT file to an excel file. My problem is, i want the default page format as landscape.
Anyone know how to set the microsoft excel page to landscape using XSLT? Or any others way to do it? Thx in advance.
|

December 14th, 2006, 05:46 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
If you know what output XML you want to produce, I can help you write the XSLT to produce it. If you don't know, then you would be better asking in an Excel forum.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|

December 14th, 2006, 06:01 AM
|
Registered User
|
|
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This is my sample XML output:
<?xml version="1.0" encoding="UTF-8"?>
<RPTDATA>
<APP>
<description>Adverse Check</description>
<totalDeviationApp>3</totalDeviationApp>
<percentage>1</percentage>
<dateFrom/>
<dateTo/>
</APP>
<APP>
<description>DSRP</description>
<totalDeviationApp>3</totalDeviationApp>
<percentage>1</percentage>
<dateFrom/>
<dateTo/>
</APP>
</RPTDATA>
I appreciate your help. Thx in advance.
|

December 14th, 2006, 06:23 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
So where exactly is the difficulty?
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|

December 14th, 2006, 06:36 AM
|
Registered User
|
|
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I can transform the XSLT file to excel output file and it displays in landscape view. The problem is, if i select the menu File -> Print Setup in MS Excel file, the page setup is default to portrait instead of landscape. I want it defaulted to landscape. Is there possible to make it? Thx.
|

December 14th, 2006, 06:58 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
I'm sure that if you set up your XML file with the right information then it's possible. But you need to ask on an Excel forum what the magic settings are - it's not an XSLT question.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|

December 14th, 2006, 07:09 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Surely this is empirically deducible? Save the Excel file as XML with it set to portrait and then again as landscape. A comparison of the two files should elicit the necessary information.
--
Joe ( Microsoft MVP - XML)
|

December 14th, 2006, 08:20 AM
|
Registered User
|
|
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I tested and i found that even i set the page to landscape in XSLT(mso-page-orientation:landscape;), if the user pc's MS Excel is defaulted to portrait, MS Excel will auto cut off this line(mso-page-orientation:landscape;). That's why page setup for excel file is always portrait. So, i need to force the MS Excel page setup defaulted to landscape. But how to make it?
|
|
 |