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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

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