BookmarkSubscribeRSS Feed
David_Billa
Rhodochrosite | Level 12

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;

 

 

5 REPLIES 5
Patrick
Opal | Level 21

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. ?

David_Billa
Rhodochrosite | Level 12
Actual value is truncated.
Any idea why I see the issue one of the row instead of all rows?
Patrick
Opal | Level 21

Try with guessingrows=max first please.

David_Billa
Rhodochrosite | Level 12

@Patrick I think guessingrows will work when proc import csv but not excel. I need to import excel file with multiple sheet. 

Patrick
Opal | Level 21

@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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 5 replies
  • 4209 views
  • 0 likes
  • 2 in conversation