BookmarkSubscribeRSS Feed
RVNWOP
Calcite | Level 5

I am trying to import an Excel spreadsheet in SAS Enterprise Guide v. 7.15 (64-bit).

This is the code:

PROC IMPORT DATAFILE="C:\Users\username\OneDrive - Name\Documents\spreadsheet.xlsx"
OUT= data_1
DBMS=XLSX
REPLACE;
GETNAMES=YES;
SHEET="sheet1";
RUN;

 

However I am getting the following Error message: 
ERROR: Physical file does not exist, C:\Users\username\OneDrive - Name\Documents\spreadsheet"

I suspect it is because of the space in the path name ? Anyone has an idea ?

Thank you!

1 REPLY 1
ballardw
Super User

I typically use Windows Explorer so I can click on a folder and have the path in the display window to copy and paste into code. Same with filenames if they are to be read.

 

HOWEVER, since you cite Enterprise Guide it probably means that the server running EG does not see your local drive (or cloud mounted drive) at all and you need to copy the file to a location that the server sees and use that path. If you think about it the server is extremely unlikely to have a generic "yourusername" folder on its C: drive much less the One Drive.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 447 views
  • 0 likes
  • 2 in conversation