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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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