BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm trying to use Proc Import to read an XLSX file into a SAS file, but I'm getting an error message:


16 proc import out=R110035.ssns_provided
17 datafile = 'S:\Requests\2011 Requests\1101\R110035\Misc\From Client.xlsx'
18 dbms = EXCEL replace;
19 run;

ERROR: Unable to open file S:\Requests\2011 Requests\1101\R110035\Misc\From Client.xlsx. It
does not exist or it is already opened exclusively by another user, or you need
permission to view its data.

Am I using the right DBMS option? Is there some other problem?
Thanks,
Jeff
3 REPLIES 3
CurtisMack
Fluorite | Level 6
Do have the file open in Excel? That can cause this error.
Cynthia_sas
Diamond | Level 26
Also, these notes are relevant:
http://support.sas.com/kb/32/455.html
http://support.sas.com/kb/38/535.html
http://support.sas.com/kb/32/862.html

And this documentation shows which versions of Excel can be read with which versions of SAS on various platforms (32 bit vs 64 bit):
http://support.sas.com/documentation/cdl/en/acpcref/63184/HTML/default/viewer.htm#a003094743.htm

cynthia
Ksharp
Super User
Hi.
proc import is not supported the XLSX file which is file above Office2007.
If you want to import these files , one way is to use ' libname ' statement.

[pre]
libname exce excel 'c:\temp\from.xlsx';
proc sql ;
create table r11 as
select *
from exce.sheet1;
quit;
[/pre]


Not tested code.


Ksharp

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

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 16132 views
  • 1 like
  • 4 in conversation