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!
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.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.