BookmarkSubscribeRSS Feed
Eieioxinxin
Calcite | Level 5

Hello, 

I'm using the SAS Studio to do the Activity of Lesson 2:Understanding SAS Data:

 

"Write a LIBNAME statement to create a library named NP that reads np_info.xlsx in the course data as follows:

  • SAS Studio: Specify the full path to your EPG1V2/data folder and the complete file name."

I missed specifying the "XLSX" engine in the statement the first time, and the LOG showed "the Libref NP was successfully assigned," "Engind: EXCEL" as the pictures below.

Then I navigated to the list of libraries and open the NP library, there were four tables with "$" symbols of the tables' names, which were different from the correct results with the "XLSX" statement. 

 

May I ask:

Q1: Why the Libref NP was successfully assigned even if I missed the "XLSX" engine?

Q2: What is the difference between "Engind: EXCEL" and "Engind: XLSX"?

Q3: What is the "$" mean on the tables' names? and why are those results?

Q4: What is the effect of missing the "XLSX" engine when writing a LIBNAME statement and creating a library?

 

Thanks a lot! 

 

1. 

LIBNAME statement:  libname NP "S:/workshop/EPG1V2/data/np_info.xlsx";

Eieioxinxin_0-1683218281206.png

Screenshot 2023-05-04 123555.png

 

2. Correct results

LIBNAME statement: libname NP XLSX "S:/workshop/EPG1V2/data/np_info.xlsx";

The LOG showed "the Libref NP was successfully assigned," and "Engind: XLSX."

Screenshot 2023-05-04 123701.png

There are three tables in the NP library: ParksSpecies, and Visits.

Screenshot 2023-05-04 123650.png

 

1 REPLY 1
ballardw
Super User

@Eieioxinxin wrote:

Hello, 

I'm using the SAS Studio to do the Activity of Lesson 2:Understanding SAS Data:

 

"Write a LIBNAME statement to create a library named NP that reads np_info.xlsx in the course data as follows:

  • SAS Studio: Specify the full path to your EPG1V2/data folder and the complete file name."

I missed specifying the "XLSX" engine in the statement the first time, and the LOG showed "the Libref NP was successfully assigned," "Engind: EXCEL" as the pictures below.

Then I navigated to the list of libraries and open the NP library, there were four tables with "$" symbols of the tables' names, which were different from the correct results with the "XLSX" statement. 

 

May I ask:

Q1: Why the Libref NP was successfully assigned even if I missed the "XLSX" engine?

Q2: What is the difference between "Engind: EXCEL" and "Engind: XLSX"?

Q3: What is the "$" mean on the tables' names? and why are those results?

Q4: What is the effect of missing the "XLSX" engine when writing a LIBNAME statement and creating a library?

 

Q1 and Q4 are basically the same.

I do not know your set up but there is a SAS system option calle DLCREATEDIR. With limits that means when a LIBNAME statement is used and the last directory in the path doesn't exist then SAS will create it for you. But it should be Folder. Depending on your file system your might find that  you have folder in the Data folder with that Xlsx name in addition to the actual xlsx file.

Q2:  Which versions of Excel files are intended. Excel has been around for 30+ years and has gone through many file formats. One of the most noticeable changes are the numbers of rows and columns that may be used.

 

Not sure about the $ though.

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 402 views
  • 0 likes
  • 2 in conversation