Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with Page Orientation of Excel Workbook While Streaming MIME Content

Problem with Page Orientation of Excel Workbook While Streaming MIME Content


Hi,
I'm trying to customize print settings while streaming HTML content into
Excel. I'm using ASP.NET 1.1 and Excel 2003.
While some printer settings like Margins are working correctly, I cannot
change the Page Orientation to Landscape: mso-page-orientation:landscape;.
I tried to produce the Excel Page, save it as HTML, open in text editor and
then copy and paste Excel generated settings. But it did not help.
If anybody resolved this problem before please respond. Your reply is
greatly appreciated.
I'm setting content type as following:
Response.Clear()

Response.Charset = ""

Response.ContentType = "application/vnd.ms-excel"

Response.AddHeader("Content-Disposition", "attachment;
filename=CampaignReports.xls")

And then using <style and XML tags to change the settings:



<style

<!--table

{mso-displayed-decimal-separator:"\.";

mso-displayed-thousand-separator:"\,";}

@page

{margin:1.0in .5in 1.0in .5in;

mso-header-margin:.5in;

mso-footer-margin:.5in;

mso-page-orientation:landscape;}

tr

{mso-height-source:auto;}

col

{mso-width-source:auto;}

br

{mso-data-placement:same-cell;}

--

</style

<!--[if gte mso 9]<xml

<x:ExcelWorkbook

<x:ExcelWorksheets

<x:ExcelWorksheet

<x:NameCampaignReports 1 </x:Name

<x:WorksheetOptions

<x:Print

<x:ValidPrinterInfo/

<x:Scale75</x:Scale

<x:HorizontalResolution1200</x:HorizontalResolution

<x:VerticalResolution1200</x:VerticalResolution

</x:Print

<x:Selected/

<x:DoNotDisplayGridlines/

<x:ProtectContentsFalse</x:ProtectContents

<x:ProtectObjectsFalse</x:ProtectObjects

<x:ProtectScenariosFalse</x:ProtectScenarios

</x:WorksheetOptions

</x:ExcelWorksheet

</x:ExcelWorksheets

<x:WindowHeight8700</x:WindowHeight

<x:WindowWidth15195</x:WindowWidth

<x:WindowTopX0</x:WindowTopX

<x:WindowTopY120</x:WindowTopY

<x:ProtectStructureFalse</x:ProtectStructure

<x:ProtectWindowsFalse</x:ProtectWindows

</x:ExcelWorkbook

</xml<![endif]--



Thanks,



Yelena


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
Page layout/ orientation problem slb0530 Setting up and Configuration of Excel 1 February 7th 10 07:08 PM
Excel Page orientation Sam Excel Worksheet Functions 1 August 1st 08 09:14 PM
what is the page orientation in Excel and how do you change it? TDWilliams New Users to Excel 1 June 11th 05 02:30 AM
sending HTML content with Excel MIME type bill Excel Programming 0 September 21st 04 02:12 AM
mso-page-orientation asp excel avs Excel Programming 0 October 23rd 03 04:01 PM


All times are GMT +1. The time now is 06:51 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"