BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DG1984
Fluorite | Level 6

When running _2egpg194 I am getting the following error

 

ERROR: The XLSX engine cannot be found.

ERROR: Error in the LIBNAME statement.

 

I am using SAS version information: 9.3_M2

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
Hi:
You must have SAS 9.4 Maintenance release 2 or higher in order to use the XLSX libname engine. You did not post your version of SAS. It should be at the top of the setinit results.
Cynthia

View solution in original post

13 REPLIES 13
ballardw
Super User

I don't remember exactly when the XLSX engine was added but I think your version of SAS is recent enough.

Run this code:

proc setinit;run;

If the log does not contain a line similar to:

---SAS/ACCESS Interface to PC Files

then your license does not support the library type and you need a license that has the Interface to PC Files.

If it does show that line then run this:

proc product_status;run;

If the log does not show something similar to:

For SAS/ACCESS Interface to PC Files ...

then you have a license but the module was not installed. Reinstall SAS and make sure the ACCESS Interface to PC Files is included.

DG1984
Fluorite | Level 6

Thank you, I have run the below codes and I can confirm SAS/Access interface to PC files in installed and I have a licence

 

Thanks

ballardw
Super User

From the log copy the LIBNAME statement as submitted along with any messages.

Paste into a code box opened with the forum's {I} or "running man" icon.

Cynthia_sas
SAS Super FREQ
Hi:
You must have SAS 9.4 Maintenance release 2 or higher in order to use the XLSX libname engine. You did not post your version of SAS. It should be at the top of the setinit results.
Cynthia
Cynthia_sas
SAS Super FREQ
Ah, I'm sorry, I just saw your posting that you are using SAS 9.3 -- and unfortunately, the XLSX Libname engine was not available in SAS 9.3. You'll need to either switch to one of the free methods of using SAS (SAS University Edition or SAS OnDemand for Academics) or you'll need to see when your site is going to upgrade to the current release.

Without access to the XLSX Libname engine, working in the course will be very, very hard for you.

You'd only be able to have hands-on practice with any activities or practices that did NOT use the XLSX Libname engine. And, also, the bigger issue is that without the XLSX Libname engine, you'll have issues creating the data used in the course.

Cynthia
RiverRoth
Calcite | Level 5

"The Dopen command default to device number eight if out put device is not specified"

 

Cynthia_sas
SAS Super FREQ
Hi:
I don't understand the message you've posted. Can you provide a bit more context about how and when you got this error? Was it while you were setting up the files? Were you using Enterprise Guide? I am not sure how/when you got this error and need some more background.
Thanks, Cynthia
iamash
Calcite | Level 5

Hi there!

Quick question: Does the zip folder for SAS Enterprise Guide contain the storm.xlsx file? When running the first section of demo file, it states ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/FILEPATH//storm.

 

* Section 1:  *;

options validvarname=v7;

ods graphics on;

 

proc import datafile="FILEPATH/storm.xlsx" 

dbms=xlsx out=storm_damage replace;

sheet="Storm_Damage";

run;

 

Thanks!!

Panagiotis
SAS Employee

Hello @iamash ,

 

Yes the file should exist as long as everything is set up correctly.

 

However a quick glance at your code and I think I see the issue. In your PROC IMPORT you have datafile="FILEPATH/storm.xlsx".

 

Try opening up the p101d01.sas instead of ep101d01.sas. It will look like this:

 

options validvarname=v7;
ods graphics on;

*Path is assigned in the cre8data.sas program;
*%let path=s:/workshop;

libname pg1 base "&path/data";

proc import datafile="&path/data/storm.xlsx" 
			dbms=xlsx out=storm_damage replace;
	sheet="Storm_Damage";
run;

The &path is what's called a macro variable and it is created during course setup. It stores the location of where all the files located. So datafile="&path/data/storm.xlsx" is telling SAS where the Excel workbook is.

 

Try this and let us know. Again the data must be set up correctly for Enterprise Guide. For more information on how to set up data for the course you can check out these videos https://communities.sas.com/t5/SAS-Communities-Library/How-to-access-data-for-SAS-Programming-1-cour...

 

- Peter

 

iamash
Calcite | Level 5
Hello Peter,
Thank you so much for the guidance and further explanation of how the &path
works. The video was very helpful. I will definitely be participating in
the SAS community forums from now on!

Thanks again!
Panagiotis
SAS Employee

No problem! Glad everything worked out. 

 

Keep us posted if you have any other questions.

 

- Peter

RiverRoth
Calcite | Level 5
I Have never heard of a file by that name i have heard of a drive and if
the file is not literally on the saved files then you can have it when
running correct. So if your running storm which is a generator / engine out
source then you need facts hard files to form data right.
Panagiotis
SAS Employee

I'm a bit confused with your post.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

LIBNAME 101

Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 13 replies
  • 3061 views
  • 5 likes
  • 6 in conversation