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

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

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