community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

How to download a Excel file from SharePoint folder and Put that Excel in a Network Folder

Meteoroid

Hi All, 

 

I have this situation from quite some time which I couldn't find a solution to so far. 

 

Situation: How to download a Excel file from SharePoint folder and Put that Excel file in a Network Folder?

 

Immediate/URGENT need are (1 and 2)/priority 1 

 

1. My data is in a Excel file in a SharePoint folder.

2. I need to download the excel file from the SharePoint folder and put that file in a network folder. 

 

Priority 2 

 

3. Need the output file to write to a database

 

Note*: Alteryx's SharePoint Lists doesn't work. 

 

I am looking forward for your help (Alteryx Community) with any ideas to lead to the desired outcome.  

 

Thank you for your help in advance. 

 

Warm Regards,

Srini

Bolide
Bolide

Hi @SrinivasAnupoju,

 

SharePoint libraries are not supported in Alteryx, you would need to develop an API integration yourself to handle this situation.

 

API method you need for this is called: 'GetFolderByServerRelativeUrl', and you can find all details here: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest

 

The main challenge to get it all working is authentication procedure, i wrote a bit on it here: 

 

 

Downloading a file from SharePoint (whatever the file type) to a network drive will involve making similar call to the below and using a Blob Output tool (replace 'yoursiteaddress' with address of your SP site):

 

"https://yoursiteaddress/_api/web/GetFolderByServerRelativeUrl" + "('" + [folder_name] + "')/Files('" + [file_name] + "')/$value"

 

Thanks,

Rafal

 

#Excuse me, do you speak Alteryx?

Highlighted

Srini:
Is your SharePoint installation on your network or is it SharePoint Online?  If it's on premises, then getting the file from the library might be as easy as using the Run Command tool to call a .bat file to robocopy from the SharePoint server's file system to a network share.

 

This is an idea only but could be easily tested.  This may or may not work and I make no warranties or promises that it will.

1.  Go to the SharePoint list/library and click the View Files in Explorer.  (You'll probably need IE 11, if you're on older version of SharePoint, like what we're currently migrating from.)

2.  See if you can manually copy the file from the SharePoint directory and paste it to the network location.  If it works, then on to step 3

3.  Armed with that, see if you can open a Command prompt and use robcopy to get the file to the network drive.  I am assuming you have permissions to read from and write to the SharePoint and network directories in question.

4.  Use the Run Command to call the batch file.

 

If this needs to be run by Alteryx Server, then whatever account is used by the server will need to have permissions to both origin and destination directories

 

Good Luck!

David

 

Labels