Hi,
My code creates an XML based Excel file using ODS. I'd like to format the numeric fields using the format "COMMAw.d". For example,
25431.23 would appear as 25,431.23, if I use the format comma10.2.
I tried various combinations (latest attempt in red font below) but can't seem to figure out. Can you please guide me?
Thank you in advance!
Asim
----------------------------------------------------------------------------------
ods tagsets.excelxp file="&base_dir_path./Output/&booking_month./MapBook/&exportname..xls" style=normal;
ods tagsets.excelxp options(sheet_name="Error-Higher Balance");
PROC PRINT DATA=higher_balance noobs;
var SECU_CUSIP_ID / style={TAGATTR='format:text'};
var issuer_sector;
var IPIECE_CURR_UPB_AMT upb_old change_in_balance / style = {TAGATTR='format#,##0:numeric'};
RUN;
ods tagsets.excelxp close;
I'm not seeing any place you are using the commaw.d format.
Did you try?
format IPIECE_CURR_UPB_AMT upb_old change_in_balance comma10.2;
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!
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.