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
Diamond | Level 26
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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2037 views
  • 2 likes
  • 5 in conversation