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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1471 views
  • 0 likes
  • 2 in conversation