BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vandhan
Fluorite | Level 6

Hi,

 

i have a varible in dataset named "name"

 

I'm listing name variable in excel file.

 

name

 

abc

bca

cbd

 

NOw I want to supress variable in excel file.

 

like 

 

(name) name should be supressd and values should be printed as same in dataset.

 

please help..

 

I have given black label in proc print. but im getting variable name in colum of excel file.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
proc export data=sashelp.class outfile='/folders/myfolders/adae.xls' dbms=xls replace; putnames=no; run; If you are using PROC REPORT, you can use : proc report data=sashelp.class nowd noheader;

View solution in original post

5 REPLIES 5
Reeza
Super User

You can use a format, but I don't understand your requirement for suppression. Can you show an example?

vandhan
Fluorite | Level 6
dataset look like:


name

abc
cba
xyz




excel file


(blanck column name)
abc
cba
xyz



but currently I'm getting as it is in dataset.

name
abc
cba
xyz

when i apply black label for this 'name' variable .. im getting variable
name in column of excel.

##- Please type your reply above this line. Simple formatting, no
attachments. -##
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Something like:

ods tagsets.excelxp file="s:\temp\rob\temp.xml";
data a;
  name="abc"; output;
  name="def"; output;
run;
proc report data=a nowd;
  columns name;
  define name / " ";
run;
ods tagsets.excelxp close;
Cynthia_sas
SAS Super FREQ
You can also use the NOHEADER option in PROC REPORT to do the same thing.
cynthia

proc report data=a nowd noheader;
columns name;
run;
Ksharp
Super User
proc export data=sashelp.class outfile='/folders/myfolders/adae.xls' dbms=xls replace; putnames=no; run; If you are using PROC REPORT, you can use : proc report data=sashelp.class nowd noheader;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 1134 views
  • 2 likes
  • 5 in conversation