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

All I seem to be able to get is the raw numbers.  I'm trying to get the sum to show up like currency with Dollars and commas (at least commas) and the pctsum to show up like a percent.

I can get the commas with tagattr or I can get the percent without tagattr, but I can't find a way to get both.  Any help?

ods listing;title;

options missing = '';

ods tagsets.excelxp

file= "c:\junk.xls"

    style=normal

    options (SHEET_INTERVAL="NONE");

ods tagsets.excelxp    options (Sheet_Name = "Portfolio");

proc tabulate data=delq1 missing;

class portfolio monthend delq;

var totalbalance;

      tables  (portfolio='' all='')*(

      totalbalance = "Balance" *sum='' *f=comma24.0

      totalbalance = "Rate" *colpctsum='' *f=percent24.2

),(delq='' all) ,(monthend='')

/

box = '' row=float;     format delq delq.;

run;

ODS TAGSETS.EXCELXP CLOSE;

1 ACCEPTED SOLUTION

Accepted Solutions
wcpatton
Calcite | Level 5

Got it already.  Posting for future searchers.  Trick was specifying style..

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

    style=sasweb

    options (SHEET_INTERVAL="NONE"

             absolute_column_width = '14,11,6,6,6,6,6,6,6,6,6,6,6,6,6'

             embedded_titles='yes'

             TAGATTR="format:excel-format"

             fittopage='yes'

             orientation='Landscape');

proc tabulate data=delq1 missing;

class portfolio monthend cycledelinquency;

var totalbalance ;

      tables  (portfolio='' all='')*(

      totalbalance = "Balance" *sum='' *f=comma24.0 *{style={tagattr="format:###,###,###"}}

      totalbalance = "Rate" *colpctsum='' *f=pct.

),(cycledelinquency='' all) ,(monthend='')

/

box = '' row=float;     format cycledelinquency delq.;

run;

ods _all_ close;

View solution in original post

1 REPLY 1
wcpatton
Calcite | Level 5

Got it already.  Posting for future searchers.  Trick was specifying style..

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

    style=sasweb

    options (SHEET_INTERVAL="NONE"

             absolute_column_width = '14,11,6,6,6,6,6,6,6,6,6,6,6,6,6'

             embedded_titles='yes'

             TAGATTR="format:excel-format"

             fittopage='yes'

             orientation='Landscape');

proc tabulate data=delq1 missing;

class portfolio monthend cycledelinquency;

var totalbalance ;

      tables  (portfolio='' all='')*(

      totalbalance = "Balance" *sum='' *f=comma24.0 *{style={tagattr="format:###,###,###"}}

      totalbalance = "Rate" *colpctsum='' *f=pct.

),(cycledelinquency='' all) ,(monthend='')

/

box = '' row=float;     format cycledelinquency delq.;

run;

ods _all_ close;

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
  • 1 reply
  • 3593 views
  • 0 likes
  • 1 in conversation