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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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