5

I have a SharePoint system with authentication automatic.

So, I need to read, create, edit some Excel files from this Sharepoint.

No, I don't want download it and manipulate in local. I need to read like a Dataframe and save like a Excel at the end.

The functions read_excel and to_excel from Pandas, they don't recognize the URL address.

I can use like a Windows path if I use a Sharepoint path with origin in my computer (like OneDrive), but the others can't run the same routines, because they need use this URL address.

2 Answers 2

2

You should try using this module: Office365-REST-Python-Client. You can do everything you asked for using this.

Sign up to request clarification or add additional context in comments.

2 Comments

I don't see how use this. All the examples that I found, it was about authentication, and I don't need this.
Why not? you can download files, update them and upload them back! Wasn't that your question?
0

You can synchronize your Sharepoint with your computer.

In that way, you can access Sharepoint files through Python with an absolute path "C:\Users\user_name\Documents...", make your edits and the files will be synchronized with the online Sharepoint.

If others need to use your routine, you can make the path dynamic:

import getpass
import os

user_name = getpass.getuser()
base_path = r"C:\Users"
sharepoint_path = os.path.join(base_path, user_name, sharepoint_folder, subfolder1, ...)

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.