BookmarkSubscribeRSS Feed
saspert
Pyrite | Level 9
Hello,
I have a rather specific requirement. When I use Proc report to group by variables, I get an output that has the cell borders for each of the rows belonging to a group by variables. Is it possible to merge all the cells in Excel and PDF?

If I have this code-

proc report;
column A B C D;
define A / group;
define B / group;
define C / group;
define D / display;
run;

In the output, the cells below each unique value of A and B are blank. I need these cells to merge into 1 cell. Hope my explanation make sense. My diagrams over here dont look good.

Thanks,
saspert
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
I'm not sure what you mean when you say that you are using "Proc report to group by variables", since there was no BY statement in your code snippet.

However, if you look at the SPANROWS option (it goes on the PROC REPORT statement), in some destinations, it will cause row spanning, as you describe.
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473620.htm

I know that it will work for PDF. Whether it will work for Excel depends on whether you are using ODS CSV, ODS MSOFFICE2K, or ODS TAGSETS.EXCELXP to create output files that Excel can open.

cynthia
Ksharp
Super User
Maybe you need to make a computed variable and use cats() function to "need these cells to merge into 1 cell".


Ksharp

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!

How to Concatenate Values

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.

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
  • 2 replies
  • 1277 views
  • 0 likes
  • 3 in conversation