I successfully created NP Library but there are no tables created in the NP Library. Anyone having the same problem? Thank you.
Hi @BigGGG
Could you please share the code you used and post the log?
Prior to this lesson, did you complete successfully the data set up at the very beginning of the course, using the cre8data.sas file ?
Best,
I have finished the setup before and I even went back to go through it again.
This is my code
options validvarname=v7;
libname NP xlsx "F:\SAS\myfolders\coursedata\EPG194\data\np_info.xlsx";
and here is the log
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 72 73 options validvarname=v7; 74 libname NP xlsx "F:\SAS\myfolders\coursedata\EPG194\data\np_info.xlsx"; NOTE: Libref NP was successfully assigned as follows: Engine: XLSX Physical Name: F:\SAS\myfolders\coursedata\EPG194\data\np_info.xlsx 75 76 77 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 89Thank you
Are you using SAS UE or your own installation?
I noticed the myfolders folder and that's usually used in SAS UE, but you also use your F drive which is not SAS UE so I wonder if you've accidentally used the wrong instruction set somehow?
Not anywhere on your computer, just where you've set up the shared drive space, so in the myfolders. And you wouldn't reference it from the F drive you would need to use the unix format. Can you run the following and check your log and myfolders for the demo.xlsx file?
If it doesn't work, post your log from the code and a screenshot of the myfolders folder in your Files Folders and Server pane.
@BigGGG wrote:
I use UE, but it's capable of reading excel files anywhere in your computer right?
libname demo xlsx '/folders/myfolders/demo.xlsx';
data demo.want;
set sashelp.class;
run;
libname demo;
It varies based on your SAS installation, so if you have a local installation you can use your local drives. If you have a server installation, or SAS UE, then you cannot access your local drives unless you have it set up as a shared drive, which is the myfolders location.
The videos are not customized for each set up, just the setup instructions are customized for each installation type.
@BigGGG wrote:
It works thank you! I'm just wondering why in the demonstration video she used computer file path (S drive) and it worked every time.
Hi there,
I'm having this same problem regarding creating the np library. I am using SAS Enterprise Guide.
I used the following code:
libname np xlsx "&path/np_info.xlsx";
My log indicates that the Libref np was successfully assigned.
The 'Physical Name' location appears to reference the work drive on my organization's server. But I do not see 'np' in the list of libraries that appear in my work drive.
Also, I do not see any xlsx type files in my course folder.
Any help you could provide would be greatly appreciated! Thank you in advance.
Hi Cynthia,
Thank you so much for your response!
I believe I have figured out the NP activity. I think the the np library may not have been showing up because I wasn't hitting the 'refresh' button in the server window.
However, I'm still a bit unclear on how to access the Excel files.
I saved the course folder on my C drive. So, when I go to my C drive, open EPGIV2_EG, and then open the the 'demos' sub-folder, I see only 29 files all with a .sas extension.
Should I be seeing the xlsx and csv files in this folder too?
When I run the pg1v2_eg program (including the PROC CONTENTS step), I see from the Physical Name entry in my Results window that my data is saved in what looks like the work directory of my organization's SAS server. When I expand the work directory in the server window, I see that 24 data sets appear to be saved here.
Does that sound right to you?
Many thanks!
Marian
Hi:
NO, you should NOT see the XLSX files in any of the sub-folders for activities, demos, practices or output. If you were running on a local installation of SAS, you would see the XLSX files in your data sub-folder. However, Enterprise Guide users have a special set of instructions. All of the EG data is created in the WORK location, which is a temporary location. On my system, my WORK location is a very, very long physical name that changes each time I open Enterprise Guide. For example, in this video https://youtu.be/mcysTyfVSM4?t=7 (for EG7 making the data) at time stamp 2:13, you see the very, very long physical location where ALL the data files were written:
Then, at time stamp 3:29 in the video, you will see a view of the PG1 library in the Library window and you do not see any XLSX files in the LIBRARY, that's because SAS libraries only show you SAS format data sets in a library view. If you want to see ALL the files in this temporary WORK location, including the XLSX files, you would have to navigate to that particular location. This is why we make a helper variable called &PATH that stores this location so you can use it in your code. Then at time stamp 5:52, after I close and open EG a second time, the data is made over again in the new WORK location, you see this:
Here's a better closeup of the two different paths that are shown inside the video:
And you can see that each time I start EG and run the data creation program, my physical location for the class data, including the XLSX files is different.
You could always open Windows File Explorer while EG is open and navigate to that location. Or, within EG, under the Libraries icon, you should see a Files icon and you can navigate down your file path until you get to the physical name. Here's a screen shot of an Enterprise Guide 8 session, with the FILES icon in EG expanded until you can see all the XLSX files in that long location:
This is why we tell EG users to trust that the files have been created, and to use &PATH as the helper variable that holds the location of the data files. There's no folder structure in this operating system WORK location.
Hope this helps,
Cynthia
Hi again Cynthia,
Thank you so much for your detailed explanation! I believe I understand now.
I think I was getting confused because I had thought users were being encouraged to open the Storm.xlsx file in Excel at the beginning of the demo on using a library to read Excel files, but as I re-watch it, I believe the intention was for users to follow along on screen.
I have not succeeded in navigating to the corresponding physical name location in the Windows File Explorer view. Perhaps that's a bit more complicated when your data is stored on a server? But I had no problem progressing through the rest of the lesson. And it looks and sounds like all of the data files that I need are contained in the &PATH variable and I needn't worry! So, I think I'm all good from here.
Thanks again!
Marian
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.