Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing to Landscape mode automatically

I am trying to use HTML/XML to import an HTML report into Excel 2002.
I am having problems setting up the worksheet so it will print in
landscape mode. I want to use XML since I ultimately want to create
one workbook with several worksheets.

I can get most of my formatting done, but I can't change to landscape.
I think the "mso-page-orientation" should work, but it doesn't. What
is even more confusing is that the report will be landscape if I open
the report in Excel, but it isn't if I have the HTML/XML program open
it.

Here is the HTML/XML code I want to use to read in the HTML report.
This file is saved with an "XLS" extension.

<html xmlns:x="urn:schemas-microsoft-com:office:excel"
<head
<meta http-equiv=Content-Type content="text/html;
charset=windows-1252"
<meta name="Excel Workbook Frameset"
<titleReport Title</title
<xml
<x:ExcelWorkbook
<x:ExcelWorksheets
<x:ExcelWorksheet
<x:NameHTML Report</x:Name
<x:WorksheetSource HRef="h:\test2.html" /
</x:ExcelWorksheet
</x:ExcelWorksheets
</x:ExcelWorkbook
</xml
</head
<body</body
</html


Here is the HTML report I want to import. It's name is test2.html and
is read by the previous file.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"

<head
<meta http-equiv=Content-Type content="text/html;
charset=windows-1252"
<meta name=ProgId content=Excel.Sheet
<meta name=Generator content="Microsoft Excel 10"
<titleOutput</title

<style
<!--table
table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
@page
{margin:.25in .25in .25in .25in;
mso-header-margin:.25in;
mso-footer-margin:.25in;
mso-page-orientation:landscape;
mso-horizontal-page-align:center;
mso-vertical-page-align:center;}
--
</style
<!--[if gte mso 9]<xml
<x:ExcelWorkbook
<x:ExcelWorksheets
<x:ExcelWorksheet
<x:WorksheetOptions
<x:FitToPage/
<x:Print
<x:ValidPrinterInfo/
<x:HorizontalResolution600</x:HorizontalResolution
<x:VerticalResolution600</x:VerticalResolution
</x:Print
<x:Selected/
</x:WorksheetOptions
</x:ExcelWorksheet
</x:ExcelWorksheets
</x:ExcelWorkbook
</xml<![endif]--
</head

<body link="#0066CC" vlink="#003366" class=xl24 leftmargin=8
rightmargin=8

<TABLE cellspacing=1 cellpadding=1 rules=NONE frame=VOID border=0
width=100% bgcolor="#E0E0E0"
<TR
<TD ALIGN=CENTER bgcolor="#E0E0E0" colspan=3<font face="Arial,
Helvetica, Helv" size="5" color="#002288"<b<iTest HTML in Excel -
Worksheet #1</i</b</font</TD
</TR
</TABLE
</font</CENTER
<P
<CENTER
<font face="Arial, Helvetica, Helv" size="3" color="#002288"
<TABLE cellspacing=1 cellpadding=7 rules=GROUPS frame=BOX border=1
bgcolor="#F0F0F0" bordercolor="#000000"
<thead
<TR
<TD ALIGN=CENTER bgcolor="#B0B0B0"<font size="4"
color="#0033AA"<bObs</b</font</TD
<TD ALIGN=CENTER bgcolor="#B0B0B0"<font size="4"
color="#0033AA"<bCountry</b</font</TD
<TD ALIGN=LEFT bgcolor="#B0B0B0"<font size="4"
color="#0033AA"<bCity</b</font</TD
</TR
</thead
<tbody
<TR
<TD ALIGN=RIGHT bgcolor="#B0B0B0"<font size="3"
color="#0033AA"1</font</TD
<TD ALIGN=LEFT bgcolor="#D3D3D3"<font size="3"
color="#000000"Australia</font</TD
<TD ALIGN=LEFT bgcolor="#D3D3D3"<font size="3"
color="#000000"Sydney</font</TD
</TR
<TR
<TD ALIGN=RIGHT bgcolor="#B0B0B0"<font size="3"
color="#0033AA"2</font</TD
<TD ALIGN=LEFT bgcolor="#D3D3D3"<font size="3" color="#000000"New
Zealand</font</TD
<TD ALIGN=LEFT bgcolor="#D3D3D3"<font size="3"
color="#000000"Queenstown</font</TD
</TR
<TR
<TD ALIGN=RIGHT bgcolor="#B0B0B0"<font size="3"
color="#0033AA"3</font</TD
<TD ALIGN=LEFT bgcolor="#D3D3D3"<font size="3"
color="#000000"United States</font</TD
<TD ALIGN=LEFT bgcolor="#D3D3D3"<font size="3"
color="#000000"Denver</font</TD
</TR
</tbody
</TABLE

</body

</html

Can anybody tell my why it won't go to landscape when I use the
HTML/XML program? Or can anybody suggest an alternative to getting
landscape to work?

Thanks for your help.
Joe McCormick
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
All-in-one printing incompatibility with EXCEL in landscape mode ccorley New Users to Excel 3 September 23rd 09 04:17 PM
half page extra blank in Landscape mode PRINTING Dan Excel Discussion (Misc queries) 2 February 9th 09 02:37 PM
half page extra blank in Landscape mode PRINTING Dan Excel Discussion (Misc queries) 0 February 9th 09 01:49 PM
Why can't I switch to landscape mode? otr-beader Excel Discussion (Misc queries) 2 January 23rd 09 01:47 PM
ofice 2003 powerpoint does not print in landscape mode Baffled_Bill Excel Discussion (Misc queries) 2 January 15th 05 05:59 PM


All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"