BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JayS
Obsidian | Level 7
I have a requirement to import an Excel document off of one of the enterprise SharePoint sites. I have access to the SharePoint site and have placed the document on the SharePoint site. I have started the PC File Server installed on my laptop. I am running SAS EG 7.15. I have tried many filename / libname / Proc Import / Proc HTTP URL= / ... Combinations Can this be done: Importing an Excel document located on a SharePoint site from a SAS EG Program. Thinking it may be a security issue... TIA for the time... Jay
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Unfortunately it's not that simple. As SharePoint Online is in the Azure cloud, you need to use some APIs to access the file, download it to your SAS session, and then import.

 

There are a few setup steps to complete first in order to get your SAS session connected with Microsoft 365. These will require cooperation with your IT team or whoever manages your Microsoft 365 tenant. Once complete, you can use the code and macro routines shared here to list your SharePoint folders and files, download the file you need, and even upload content from SAS to SharePoint if needed.

 

I have documentation and examples (and a demo video) in this article: How to use SAS to access Microsoft 365 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

1 REPLY 1
ChrisHemedinger
Community Manager

Unfortunately it's not that simple. As SharePoint Online is in the Azure cloud, you need to use some APIs to access the file, download it to your SAS session, and then import.

 

There are a few setup steps to complete first in order to get your SAS session connected with Microsoft 365. These will require cooperation with your IT team or whoever manages your Microsoft 365 tenant. Once complete, you can use the code and macro routines shared here to list your SharePoint folders and files, download the file you need, and even upload content from SAS to SharePoint if needed.

 

I have documentation and examples (and a demo video) in this article: How to use SAS to access Microsoft 365 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 6157 views
  • 1 like
  • 2 in conversation