尝试使用python openpyxl获取列值时出现错误

时间:2019-06-18 18:35:51

标签: python-3.x openpyxl xlsx

我编写了一个python脚本,该脚本应该从电子表格中返回列值,但是在尝试进行迭代时会出错。

参考的openpyxl文档。

#Accessing MS Updates Excel File
    wb = load_workbook(filename='C:/Users/raghvendra_m/Downloads/Security Updates.xlsx', read_only=True)
    sheet = wb.active
#Fetching CVE Column from MS Updates
    for row in sheet.iter_rows("I{:d}:I{:d}".format(sheet.min_row, sheet.max_row)):
        for cell in row:
            MS_list_CVE.append(cell.value)
            print(MS_list_CVE)

Error

感谢任何指针,谢谢

0 个答案:

没有答案