BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Uma_Devi
Fluorite | Level 6

 I have access to SAS studio (university edition).

Please direct me of how to access an excel file in the c drive of my computer using libname statement and proc import so that I can see all the sheets in the excel file. I used libname xyz xlsx 'path \ excelfilename.xls'; and the proc import syntax as well but couldnt succeed. I want to attempt the certification test and am keen on knowing this .

1 ACCEPTED SOLUTION

Accepted Solutions
MayurJadhav
Quartz | Level 8

Hi @Uma_Devi   I don't think so you can access local files directly into SAS Studio. But you can manually upload files in your SAS Studio HOME directory "FILE (HOME)"

 

I have created a folder ("Files") under "Files(Home)" and from there right click to see the "Upload Files.." option.

 

Once you have files in your home directly, it can easily accessed or used in the proc import procedure.

 

MayurJadhav_0-1683729321124.png

For example to access Country.xlsx file I can use this path "/home/u61950255/Files/Country.xlsx" in proc import or something..

MayurJadhav_1-1683729541566.png

 

Mayur Jadhav
BI Developer. Writer. Creative Educator.

SAS Blog → https://learnsascode.com
YouTube Channel: → https://www.youtube.com/@imayurj

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

SAS Studio runs on a server, it cannot access the files on your computer's C: drive. The files must be uploaded to a folder on the SAS Studio server, and then accessed via the server folder name and file name.

 

See: https://libguides.library.kent.edu/SAS/OnDemandImportData

--
Paige Miller
MayurJadhav
Quartz | Level 8

Hi @Uma_Devi   I don't think so you can access local files directly into SAS Studio. But you can manually upload files in your SAS Studio HOME directory "FILE (HOME)"

 

I have created a folder ("Files") under "Files(Home)" and from there right click to see the "Upload Files.." option.

 

Once you have files in your home directly, it can easily accessed or used in the proc import procedure.

 

MayurJadhav_0-1683729321124.png

For example to access Country.xlsx file I can use this path "/home/u61950255/Files/Country.xlsx" in proc import or something..

MayurJadhav_1-1683729541566.png

 

Mayur Jadhav
BI Developer. Writer. Creative Educator.

SAS Blog → https://learnsascode.com
YouTube Channel: → https://www.youtube.com/@imayurj
Uma_Devi
Fluorite | Level 6
Thanks a lot. Yes I am now able to do what you mentioned after following
the steps.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 527 views
  • 1 like
  • 3 in conversation