Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Components
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components 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
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 6th, 2007, 07:09 AM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to fit all column in 1 page in excel format?

Hi,
I have 8 columns to be printed in Excel format from asp page.
I'm able to print in landscape format but only 7 columns can be fit into 1 page. Is it possible for me to print all columns in 1 page?
this is the code,
Code:
<%
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=List_of_All_Business_Proposal.xls" 
%>
<HTML xmlns:x="urn:schemas-microsoft-com:office:excel">
<HEAD>
<style>
  <!--table
  @page
  {mso-page-orientation:landscape;}
     br
     {mso-data-placement:same-cell;}

  -->
</style>
  <!--[if gte mso 9]><xml>
   <x:ExcelWorkbook>
    <x:ExcelWorksheets>
     <x:ExcelWorksheet>
      <x:Name>List of Business Proposal</x:Name>
      <x:WorksheetOptions>
       <x:Print>
        <x:ValidPrinterInfo/>
       </x:Print>
      </x:WorksheetOptions>
     </x:ExcelWorksheet>
    </x:ExcelWorksheets>
   </x:ExcelWorkbook>
  </xml><![endif]--> 
</HEAD>
any idea? thanx in advance..:)
  #2 (permalink)  
Old February 23rd, 2011, 10:38 AM
Registered User
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the same problem.
Can anyone help?
  #3 (permalink)  
Old February 23rd, 2011, 01:42 PM
Registered User
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the solution. Highlighted in bold:

<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:WorksheetOptions>
<x:DisplayPageBreak/>
<x:FitToPage/>
<x:Print>
<x:FitWidth>1</x:FitWidth>
<x:FitHeight>1000</x:FitHeight>
<x:ValidPrinterInfo/>
<x:VerticalResolution>0</x:VerticalResolution>
</x:Print>
<x:Selected/>
<x:FreezePanes/>
<x:FrozenNoSplit/>
<x:SplitHorizontal>1</x:SplitHorizontal>
<x:TopRowBottomPane>1</x:TopRowBottomPane>
<x:ActivePane>2</x:ActivePane>
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
</x:Pane>
<x:Pane>
<x:Number>2</x:Number>
</x:Pane>
</x:Panes>
<x:DisplayZeros/>
<x:DisplayHeadings/>
<x:DisplayOutline/>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>

http://www2.sas.com/proceedings/sugi30/092-30.pdf
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing fit to page print arnabghosh Javascript How-To 2 July 29th, 2007 05:58 PM
Best Fit Column Width for Datasheets Nadine Access VBA 4 January 28th, 2007 04:45 PM
expanding datagrid to fit to its column text connect2sandeep General .NET 1 August 23rd, 2005 10:59 AM
design (css) doesn't fit in page gilgalbiblewheel CSS Cascading Style Sheets 1 February 25th, 2005 05:20 AM
html page save to excel format mateenmohd Javascript 2 January 17th, 2004 05:48 AM



All times are GMT -4. The time now is 12:47 AM.


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