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

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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