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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 682 views
  • 0 likes
  • 2 in conversation