BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm using ods tagsets.excelxp. When I tried to output a variable with the format 5.2, I got 0.00.

Here is the logic:
proc print data=test;
var frate/style={tagattr='format:#0.00'};
run;

I've also tried
var frate/style={tagattr='format:Currency'};

just to see if that will work since I saw so many examples in published paper, but I got '$ - '.

I do have the latest ExcelXP, and the other options are all working fine. Any clue?

Thanks!
3 REPLIES 3
Eric_SAS
SAS Employee
Is the value truly a number?
What is the sas format for that variable?

It looks like the type is wrong and your value is invalid.

You may need to add type:Number to your tagattr settings.
deleted_user
Not applicable
Yes, frate is a number (ratio indeed).

I changed the statement to:
var frate/style={tagattr='type:Number format:#0.00'};

There is no error message in my log but I could not even load the XML to Excel now.

Please advise, and thanks!!
Eric_SAS
SAS Employee
In your original output, without the type, Can you find the
tags that are for that value?

I would like to know what the XML looks like, that the value would show up
as - or 0.00.

It doesn't make any sense. Also, if you could email me directly I will send
you a new tagset. I haven't had the chance to put it on the web yet so you
can't get it unless I send it to you. Eric.Gebhart@sas.com

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