What causes “UserWarning: Discarded range with reserved name” - openpyxl

后端 未结 3 1686
[愿得一人]
[愿得一人] 2021-02-12 23:26

I have a simple EXCEL-sheet with names of cities in column A and I want to extract them and put them in a list:

def getCityfromEXCEL():
    wb = load_workbook(fi         


        
3条回答
  •  时光取名叫无心
    2021-02-12 23:50

    In my case this warning shows up when filtering is on one of my worksheets. I wanted to suppress the warning so that it didn't bother my users and I just put this line in my code before the openpyxl.load_workbook call:

    warnings.simplefilter("ignore")
    

提交回复
热议问题