BookmarkSubscribeRSS Feed
Siwon
Calcite | Level 5
Hello!
First of all, I'm sorry for my poor English.
The column [amt] is 10 decimals,
when exported it comes to 7 decimals.
In EG, 10 decimals.
In Client, 7 decimals.
Do I have to change the setting?
I think there is a way with ods excel, so I tried it, but it says there is no module.
Please let me know the syntax that I can do with proc export.

- sum(amt) / 100000000 as amt format=comma10.10
- proc export data=out.prod_sales
outfile = '/user/product/output'
dbms =xlsx
replace;
sheet=sales_amt;
results(below)
- EG : 1.5211661500
- Client : 1.5211662
2 REPLIES 2
andreas_lds
Jade | Level 19

This could be one of the fancy data optimizations implemented in Excel itself.

But: Are you sure, that you have applied the format comma10.10? If I try to do so, the log displays:

The decimal specification of 10 must be less than the width specification of 10.

Changing the format to comma15.10 fixed the issue.

Kurt_Bremser
Super User

Maxim 2: Read the Log.

It will alert you to the fact that you used an invalid format specification. The number to the left of the dot must accommodate

  • the number to the right
  • the decimal dot
  • an eventual sign
  • at least one digit to z'the left of the decimal dot, but more if your data needs it

I suggest to use 20.10 as a start and see what it does.

SAS Innovate 2025: Register Today!

 

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 555 views
  • 0 likes
  • 3 in conversation