11-29-2016 08:02 AM
Hi All ,
I am trying to read an excel file into SAS with character variables having more than 10 decimal places and some of the cells has exponential values like 4.658535495689E-2, but after the excel is read i can see the decimal values in dataset only till 6 or 7th position only, but i want the complete decimal value to be displayed in the SAS dataset.There is no issue with the Length also, as some of the values are getting read completely ,but not all. Any options/methods to read the complete decimal values. Tried with inflie , libname statement also but could not retrieve all the decimal values from excel.
Some of the values present in excel are as below.
Below is the sample code used to retrieved.
proc import datafile="&path/&fname.xlsx"
dbms = xlsx out= data_ replace;
getnames = yes;
Any suggestions how to retrieve the complete decimal values from excel to SAS dataset.
11-29-2016 08:06 AM
Be aware that SAS works with 8-byte real numbers, which means that the precision is restricted to around 15 decimal digits.
Assign a long enough format like best32. so you can see all digits present in SAS.
11-29-2016 09:48 AM
Run Proc Contents on the resulting data set to see the format. Likely it will be BEST8. The values are likely therr, barring more than 15 decimals just not displaying. If you really care to see that many decimals change the formats to something you preferr like BEST32. of F24.16 or such.