Hi Experts,
I am stuck with the logic where i need to automate reading the txt files from sharepoint. The requirement is to pull all the txt files which are available in the Sharepoint folder. I am able to copy and read the files one by one but i need to automate this process. Your idea/suggestions would really help me.
Here is the code for reading one file :
filename outfile "/sasdata/MCS_Change_Notice.txt";
PROC HTTP
URL="https://xxxx.sharepoint.com/teams/xxxx/_api/Web/getfilebyserverrelativeurl('/teams/xxxx/Shared%20Doc..."
METHOD="GET" OUT=OUTFILE;
HEADERS
"Authorization"="Bearer &access_token."
"X-RequestDigest"="form digest value"
;
RUN;
DATA _Read;
infile "/sasdata/MCS_Change_Notice.txt" truncover delimiter='^' dsd ;
input stuff $5000.;
run;
Do we have any method to pull the complete files under sharepoint folder?
Let me know if any additional details required.