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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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