Learning SAS? Welcome to the exclusive online community for all SAS learners.

How to Import an Excel File to SAS University Edition on AWS

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

How to Import an Excel File to SAS University Edition on AWS

Dear all,

I'm using the snippet of "import xlsx file" from sas studio to upload a file from my local drive in University edition and turn out to be an error with message like 

"ERROR: (physical file) /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\//(filename) doesn't exist."

 
(I can't find my SAS University in local drive as I think I'm using AWS, so I put the file in the folder Users)

The coding simply looks like in this way:

 
 
/** Import an XLSX file. **/
63
64 PROC IMPORT DATAFILE="C:\Users\(filename)"
65 OUT=WORK.MYEXCEL
66 DBMS=XLSX
67 REPLACE;
68 RUN;

 

Can I upload file from local drive? Or I can only upload file by tool in Sas studio (not coding) to shared folders then import it?

If that's because of AWS, can the files saved on AWS but outside sas University edition then I can use code to import?

 

Thank you.


Accepted Solutions
Solution
a week ago
SAS Super FREQ
Posts: 361

Re: How to Import an Excel File to SAS University Edition on AWS

 

Hi, @Shmuel. Just to expand on what @Michaelcwang2 said, you'll need to upload your file to AWS. 

 

 

See this help page, especially the second bullet point.

 

Regards,

Randy

View solution in original post


All Replies
Trusted Advisor
Posts: 1,378

Re: How to Import an Excel File to SAS University Edition on AWS

[ Edited ]

Move or copy your xlsx file under /myfolders of sas studio.

You can't aproach non shared files because of the Virtual Memory mechanism.

 

Define libnmae myxl xlsx '/myfoldrs/... .xlsx';  /* path to the file, where MYXL maybe changed to any valid name */

 

data want;

    set myxl.<sheet name>;

       ... any sas code ...

run;

 

Occasional Contributor
Posts: 6

Re: How to Import an Excel File to SAS University Edition on AWS

Shmuel, thank you!
Solution
a week ago
SAS Super FREQ
Posts: 361

Re: How to Import an Excel File to SAS University Edition on AWS

 

Hi, @Shmuel. Just to expand on what @Michaelcwang2 said, you'll need to upload your file to AWS. 

 

 

See this help page, especially the second bullet point.

 

Regards,

Randy

Occasional Contributor
Posts: 6

Re: How to Import an Excel File to SAS University Edition on AWS

Dear Randy,
Really appreciate!

MKW
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 227 views
  • 2 likes
  • 3 in conversation