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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.