NOTE: The data set WORK.T_TYPE_CODES has 5 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 123410 ;;;; 123411 123412 /************************************************* 123413 Build storm.xlsx 123414 2. Export 123415 PG1.STORM_SUMMARY to tab Storm_Summary 123416 PG1.STORM_DETAIL to tab Storm_Detail 123417 PG1.STORM_DAMAGE to tab Storm_Damage 123418 PG1.STORM_RANGE to tab Storm_Range 123419 PG1.STORM_2017 to tab Storm_2017 123420 PG1.STORM_BASINCODES to tab Basin_Codes 123421 PG1.STORM_SUBBASINCODES to tab SubBasin_Codes 123422 PG1.STORM_BASINCODES to tab Basin_Codes 123423 WORK.T_TYPE_CODES to tab Type_Codes 123424 *************************************************/ 123425 LIBNAME xl XLSX "&path/storm.xlsx"; ERROR: The XLSX engine cannot be found. ERROR: Error in the LIBNAME statement. 123426 libname pg1 "&path"; NOTE: Libref PG1 refers to the same physical library as WORK. NOTE: Libref PG1 was successfully assigned as follows: Engine: V9 Physical Name: C:\Users\mona\AppData\Local\Temp\SEG12912\SAS Temporary Files\_TD15744_CONTROLLINGPC_\Prc2 123427 options validvarname=any; 123428 data xl.'Storm_Summary'n; 123429 set pg1.storm_summary(rename=(Hem_NS='Hem NS'n Hem_EW='Hem EW'n)); 123430 Basin=upcase(basin); 123431 run; ERROR: Libref XL is not assigned. NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 123432 data xl.'Storm_Detail'n; 123433 set pg1.storm_detail; 123434 run; ERROR: Libref XL is not assigned. NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 123435 data xl.'Storm_Damage'n; 123436 set pg1.storm_damage; 123437 format date date9. cost comma15.; 123438 run;
I would like to take the SAS Programming 1: Essentials Course in SAS Enterprise Guide. In the first section I downloaded, extracted and saved the zip. When I pg1v2_eg code, it says "The XLSX engine cannot be found" and "Libref XL is not assigned"
What can I do?
For any error copy from the log the code and all messages, notes and errors related to that code. Then on the forum when asking a question about the error, open a text box using the </> icon above the message window and paste the entire bit of text. The text box is important because the message windows on this forum will reformat text and move diagnostic messages that SAS often places in the log.
Hi @monazsuzsi and welcome to the SAS Support Communities!
I would like to take the SAS Programming 1: Essentials Course ...
I have never taken this (or any other basic SAS) course, but I'm sure it is a great starting point.
... it says "The XLSX engine cannot be found" and "Libref XL is not assigned"
What can I do?
It looks like your SAS installation does not include the module SAS/ACCESS Interface to PC File Formats, which contains the XLSX engine. I don't have this module either and get the same error messages.
The good news is: Chances are that you don't really need that module for the course, as it is not necessary at all for learning basic SAS programming. (I'm wondering why a first SAS course would require anything beyond a SAS/Base installation.) Your SAS log (thanks for posting it!) shows that the XLSX engine would be used to create an Excel workbook whose tabs contain the data from datasets pg1.storm_summary, pg1.storm_detail, etc. But these SAS datasets already exist (most likely) as .sas7bdat files in the library pg1, which "was successfully assigned," as the log says. So you have many other and better ways to view the content of those datasets than looking at Excel spreadsheets. For example, you can open a dataset by double-clicking it in the Servers pane of SAS Enterprise Guide.
For the time being I would simply skip all parts of the code that rely on the XLSX engine or Excel itself and whenever the course says something like "look at the tab [say] Storm_Summary of storm.xlsx," just look at the corresponding SAS dataset, i.e., pg1.storm_summary.
We'll be happy to help if other difficulties arise. Enjoy the SAS Programming course!
Update / Correction to my comment below. Happily, Cynthia noted that SAS On Demand for Academics does provide the XLSX engine, which is good news. This means that learners can use it to complete programming essentials, which is great news.
@FreelanceReinh wrote in part:
(I'm wondering why a first SAS course would require anything beyond a SAS/Base installation.)
Agree. There was a thread about the changes to this course a few years ago, but I can't find it. My surprise was they changed it so that they are no longer teaching how to read text data with an INPUT statement (I think they made it an optional appendix). I hadn't realized that reading /writing Excel was deemed "essential" for beginner SAS programmers, but I suppose it is, unfortunately.
I haven't used SAS On Demand for Academics. But from a quick look, it doesn't have SAS/ACESS to PC files (which you need for XLSX engine), which is surprising to me. I would think it would be good to have learners be able to complete Programming I with SODA.
Unfortunately, the XLSX engine IS needed for the Programming 1 class to make the class data ...
You aren't saying that the class data are provided in the form of Excel files, or? If they were, my workaround would be to save them as .csv files and then write a DATA step to read the .csv files, which would be a useful lesson in itself.
From what the OP posted,
123413 Build storm.xlsx 123414 2. Export 123415 PG1.STORM_SUMMARY to tab Storm_Summary
I was under the impression that the task was to build an .xlsx file from existing SAS datasets, but obviously I don't see the whole picture.
Thanks for explaining the background. Now it makes sense to me. So, the premise is that XLSX has become such an important file format that even starters need to know how to read and write to those files with SAS.
When students use SAS OnDemand for Academics, they only have to upload 1 .SAS program to the OnDemand server.
This sounds like a convenient solution to the problem (which was created by moving the actual software away from the learners).
Thanks, @Reeza, very good points. I never used SAS University Edition, but I remember many posts on here from users who were confused by the requirements inherent to that concept (virtual Unix machine vs. local PC, "myfolders", etc.). It was rather the SAS Learning Edition that people wanted to get back.
@Quentin: I think you mean the great 2019 thread "Programming 1/2 content: removed INFILE and added macro vars?", which I remember, too. It has accumulated a total of 55 likes ...
I also haven't used SAS On Demand for Academics (or its predecessor, SAS UE), but the SAS Learning Edition until it was sadly discontinued.
It seems that @monazsuzsi has the PG1 library on her local computer, which I think is better (for learning purposes) than having to "upload" datasets to a server, virtual machine, cloud or whatever newish user interfaces may demand.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.