BookmarkSubscribeRSS Feed
Trivikram
Calcite | Level 5

Hello All,

 

How to read/download excel sheet from Sharepoint site?

 

Regards,

Trivvikrum

 

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, Sharepoint can be mapped to a network drive just like any other network drive.  If you speak to your IT group they should be able to help you with this.  Note that your SAS will need to be able to access that network area - i.e. if your SAS is a network then that network needs access rights to Sharepoint - often that is done locally on your machine.  Again, your IT will be able to help with this.

Once you have it linked as a network path, then you simply import as normal:

proc import datafile="d:\<path>\<filename>.xlsx"...

Where D is mapped to the Sharepoint site.

Trivikram
Calcite | Level 5

Hi,

This solution doesn't work and it would be good if you provide code as well.

 

//Trivvikrum

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

Assume thats toward me yes?  What "doesn't work"?  The code you want is a simple proc import of a file once you have sharepoint mapped to network drive.  What did your IT group say?

Trivikram
Calcite | Level 5
Hi,
I applied below and it worked fine.
proc import datafile='\\sharepointsite\excel.xls*;
run;

Br
Trivvikrum

BrunoSilva
Quartz | Level 8

Hello,

 

Just puzzle pieces  never done this before 🙂

How about using the URL access method to get the file and Sharepoint Excel Services REST.

Using the REST API, you can access workbook parts or elements directly through a URL so hopefully it works with filename url access method.

 

Best regards,

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
  • 5 replies
  • 4312 views
  • 0 likes
  • 3 in conversation