BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Folks,
How would you remove completely the column of row headings (including the box) from the output of a PROC TABULATE? I searched this forum but couldn't find an answer.
For example In my program below, I want sheet 'a' to be identical to sheet 'b'. It's SAS 9.1.3 by the way.

data a;
do _n_=1 to 10;
x=ceil(3*ranuni(1));
y=ceil(4*ranuni(1));
z=ceil(2*ranuni(1));
output;
end;
ods _all_ close;
ods tagsets.excelxp file='c:\data\example.xls' style=minimal options(sheet_name='a');
proc format;
picture mypct(default=7)
0-100='009.99%%'
;
proc tabulate data=a;
class x y z;
table all='', (x y z)*(n='n'*f=1. pctn='%'*f=mypct.)/row=float indent=0;
run;

data b/view=b;
set a nobs=nobs;
retain weight;
if _n_=1 then weight=1/nobs;

ods tagsets.excelxp options(sheet_name='b');
proc report data=b nowd;
column (x--z),(n weight);
define x--z/across format=1.;
define weight/analysis '%' format=percent8.2;
run;
ods _all_ close;
1 REPLY 1
Peter_C
Rhodochrosite | Level 12
If it cannot be suppressed, could you set column 1 hidden?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 1 reply
  • 804 views
  • 0 likes
  • 2 in conversation