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

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 641 views
  • 0 likes
  • 2 in conversation