Hello,
I am trying to do an excel formatting using SAS ODS, but this one has put me confused.
SAS Dateset from:
ColA | ColB | ColC | ColD | ColE | ColF | ColG | ColH | ColI | ColJ |
Part1 | Part1 | Part1 | Part1 | Part2 | Part2 | Part2 | Part3 | Part3 | Part3 |
Required output in excel:
Part1 | Part2 | Part3 | |||||||
colA | colB | colC | colD | colE | colF | colG | colH | colI | colJ |
Can someone provide suggestion on how this can be done? I do not need the complete code though, any suggestions on specific method or keywords to be used would be very helpful.
Thanks in advance.
Are you talking about spanning headers (not actually shown, the forum window may have seriously reformatted what you attempted to paste) where the "Part1" would be over ColA, ColB and Colc
+---------------------------------+ | Part1 | +---------------------------------+ | Col A | ColB | ColC | +------------+--------+-----------+
Since I have to assume that ColA, ColB etc are variables in SAS are they all of the same type? All numeric or All character?
I suggest that you fill in your example with a bit more detail, such as do you have more than two rows in the data set now?
Best would be a short data step creating actual values that behave like your data (assuming what you actually have should not be shared).
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 25. 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.