# 统一表格样式 rows = ws.max_row columns = ws.max_column # print(rows) # print(columns) for row in range(1, rows+1): for column in range(1, columns+1): ws.cell(row=row, column=column).border = border_set if row == 1: ws.cell(row=row, column=column).fill = fill