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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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