Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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
 
Old December 14th, 2006, 04:39 AM
Registered User
 
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old December 14th, 2006, 05:46 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

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
 
Old December 14th, 2006, 06:01 AM
Registered User
 
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.



 
Old December 14th, 2006, 06:23 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

So where exactly is the difficulty?

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old December 14th, 2006, 06:36 AM
Registered User
 
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old December 14th, 2006, 06:58 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

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
 
Old December 14th, 2006, 07:09 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
 
Old December 14th, 2006, 08:20 AM
Registered User
 
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?






Similar Threads
Thread Thread Starter Forum Replies Last Post
set IE PageSetup (Landscape) msbsam ASP.NET 2.0 Basics 0 October 21st, 2007 07:11 AM
how we can set background color in xslt abhi.prince4u XSLT 2 July 4th, 2007 02:22 AM
How to set the print properties of excel with vb6 wyq1234 Visual Basic 2005 Basics 0 July 5th, 2006 10:09 AM
set default for report to legal and landscape Loralee Access 2 November 28th, 2004 03:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.