BookmarkSubscribeRSS Feed
Bill
Quartz | Level 8
I have a pgm that outputs 4 proc tabulates into one Excel file via ods html file=xl; The beauty of it is that html outputs have no page breaks so that these 4 tables can actually be printed from excel on one page. I'd like to be able to do the same one page arrangement but produce it as a pdf file. PDF is page oriented so the job shows up as 4 pages instead of one. Is there a way to eliminate the page breaks between the proc tabulates?
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
Look at the documentation of ODS PDF option STARTPAGE:
[pre]
ods pdf file='wombat.pdf' startpage=no;
[/pre]

Also, a clarification on something you said:
4 proc tabulates into one Excel file via ods html file=xl;

When you use ODS HTML, you are NOT creating an Excel file. You are only creating an HTML file (with HTML markup tags) that Excel knows how to open and render. If you do this:
[pre]
ods html file='c:\temp\wombat.xls';
[/pre]

The file extension does not mean that you are creating an Excel file in true, proprietary Excel format. You are fooling the Windows registry into opening Excel when you double click on the icon for the above file. That's because Windows associates Excel with the file extension of .XLS -- if you did something different, call the file
[pre]
ods html file='c:\temp\wombat2.html';
[/pre]

you would launch a browser when you double-clicked on the icon for this file. However, if you open Excel and do a File--> Open from inside Excel, then Excel would open the HTML file just fine.

cynthia

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2115 views
  • 0 likes
  • 2 in conversation