BookmarkSubscribeRSS Feed
nemezies
Calcite | Level 5

Hi, I'm new to this. Please help me.

 

I'm trying to proc import like this:

proc import datafile='/folders/myfolders/desksas.xls' dbms=xls
out=work replace;
sheet='desksas';
getnames=yes;
run;

but when I run it, the log result I got is like this:

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         proc import datafile='/folders/myfolders/desksas.xls' dbms=xls
 74         out=work replace;
 75         sheet='desksas';
 76         getnames=yes;
 77         run;
 
 Spreadsheet isn't from Excel V5 or later.  Please open it in Excel and Save as V5 or later
 Requested Input File Is Invalid
 ERROR: Import unsuccessful.  See SAS Log for details.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 78         
 79         
 80         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 92         

Can somebody help me with this?

4 REPLIES 4
qoit
Pyrite | Level 9
It looks like that SAS is telling you "Spreadsheet isn't from Excel V5 or later. Please open it in Excel and Save as V5 or later". If excel doesn't work, can you save as a CSV and try the IMPORT procedure with DBMS = CSV?
Kurt_Bremser
Super User

Open the workbook file in Excel and save it to CSV (so you can read it with a data step) or at least XLSX, so you can read it with the more modern and platform-independent XLSX engine.

Amir
PROC Star

Hi @nemezies,

 

Are you having the same problem as found in the below post, where it looks like the file name extension had been changed?

 

https://communities.sas.com/t5/SAS-Programming/Error-of-Excel-not-v5-when-using-PROC-IMPORT/td-p/498...

 

 

Kind regards,

Amir.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 4 replies
  • 5518 views
  • 0 likes
  • 4 in conversation