BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KimLeBouton
Quartz | Level 8

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

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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

4 REPLIES 4
Cynthia_sas
SAS Super FREQ

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

KimLeBouton
Quartz | Level 8

Thanks Cynthia.

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

Kim

art297
Opal | Level 21

Kim,

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

Art

KimLeBouton
Quartz | Level 8

It's resolved,

Kim

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 938 views
  • 0 likes
  • 3 in conversation