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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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