I think I am in the same boat as Narasimha. I followed the documents on connecting Sharepoint and SAS to extracts lists, but was rewarded with an Unauthorized access message to the URL. From that, I found a 2005 note http://support.sas.com/kb/15/692.html that indicates that Filename URL won’t work with the authorization issue I encountered.
Since some of the sample documentation (e.g., SAS Global Paper 390-2009) shows Filename URL working, I am wondering if this indicates that my Sharepoint install is not as basic as I thought or the samples used a program that I don’t have. Can anyone tell me if the functionality for import direct from Sharepoint is only intended to work with Web Parts or for users with a certain level of security?
I use following code to download a xls file from sharepoint through proxy server
filename out "C:\temp\testout.xls";
proc http
in=in
out=out
url="http://collaboration.test.xyz.net/cnrd/cd/cdstudycode/XXX/Structure.xls"
method="get"
proxyhost="xxx.xx"
proxyusername="xxx"
proxypassword="xxx"
proxyport=8080;
run;
Randy,
Can you tell me how you figured out what the url is of the xls format. Whenever I attempt to figure it out, it exports out but I can't figure out the URL.
Thanks.
In your browser, move your mouse to the correspond EXCEL file icon, right click mouse, and select 'Copy link address'. Then you can copy the full url from clipbord.
Randy;
Unfortunately I do not seem to have the same menu options. However, Thanks for the tip.
Lawrence
The code below works for me ...
PROC IMPORT OUT= WORK.SHAREPOINTIMPORT
DATAFILE= "\\sharepoint02\Technology\Reports\Quality\CPQ.xls"
DBMS=EXCEL REPLACE;
SHEET="AUTOX";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
Unfortunately that method will only work if you are running SAS on your Windows machine.
I have SAS running on my machine.
Then the question with this syntax is whether your Sharepoint server allows you to view the document folder as if it was a actual network folder. On the sites I have used you can access a document library as if it was a network folder by selecting Open in Windows Explorer from the Actions menu. See image below.
I assume that is a feature that the site owner can turn on or off depending on the security settings that they need, but the details of how are beyond me.
Yea, the permissions are set by IT staff of which I have no control over.
Looking at Plan B right now.
Lawrence
You may not be able to "control" the settings, but you can ask to have them changed. IT is (should be) there to help us to do our jobs, not to create barriers!
Security settings can be very narrowly defined so that you only get as much rope as you need to do the specific task. If you don't ask, you won't get!
Bill,
You are right, if you don't ask, you don't get.
Found a much easier solution actually. Our sharepoint allows (some users) to save as an Access 2007-10 DB with a linked table to sharepoint.
Solves the problem!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.