get_highest_column() increases each time it's called

Issue #123 invalid
Former user created an issue

Each time I call worksheet.get_highest_column() it returns a higher and higher column, though I'm not modifying the worksheet. {{{

wb = load_workbook('Collections-dump-subset2.xlsx') wks = wb.get_active_sheet() print wks.cell(row = 1, column = wks.get_highest_column()).address FB2 print wks.cell(row = 1, column = wks.get_highest_column()).address FC2 print wks.cell(row = 1, column = wks.get_highest_column()).address FD2

}}}

I'd expect it to stay constant if the worksheet is not modified.

Comments (2)

  1. Eric Gazoni

    hehe, I presume it's because get_highest_column is 1-based and ws.cell(..., column=) is 0-based.

    When you call cell(..., column=get_highest_column()) then you're creating a new column, which is the 0-based index + 1, so ... indeed it's increasing, but just because you're creating a new column at each call, not by itself ;-)

    This is indeed something we'd need to fix at some point ...

  2. Log in to comment