I'm trying to Import below data from .xls file, but after the Import one of the value is not imported correctly as it was in the file.
Could you please help me understand why the value 0,0086419468 is truncated to 0,0086419 after Import? I was adivised to use only proc Import, so looking for a solution in the same.
Value
0,4722918040
0,0086419468
After Import, I got the data as
Value
0,472291804
0,0086419
Code which I used is,
PROC IMPORT OUT= WORK_OUTPUT1 DATAFILE= EXCEL_INPUT DBMS=xls REPLACE; SHEET=SHEET; GETNAMES=NO; MIXED=YES; RUN;
I'd be adding guessingrows=max
Is the actual value truncated or is it just a display issue. Have you tried printing with format 32. ?
Try with guessingrows=max first please.
@Patrick I think guessingrows will work when proc import csv but not excel. I need to import excel file with multiple sheet.
@David_Billa Yes, you're right. Then I don't know. If it's a one-off then I'd just save the file as XLSX and import this one.
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.