Hi,
I am using ODS Excel / tagsets.excelxp to generate .xlsx output using SAS.
My code looks like -
proc report data=sashelp.class nowd;
column ('Group 1' sex name age) ('Group 2' height weight) ;
define sex / order 'Gender';
define name / order;
.
.
There are 2 queries on this -
1. I want to have a different background colour for grouped cells 'Group 1' and 'Group 2'. Say BLUE for group1 and RED for group2. Also, the next row would have different colours.
Please let me know how can I do this?
2. I also want to display group 1 and group 2 as GROUPED columns in Excel output.
If I was to do it in excel I would do it as -
Select columns SEX, NAME, AGE
Goto Menu -> Data -> Group -> Group.
This gives me a horizontal line with "-" sign. When it is pressed, these columns are hidden and I see a "+" sign. If i press + then these columns are unhide.
Attached .xlsx file gives more clarity about my desired output.
I want to see this grouping in excel output derived using SAS.
Could you please help me to get this output please ?
Thanks in advance for your inputs.
Thanks,
Ajay Yeola.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: