The SAS Output Delivery System and reporting techniques

can excelXP have BOTH column headings(labels) and variable name?

Reply
Contributor
Posts: 53

can excelXP have BOTH column headings(labels) and variable name?

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.
SAS Super FREQ
Posts: 8,862

Re: can excelXP have BOTH column headings(labels) and variable name?

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]
Ask a Question
Discussion stats
  • 1 reply
  • 126 views
  • 0 likes
  • 2 in conversation