The SAS Output Delivery System and reporting techniques

Insert Pagebreak in ods tagsets.excelxp (.xls file)

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 96
Accepted Solution

Insert Pagebreak in ods tagsets.excelxp (.xls file)

[ Edited ]

Hi All,

 

I want to add page break in xls file, i am using proc tabulate to create output in excel,

I have already tried pagebreaks="yes", pagebreak_row options but i am not able to break that in xls file,

 

I am attaching the desired sample in screenshot.

Capture.JPG

Attachment

Accepted Solutions
Solution
‎08-30-2016 04:54 AM
Frequent Contributor
Posts: 96

Re: Insert Pagebreak in ods tagsets.excelxp (.xls file)

Hey,

 

Finally, I got the solution,

I have done this by using "BY" statement in Proc tabulate,

 

For that, I have created new variable called count,

And this variable change it's value (eg: 1 to 2) after every 6 unique value of my name variable in my scenario,

the reason is that on pdf page it is showing 6 name variable values,

 

So now I have used that variable to add another page,

 

Thanks @Reeza & @ballardw for your help :smileyhappy .

 

Regards,

Kalind

 

 

View solution in original post


All Replies
Grand Advisor
Posts: 16,311

Re: Insert Pagebreak in ods tagsets.excelxp (.xls file)

I don't see an option to insert/manually control the page breaks. 

 

https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html

http://www.sas.com/events/cm/867226/ExcelXPPaperIndex.pdf

 

If your table structure is consistent perhaps using the skip space option can help you space your tables as desired?

Or place them on separate sheets?

 

Note thet the file created is XML even if you're using an Xls extension. 

Frequent Contributor
Posts: 96

Re: Insert Pagebreak in ods tagsets.excelxp (.xls file)

thanks for the reply reeza,

Is there any other procedure then tabulate?
In which i can do this?
Grand Advisor
Posts: 16,311

Re: Insert Pagebreak in ods tagsets.excelxp (.xls file)

It's not clear what you want to accomplish with Proc tabulate.

 

Tagsets doesn't offer the option for page break. It doesn't matter what proc you use within it, this doesn't change. 

Grand Advisor
Posts: 9,713

Re: Insert Pagebreak in ods tagsets.excelxp (.xls file)

From Excel Help: Microsoft Excel inserts automatic page breaks based on the paper size, margin settings, scale options, and the positions of any manual page breaks that you insert. To print a worksheet with the exact number of pages that you want, you can adjust the page breaks in the worksheet before you print it.

 

Since for all intents an purposes page breaks exist in Excel only for printing then there may not be any reason to use Excel. ODS RTF produces printable documents and either ODS RTF or TAGSETS.RTF have somewhat better control of page breaks.

Solution
‎08-30-2016 04:54 AM
Frequent Contributor
Posts: 96

Re: Insert Pagebreak in ods tagsets.excelxp (.xls file)

Hey,

 

Finally, I got the solution,

I have done this by using "BY" statement in Proc tabulate,

 

For that, I have created new variable called count,

And this variable change it's value (eg: 1 to 2) after every 6 unique value of my name variable in my scenario,

the reason is that on pdf page it is showing 6 name variable values,

 

So now I have used that variable to add another page,

 

Thanks @Reeza & @ballardw for your help :smileyhappy .

 

Regards,

Kalind

 

 

Post a Question
Discussion Stats
  • 5 replies
  • 353 views
  • 3 likes
  • 3 in conversation