i have below python Code
def add_value_by_date(file_name, start_column, start_row, value):
with closing(load_workbook(filename=file_name)) as wb:
ws = wb.active
start_row =int(start_row)
start_column= int(start_column)
for i in value:
i = datetime.datetime.strptime(i, "%m/%d/%Y")
ws.cell(row=start_row, column=start_column).value = i
start_row += 1
wb.save(file_name)
在尝试转换值 i = datetime.datetime.strptime(i, "%m/%d/%Y")
后,我遇到了错误。
我的列表中的数据:
['06/26/2018', '06/26/2018']
错误消息:
IndentationError: unindent does not match any outer indentation level