使用python添加带有空值的日期列中的共享点列表
我有一个带有日期列和带有日期列的Excel表以及其中一些空值的列表。现在,我需要使用客户端凭据将Excel列数据添加到共享点列表中。
sp_list ="Samplelist"
sp_lists = ctx.web.lists
s_list = sp_lists.get_by_title(sp_list)
x=pd.read_excel('ExcelBook.xlsx')
for i in range(len(x['Name'])):
item_to_create = s_list.add_item({"Title": x["Name"][i],
"Date":str(x["Date"])
}).executequery()
错误:无法将原始值转换为预期类型的“ EDM.DATETIME”。有关更多详细信息,请参见内部异常。
,400客户端错误:url的不良请求
如果Excel列中没有零值,则该代码正常工作,但是我在Excel中具有null值Sheet和我想用Excel内容更新共享点列表。
I have a list with a date column and a excel sheet with date column along with some empty values in it. Now I need to add the excel column data into share point List using Client credentials .
sp_list ="Samplelist"
sp_lists = ctx.web.lists
s_list = sp_lists.get_by_title(sp_list)
x=pd.read_excel('ExcelBook.xlsx')
for i in range(len(x['Name'])):
item_to_create = s_list.add_item({"Title": x["Name"][i],
"Date":str(x["Date"])
}).executequery()
ERROR: Cannot convert a primitive value to the expected type 'Edm.DateTime'. See the inner exception for more details.
, 400 Client Error: Bad Request for url
This code works fine if there are no null values in the excel column, However I have null values in excel Sheet and I want to update the share point list with excel content.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论