The SAS Output Delivery System and reporting techniques

Excelxp - currency style

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

Excelxp - currency style

I would like to have some of the fields in my excel output formatted as currency and I need them to be formatted w/ 4 digits after the decimal point.  How would I go about that?  I tried this...

var billamt/ style={tagattr='format:Currency'];

...but I don't know how to indicate I want 4 digits after the decimal point rather than just 2.

Thanks!


Accepted Solutions
Solution
‎11-18-2011 09:36 AM
SAS Super FREQ
Posts: 8,742

Re: Excelxp - currency style

Hi:

  This is how I would do it. Excel shows me 4 decimal places for sales and 2 decimal places for returns.

cynthia

ods tagsets.excelxp file='c:\temp\currency.xml'

    style=sasweb;

  

  proc report data=sashelp.shoes nowd;

    column product sales returns;

    define product / group;

    define sales / style(column)={tagattr='$#,##0.0000'};

    define returns / style(column)={tagattr='$#,##0.00'};

  run;

  

ods _all_ close;

View solution in original post


All Replies
Solution
‎11-18-2011 09:36 AM
SAS Super FREQ
Posts: 8,742

Re: Excelxp - currency style

Hi:

  This is how I would do it. Excel shows me 4 decimal places for sales and 2 decimal places for returns.

cynthia

ods tagsets.excelxp file='c:\temp\currency.xml'

    style=sasweb;

  

  proc report data=sashelp.shoes nowd;

    column product sales returns;

    define product / group;

    define sales / style(column)={tagattr='$#,##0.0000'};

    define returns / style(column)={tagattr='$#,##0.00'};

  run;

  

ods _all_ close;

Occasional Contributor
Posts: 16

Re: Excelxp - currency style

Perfect.  Thanks!

☑ This topic is SOLVED.

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

Discussion stats
  • 2 replies
  • 114 views
  • 0 likes
  • 2 in conversation