05-18-2015 11:29 AM
The file paths won't be in the same format, but if you select the folder in the Finder and then do a "Get Info" by doing a Control-click, you'll see in the "Get Info" box the "Where:" field. You can use this path to set up your Shared Folder. Once it is in your Shared Folder, you can assign a libname, etc., based on its location in the VM. In other words, the Linux VM for University Edition is the same whether on a PC or Mac.
I hope this makes sense but let me know if not.
05-18-2015 11:38 AM
I set up my shared folders in VMware Fusion when I downloaded all the files. So the Excel file is already in that shared folder. The problem is that when I put that path in for the IMPORT snippet, it doesn't recognize it. I typed FILENAME="/documents/SAS University Edition/my folders/workbook2.xlsx"
That the is path for the shared folder that I created.
05-18-2015 12:19 PM
Thanks, Randy. You are so helpful, and that does makes sense, and I revised my path to
PROC IMPORT DATAFILE="/Users/henryrn/Documents/SAS University Edition/my folders/workbook2.xlsx"
after using the "get info" function. I still get an error message saying
ERROR: The path /Users/henryrn/Documents/SAS University Edition/my folders/workbook2.xlsx is invalid because it is not in the list
of accessible paths when SAS is in the lockdown state.
Yes, I have watched tutorials and followed the link above about accessing data in SAS. It is full of libref and library names references. I think the big picture in all of this is reflected in my original question, "Is there a student-friendly way to import Excel data into SAS Studio?" I cannot imagine having to trouble-shoot this with 50 students this fall! I am coming to the conclusion that this will not work for them. I was hoping for a good solution for them for using SAS Studio off-campus since most of them have Macs. They will have to continue to do their work on campus using SAS Enterprise Guide if I can't get this option to work.
Thanks for your patience and good suggestions!
05-19-2015 10:25 AM
I just did the following on my Mac:
1. Dropped an Excel (.xlsx) file called "ProjectPlanningChecklist.xlsx" into my Shared Folder. The Shared Folder location on my Mac is /Users/rmullis/Documents/myfolders. When I check the Properties of this file (as viewed in SAS Studio) the path is /folders/myfolders/data/ProjectPlanningChecklist.xlsx (see screen capture)
2. Ran this code:
PROC IMPORT DATAFILE="/folders/myfolders/data/ProjectPlanningChecklist.xlsx"
PROC PRINT DATA=WORK.checklist; RUN;
This worked fine. Have you tried this?
05-19-2015 11:12 PM
It worked! Thank you so much! I was trying to use the Mac path instead of the one from SAS. This is very helpful! Thanks for taking the time to send this!
08-19-2017 01:08 PM
I wonder how can I upload excel file, which are not in sas library or sas dlders? it is just excel file on my laptop.
Is it possible to add files from outside to be in sas folders or sas library?
05-18-2015 12:02 PM
One other thing: If, like me, you need the big picture in order to put it all together, here's an article that is a step back and covers access data in SAS University Edition as a general topic:
Need further help from the community? Please ask a new question.