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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 673 views
  • 0 likes
  • 2 in conversation