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

Import Excel File

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Import Excel File

I have been unable to import my Excel file.  I am using SAS University Edition in Windows 8.1 using VMWare.   I used the Import XLSX File Snippet.  Below is the log.

I have reviewed numerous articles and self-help threads on this error.  I re-read the SAS Studio University Edition Quickstart guide. I made sure I had created the SASUniversityEdition folder and a subfolder called myfolders. I double-checked VMWare Virtual Machine settings to make sure I checked the Folder Sharing/Always Shared option, that I have shared the myfolders folder and that the Enabled Attribute is checked on the sharing screen.

I am novice with respect to SAS.  I want to be able to do some regression analysis on my data and thought learning SAS would be easier that R.

Thanks for the help.

Joel

--------------------------------------------------

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

57 

58 /** Import an

60 PROC IMPORT DATAFILE="/Folders/My Folders/MMA_Project.xlsx"

61 OUT=MMAPRJCT.MMADATA

62 DBMS=XLSX

63 REPLACE;

64 RUN;

ERROR: The path /Folders/My Folders/MMA_Project.xlsx is invalid because it is not in the list of accessible paths when SAS is in

  the lockdown state.


Accepted Solutions
Solution
‎05-28-2015 08:10 AM
SAS Employee
Posts: 56

Re: Import Excel File

Posted in reply to joelgibbs

Hi Joel,

When I look at your screenshots, it looks like your Excel file is named MAA_Project.xlsx, but your code refers to MMA_Project.xlsx.  Maybe changing that will help resolve this error?

Thanks,

Jennifer

View solution in original post


All Replies
Community Manager
Posts: 2,955

Re: Import Excel File

Posted in reply to joelgibbs

Because the SAS session is running inside a Linux virtual machine, the path names are case-sensitive.  Also, you have a space in the name of the "myfolders" location.  Try:

PROC IMPORT DATAFILE="/folders/myfolders/MMA_Project.xlsx"

Chris

New Contributor
Posts: 3

Re: Import Excel File

Posted in reply to ChrisHemedinger

Chris;

Thanks for your response. Your help seems to have resolved one problem, but now I'm encountering another problem, still within the same rubric of importing an Excel file.  So I hope it is appropriate to continue the previous thread.

As you can see in the screen print, the SAS code parsing engine seems to be inserting a second backslash between "myfolders" and "MMA_Project" where my code only has one backslash.  As a new SAS user, I can't even begin to imagine what would cause it to do this.

Thanks

Joel

SAS_Studio_screenshot.jpg

Solution
‎05-28-2015 08:10 AM
SAS Employee
Posts: 56

Re: Import Excel File

Posted in reply to joelgibbs

Hi Joel,

When I look at your screenshots, it looks like your Excel file is named MAA_Project.xlsx, but your code refers to MMA_Project.xlsx.  Maybe changing that will help resolve this error?

Thanks,

Jennifer

New Contributor
Posts: 3

Re: Import Excel File

Posted in reply to jennifert

Thank you.  I looked at that code a hundred times and didn't see the naming discrepancy.  I'm sorry to take up your time with such a dumb request.

Joel

Super User
Posts: 7,804

Re: Import Excel File

Posted in reply to joelgibbs

Aside from the fact that there seems to be a naming discrepancy, the double slashes will not pose a problem. Consecutive slashes are interpreted as one single slash by the UNIX system.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
🔒 This topic is solved and locked.

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

Discussion stats
  • 5 replies
  • 649 views
  • 2 likes
  • 4 in conversation