Chris,
I decided to check out the excelxp tagset, and really like the options on it including printing to multiple tabs, being able to include formatting options within proc tabulate and proc report, controlling excel's page set-up within sas, etc. Of course, when we get what we want, we want more! I have been using proc tabulate and the by group statement to write several tables to excel. I know how to write the value of the variable in the title in each sheet. However, I can't figure out how to write the value of the variable as the sheet name. Do you know if this is possible?
Here is an example of my code:
option missing = '' nobyline;
ods tagsets.excelxp file="test.xls"
style = uaOIRA
options(embedded_titles='yes'
sheet_name='Retention'
suppress_bylines = 'yes');
proc tabulate data=new_groups;
format grp $grp.;
class grp ok1st;
var act hc adhc excl ok2nd ok3rd/ style=[just=c];
table ok1st='',
act*mean=''*[style=[tagattr='format:#,##0.0']]
(hc excl adhc)*sum=''
(ok2nd ok3rd)*(sum='No.'* pctsum<adhc>='%')
/ box=[label='Fall' style=[vjust=t just=c ]];
by grp;
title3 'Retention and Graduation Data for #byval(grp) Majors';
run;
ods tagsets.excelxp close;
The tab names come up as "Retention", "Retention 2", ...
I would love to be able to put the value of the groups on the tabs so that it is easy to get to the needed data. Any suggestions? Thanks so much! You are awesome on this forum! I've used lots of your posts!
Thanks in advance!
Christine
PS - I just read your tech tips on problem solving, and I see that I should have posted my answer to my previous question when I found it so that other people wouldn't waste their time. I am totally on that now! Maybe I will figure this one out.