BookmarkSubscribeRSS Feed
frisco
Calcite | Level 5
I am giving an end user an export on Excel with labels using tagsets.excelxp - I would like to include variable names for ease of troubleshooting - is this possible? I did not see a post on this, forgive me if the question has already been asked.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
I don't believe there's an automatic option to do it, but you could code it yourself using either the "brute force" method shown below or any number of more automated and/or "macro-ized" solutions to build the text string that represents the label.

cynthia

[pre]
ods tagsets.excelxp file='var_labl.xml' style=sasweb;

proc report data=sashelp.class nowd split='#';
column name age sex height weight;
define name / order 'Name#What Name';
define age /display 'Age#How Old';
define height / display 'Height#How Tall';
define sex / display 'Sex#What Gender';
define weight / display 'Weight#How Heavy';
run;

ods tagsets.excelxp close;


[/pre]

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 770 views
  • 0 likes
  • 2 in conversation