I have to check the content of an Excel file uploaded to SharePoint and if the columns don't follow an order, switch them to have the order needed.

I've thought to make an Remote Event Receiver and host it in Azure.

What I don't know if it's possible to do is get the SPFile with the remote event receiver and download it to a local machine, modify the file if needed, and uploaded again to SharePoint.

Is this a good approach? Can I do it without downloading it?

I've been searching, but I haven't seen how can I modify the content of a file hosted in a Sharepoint library.

  • 1
    Yes it is possible using Remote Event Receiver. You can download a file to local machine then modify and re-upload it. But Remember one thing SPFile object(server object model) is not availalbe in Provider Hosted App. You will have to use alternative CSOM object for the same. Jan 18, 2019 at 19:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.