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;
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.
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.