I would like my data that is created in SAS to be imported into Excel rounded to two decimal places, I tried with proc export, now by ods excel, but still the numbers have many decimal places. these are my codes
proc sql; create table COREP_CR_&gv_tbl_date as select distinct a.DATA_DANYCH as REPORTING_DATE, "" as ID, sum(a.EXP_PIERWOTNA_NETTO) as EAD_PRE_CCF format=9.2, sum(a.KOREKTA) as PROVISION format=9.2, group by a.EXP_PIERWOTNA_NETTO a.KOREKTA ; quit; ods excel file="&glb_path2./reports/mth_ak/COREP_CR_&gv_tbl_date..xlsx" ; proc print data=COREP_CR_&gv_tbl_date; run; ods excel close;
Formats do not round, thy just "display rounded".
Use Round() function, e.g.
round(sum(a.EXP_PIERWOTNA_NETTO), 0.01)
Bart
Formats do not round, thy just "display rounded".
Use Round() function, e.g.
round(sum(a.EXP_PIERWOTNA_NETTO), 0.01)
Bart
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: