Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODS to Excel page size

Status
Not open for further replies.

nirmalraj

MIS
Apr 20, 2005
33
US
Hi All,

Is there a way method to reduce the page size when creating output on excel using ODS.Say I have 10 columns and want to see all 10 columns. Can I reduce the percentage of page size driving from SAS.

Any suggestions would be great.

- Raj
 
Indeed you can. Are you using the ExcelXP tagset? IF so, you use the options as follows (scale being the one that changes the size...)
Code:
ods tagsets.excelxp file="C:\reports\xxxx.xls"
    options(absolute_column_width='32,10,10,10,8,8,8,8,8,8,8,8,8,8'
            row_repeat='header'
            embedded_titles='yes'
            frozen_headers='yes'
            scale='100' 
            orientation='landscape'
            sheet_name='Report'
           )
  style=styles.<mystylesheet>
   ;
proc report....
 ....
run;
ods tagsets.excelxp close;
If you aren't using the ExcelXP tagset, then I heartily recommend that you do.
Go to support.sas.com, search for ExcelXP and download the latest version of the tagset and see how you go.
There's further discussion of the tagset here:-

Enjoy.
 
As a tip, I find the best way to set up the size is to first play with the column sizes and get those working exactly as I want them. Then, once the layout is good, open the excel spreadsheet and go to File > Page Setup and select the "Fit to page" and click OK. Then go back to File > Page Setup and the number in the "Adjust to..." box is the scale factor that you want to use. This is for printing out.
If you're just interested in displaying on the screen, you can also use the "zoom=" option to change what is displayed. I'd follow a similar method to fixing the scale, get everything laid out correctly, then fit the page to your screen and copy that zoom number over to your SAS program.
 
Thanks Chris.I do not use tagsets.I might try them in future but I like the "zoom =" option. let me try that and see what happens.

 
Thanks Chris. I did try using excel tagset and it did work.Also SAS institute gave me a similar code that you have here. So its all good as long as its working.

Thanks!!!
Raj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top