Hi,
I want to print all BY groups in single ODS EXCEL sheet. But here each BY group should differentiate with 'Title' on same page.
Example: In sashelp.class, SEX='M' and 'F'. So, both 2 groups should print on the same ODS.excel sheet.
I am using ODS tagsets.excelXP options(sheet_name=);
I am trying to create a macro on this.
Thanks.
Your post is confusing. Are you using ODS EXCEL or Tagsets.ExcelXP
How/Where do macros come in?
If tagsets are being used, set sheet_imterval='none' and use PROC REPORT/PRINT to display your data as desired.
Why are you trying to create a macro when you don't even seem to know what yuo want to do? This is the number 1 reason why 99% of macros are a total waste of disk space and get deleted as soon as I see them. If your developing code for use across programs, departements, comapnies even, then you should be following the principals of software development lifecycle. Firstly you would create your functional design specification which woud detail purpose, inputs, outputs, testing etc. In this document you would detail requirements, such as whether or not to use ods.excel technology, or ods tagsets technology.
To answer you other question, if you are using tagsets.excelxp then then quick reference sheet really helps:
https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html
Look at embedded_titles, and sheet_interval="none" options.
Hi:
I would recommend trying something like this code before you try using macro code. Sheet_interval='none' was designed to do what you describe (putting multiple outputs like BY groups in one sheet).
cynthia
ods tagsets.excelxp file="c:\temp\bygroup_one_sheet.xml"
options(sheet_interval='none');
proc print data=sashelp.class; by age;
where age in (12, 13, 14);
run;
ods tagsets.excelxp close;
Hi:
It seems you posted a similar question in a different forum. I posted an updated version of this program over in that location
But, I am also posting the screen shot here.
cynthia
Thank you Cynthia.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.