일단 load_workbook()으로 파일을 연 다음에, ws.max_row, ws.max_column 갖고 해주면 됩니다. wb=openpyxl.load_workbook("1서울/개표상황(투표구별)_강남구갑.xlsx") ws=wb.worksheets[0] print(f"max_row is in row {ws.max_row} and max_column is in column {ws.max_column}") max_row is in row 68 and max_column is in column 57 최대 행은 68, 최대 열은 57이라고 나오네요.