BookmarkSubscribeRSS Feed
paulinap1
Calcite | Level 5

Hi,

 

I'm trying to read in an Excel file into SAS so I can later use it in SAS Visual Analytics. Here is my code:

 

libname prs '/SAS/SASDATA/SASUSER/paulina.portnoy';
PROC IMPORT DATAFILE= 'C:\Users\pportnoy\Documents\COUNT_DX\Count_DX_HCC_v12_2015.xlsx'
DBMS=XLSX
out=prs.COUNT_DX replace;
GETNAMES=YES;
RUN;
 
I keep getting the error that the physical file does not exist. The excel file sits on my laptop. Can someone please help?
 
I'm using SAS Studio V
7 REPLIES 7
Tom
Super User Tom
Super User

Is SAS running on Windows?  Or is it running on Unix (perhaps in a virtual machine)?

Either way you need to use paths for the library and the Excel file that SAS can see.  So one of the two is in the wrong format.

paulinap1
Calcite | Level 5

Might be running on Linux. How do I change the format of my code so it works?

Tom
Super User Tom
Super User

If you are using SAS/Studio then use that interface to upload the file to some place on the Unix server where SAS can see it and use the new name in the PROC.

alexal
SAS Employee

@paulinap1 ,


I assume SAS Studio V is running on Linux server? If the answer is yes, you won't be able to access the data from your laptop unless you mount that folder on the server.

paulinap1
Calcite | Level 5

How can I mount the folder?

Reeza
Super User

Go to SAS Studio, find the Server Files and Folders pane. At the top menu bar of that section is an icon with an up arrow, use that to upload your data and then you can import it. 

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 7 replies
  • 2178 views
  • 0 likes
  • 4 in conversation