0

I want to Connect to an excel from Sharepoint using python but it doesnt work.

My code:

df = pd.read_excel(url,sheet_name = 'Sheet1', header = 0, auth=(username, password))

My error:

TypeError: read_excel() got an unexpected keyword argument 'auth'

How can I connect?

find a solution at this problem

  • Does this answer your question? [Read sharepoint excel file with python pandas](https://stackoverflow.com/questions/69488725/read-sharepoint-excel-file-with-python-pandas) – alphaBetaGamma Dec 21 '22 at 11:29
  • There are no `auth` argument there. Refer to the official document, ` pandas.read_excel(io, sheet_name=0, *, header=0, names=None, index_col=None, usecols=None, squeeze=None, dtype=None, engine=None, ...)` – Misinahaiya Dec 21 '22 at 11:34

1 Answers1

0

Sharepoint files are protected behing an authentification system, you first need to be able to connect to Sharepoint with your program using Sharepoint API before accessing the file.

See : https://learn.microsoft.com/en-us/answers/questions/78034/how-to-connect-python-program-to-sharepoint-rest-a.html

How to access a sharepoint site via the REST API in Python?

BDurand
  • 108
  • 1
  • 10