I am reading in an xlsx file, like so,
import openpyxl
book = openpyxl.load_workbook('test.xlsx')
sheet = book.get_sheet_by_name(sheets['DATA'])
allCells = sheet.get_cell_collection()
print allCells
allCells is an unordered list of openpyxl.cell.Cell objects. allCells looks like,
[<Cell Data.B4>, <Cell Data.A6>, <Cell Data.B6>, <Cell Data.A1>, <Cell Data.B5>, <Cell Data.A3>, <Cell Data.A2>, <Cell Data.A5>, <Cell Data.B1>, <Cell Data.B2>]
I want to sort this list by column and then by row indices. Any ideas on how to do this?