I have a dataframe that I want to export to an existing Excel file that exists online on my company's sharepoint. I have the following line of code to do this:
df.to_excel(r'Path where the exported excel file will be stored\File Name.xlsx', sheet_name='Your sheet name', index = False)
The filepath starts with https and ends with a filetype .xlsx?web=1
Python of course doesn't recognise .xlsx?web=1 as a valid filetype so do I just ignore the ?web=1 at the end? This is what I did but get an access denied error. What do I need to do to be able to export to this file?
?web=1, is not part of the file path ... we need to know what 'Path were the file is stored' looks like. Are you entering a URL or a UNC filepath to a mapped drive?