BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I'm creating *.xml reports using the ODS tagsets.ExcelXP.

I want the numbers to be formatted in 12,345.
However, the number format is not working....all the numbers in *xml are look like 12345.

Example:

PROC TABULATE DATA=TEST ;
CLASS STATE;
VAR RESP;
TABLE STATE ALL,
RESP*SUM=' '*F=COMMA10./RTS=20 MISSTEXT='0' PRINTMISS;
RUN ;

Any suggestions?

Thanks.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
As you have discovered, when you use ODS to create files for Excel to open, Excel generally ignores most of the SAS formats for columns that are numbers. If you want to have Excel format the numbers, such as you show (with a comma between the thousands), you must send a Microsoft format from ODS to Excel.

The method by which you send a Microsoft format is through the use of STYLE= overrides, specifically, for TAGSETS.EXCELXP, the TAGATTR style attribute override. There are many previous forum postings on the use of TAGATTR and this one shows both TAGATTR and has a sample program that shows how the various forms of style overrides in PROC TABULATE will impact which cells (header or calculated data):
http://support.sas.com/forums/thread.jspa?messageID=36690轒

A search of support.sas.com or the forum search should get you more results on the use of TAGATTR with TAGSETS.EXCELXP.

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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