BookmarkSubscribeRSS Feed
SAS09
Calcite | Level 5
Does anyone if Proc report can create excel reports with the following conditions.

1. Create one spreadhseet per name in final dataset.
2. Create multiple tabs per workbook based certain criteria.
3. Password protect each workbook.
4. Within each worksheet create pagebreaks based on cetain criteria.
5. Fit to one page.

I currently use a sas macro to generate one spreadsheet per sales associate and then use Excel macro to format and create the multiple tabs as well as the page breaks, formatting etc.

Any thoughts would be greatly appreciated!
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
1) yes, using tagsets.excelxp (using the NEWFILE= option)
2) yes, using tagsets.excelxp (the code below creates one sheet for every name in sashelp.class)
3) I do not believe this is possible with SAS
4) tagsets.excelxp has some printing/print area instructions
5) tagsets.excelxp has some printing/ print area instructions

Look at the doc=help output in the SAS Log for 4 & 5 info. You may still need an Excel macro depending on the formatting you want/need to do.

cynthia
[pre]
proc sort data=sashelp.class out=class;
by name;
run;

ods tagsets.excelxp file='testout.xml'
options(doc='Help');
proc print data=class;
by name;
run;
ods tagsets.excelxp close;
[/pre]

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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