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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 5187 views
  • 0 likes
  • 4 in conversation