The SAS Output Delivery System and reporting techniques

tagset.excelxp: Leading Zero with an URL

Accepted Solution Solved
Reply
Contributor
Posts: 52
Accepted Solution

tagset.excelxp: Leading Zero with an URL

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

Attachment

Accepted Solutions
Solution
‎08-19-2011 12:26 AM
SAS Super FREQ
Posts: 8,864

Re: tagset.excelxp: Leading Zero with an URL

Posted in reply to KimLeBouton

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

View solution in original post


All Replies
Solution
‎08-19-2011 12:26 AM
SAS Super FREQ
Posts: 8,864

Re: tagset.excelxp: Leading Zero with an URL

Posted in reply to KimLeBouton

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

Contributor
Posts: 52

Re: tagset.excelxp: Leading Zero with an URL

Posted in reply to Cynthia_sas

Thanks Cynthia.

Prior to sending the note, I had tried the url after the tagattr.  It didn't work.

Kim

PROC Star
Posts: 7,468

Re: tagset.excelxp: Leading Zero with an URL

Posted in reply to KimLeBouton

Kim,

Does that mean that you have now solved the problem with Cynthia's suggested code or is it still an issue?

Art

Contributor
Posts: 52

Re: tagset.excelxp: Leading Zero with an URL

It's resolved,

Kim

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 330 views
  • 0 likes
  • 3 in conversation