I'm so close.
With tagset.excelxp, I have a multisheet workbook with a summary worksheet that links to other worksheets, via style(data)={url=$linkcreated earlier} on a var statement with PROC PRINT. The problem is that this variable is a character with a leading zero. It's almost like I need to be able to use style(data)={tagattr="format:@"} along with the other style statement.
My mocked up code is attached. I tweaked the class data set to mimic my current situation.
Thanks so much for any hints,
Kim LeBouton
Hi:
I think you're right...in the statement where you use the format for URL, I think you also need TAGATTR. Something like:
var char_gender/ style(data)={url=$genderlink. tagattr="format:@"} ;
Otherwise, Excel gets the 01 and 02 and, even though you have it as a character variable in SAS, when Excel sees it, it decides that you must, of course, mean for the 01 to be displayed as 1 and the 02 as 2. The purpose of the TAGATTR format is to send a MICROSOFT format instruction to Excel for how the column should be treated by Excel. Annoying, but understandable.
cynthia
Hi:
I think you're right...in the statement where you use the format for URL, I think you also need TAGATTR. Something like:
var char_gender/ style(data)={url=$genderlink. tagattr="format:@"} ;
Otherwise, Excel gets the 01 and 02 and, even though you have it as a character variable in SAS, when Excel sees it, it decides that you must, of course, mean for the 01 to be displayed as 1 and the 02 as 2. The purpose of the TAGATTR format is to send a MICROSOFT format instruction to Excel for how the column should be treated by Excel. Annoying, but understandable.
cynthia
Thanks Cynthia.
Prior to sending the note, I had tried the url after the tagattr. It didn't work.
Kim
Kim,
Does that mean that you have now solved the problem with Cynthia's suggested code or is it still an issue?
Art
It's resolved,
Kim
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.