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;
The right syntax is:
Proc print data= work.color Label;
Run;
Thank you kindly
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.