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

Hello, 

 

I am using the Proc statement below to import an excel sheet into SAS. Then I used the data set to change the labels. I can see the labels are changed in proc contents but the labels will not show in the output or with the print proc. Is there something I am missing or could I have done the label statement in the proc import statement. Thank you!

 

Proc import 
	datafile= "/folders/myfolders/color.xlsx"
	out= work.color
	dbms= XLSX replace;
Run;
Data work.color; 
set work.color;
Label Region = "Geographic Region"
		Eyes = "Eye Color"
		Hair = "Hair Color";
Proc print data= work.color;
Label;
Run;
Proc contents data =work.color;

proc options option=label;
run;
option label;
1 ACCEPTED SOLUTION

Accepted Solutions
Shmuel
Garnet | Level 18

The right syntax is:

Proc print data= work.color Label;
Run;

View solution in original post

2 REPLIES 2
Shmuel
Garnet | Level 18

The right syntax is:

Proc print data= work.color Label;
Run;
petergomillion
Obsidian | Level 7

Thank you kindly

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 2095 views
  • 1 like
  • 2 in conversation