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 2025: Call for Content

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!

Submit your idea!

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
  • 1522 views
  • 0 likes
  • 3 in conversation