Learning SAS? Welcome to the exclusive online community for all SAS learners.

Reading xlsx file using libname statement

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Reading xlsx file using libname statement

I am using SAS University Edition and receive any 'error' when I tried to read the worksheets in an xlsx file.

 

Attached is the log,

  

WARNING: No matching members in directory.
 
Any idea what does 'no matching members in directory' means? There are many worksheets in the xlsx file.

Cannot read the worksheets from xlsx file.PNG

Accepted Solutions
Solution
‎06-14-2016 09:40 AM
SAS Employee
Posts: 45

Re: Reading xlsx file using libname statement

@grace861 with SAS University Edition, you are not able to access the files on your C:\ drive directly. You can access files on your physical machine only through the use of shared folders. If you have your shared folders set up, you can access them using the path /folders/myfolders/<rest-of-path>. More documentation can be found here:

 

What is a shared folder?

 

How do I create a shared folder?

 

How do I reference SAS data from a SAS program?

 

Fixing the filename references should fix the warning message you see!

View solution in original post


All Replies
Solution
‎06-14-2016 09:40 AM
SAS Employee
Posts: 45

Re: Reading xlsx file using libname statement

@grace861 with SAS University Edition, you are not able to access the files on your C:\ drive directly. You can access files on your physical machine only through the use of shared folders. If you have your shared folders set up, you can access them using the path /folders/myfolders/<rest-of-path>. More documentation can be found here:

 

What is a shared folder?

 

How do I create a shared folder?

 

How do I reference SAS data from a SAS program?

 

Fixing the filename references should fix the warning message you see!

Occasional Contributor
Posts: 5

Re: Reading xlsx file using libname statement

Yes. I have to use the following:

 

%let path=/folders/myfolders/;

 

libname orion '/folders/myfolders/';

 

irregardless of where my shared folder is saved. Physical location is not important as SAS University Edition only recognises /folders/myfolders.

 

Now I can access my library orion and use the "&path/<name of sas data file>".

 

Thanks for your reply.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 454 views
  • 1 like
  • 2 in conversation