for c in rows[0]:
    c.style.borders.top.border_style = Border.BORDER_THIN
for c in rows[-1]:
    c.style.borders.bottom.border_style = Border.BORDER_THIN
ws = load_workbook('example.xlsx').get_active_sheet()
set_broder(ws, 'C3:H10')
Apply borders to all cells in a range with openpyxl