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. 

 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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