BookmarkSubscribeRSS Feed
radha009
Quartz | Level 8

Getting error when trying to get data from the sharepoint -Please help

 

FILENAME website HTTP 'https://tset,com/Shared%20Documents/people_counts.xlsx';

data file;
n=-1;
infile website recfm=s nbyte=n length=len;
input;
file "C:/test/Summary.xls" recfm=n;
put _infile_ $varying32767. len;
run;

 

ERROR: Unauthorized to retrieve URL. Use the debug option for more info.
NOTE: UNBUFFERED is the default with RECFM=N.

6 REPLIES 6
ghosh
Barite | Level 11

you have a comma in the URL.

 

change the portion to

tset.com

radha009
Quartz | Level 8

typo mistake.actual program doesn;t have comma.

SASKiwi
PROC Star

You probably need to add user and password options given the authorisation problem. Also add DEBUG as suggested.

Reeza
Super User
You're aware that this just copies the data set to your C drive and doesn't import the data? I believe you can import the xls file directly from SharePoint, you don't need to have an intermediary step, you do need the correct path though. Usually, I view the file in Windows Explorer to get the path and then import it, though it's been a while since I've had to do this.
radha009
Quartz | Level 8
I view excel on sharepoibt only thru url. I can’t view thru windows explorer. How can I directly import from sharepoint?
Reeza
Super User

Is this an internal company site? Go to the document library, in Internet Explorer (not Chrome). Open the list and select view in Windows Explorer. 

 


@radha009 wrote:
I view excel on sharepoibt only thru url. I can’t view thru windows explorer. How can I directly import from sharepoint?

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 3864 views
  • 0 likes
  • 4 in conversation