使用Python将Excel文件上载到Sharepoint

2024-09-30 08:28:49 发布

您现在位置:Python中文网/ 问答频道 /正文

from shareplum import Site
from shareplum import Office365
from shareplum.site import Version

authcookie = Office365('https://********.sharepoint.com/', username='dhruvpanchal@******.onmicrosoft.com', password='********').GetCookies()
site = Site('https://******.sharepoint.com/sites/BorakayInternal', version=Version.v2019, authcookie=authcookie)
folder = site.Folder('Shared Documents/This Folder')
folder.upload_folder('ConsolidatedTimesheet.xlsx')

在这段代码中,我得到一个错误:-

folder.upload_folder('ConsolidatedTimesheet.xlsx')
AttributeError: '_Folder' object has no attribute 'upload_folder'

谁能帮我解决这个问题


Tags: fromhttpsimportcomversionsitefolderupload

热门问题