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;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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