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

How to Import an Excel File to SAS University Edition

Reply
Contributor
Posts: 27

How to Import an Excel File to SAS University Edition

Hello,

 

I am new to SAS and am having trouble on how to import non-SAS files such as excel. My professor explained that we just need to indicate the path by using this example ;

 

PROC IMPORT FILE="C:\Users\user\Desktop\pbde_example1.xlsx" DBMS=EXCEL
OUT=ONE;
RUN;

 

However, when I try this I am getting the error message "Physical file does not exist".

 

I have a mac, here is the info on the file. When I copy the "where" info it pastes into SAS as /Users/hanamobasseri/Desktop/Spring II/Linear Model. As you can see it doesn't include "Macintosh HD" or the file name "PBDE_1.xlsx". I have tried variants of the path by including both of these but get the same message. Thank you for any help!

 Screen Shot 2018-04-16 at 3.07.41 PM.png

Super User
Posts: 24,010

Re: How to Import an Excel File to SAS University Edition

Posted in reply to iressa131

@iressa131 Please see the Recommendations box on the right hand side of the page on your question. You'll see several solved variations of this question that will work for you.

 

This is a common error, where you've specified the path incorrectly. Please follow the instructions in the other posts to set up your path correctly. 

 

Quick tip to find the path to a file:

In Servers Files Folders Pane, Right click on the file>Properties>copy path to program

Ask a Question
Discussion stats
  • 1 reply
  • 109 views
  • 0 likes
  • 2 in conversation