#import
import openpyxl
from openpyxl.styles import Border, Side
#----
# your code for opening the excel document
# assign the workbook to wb or any other variable
#----
#create a border style
border = Border(left=Side(border_style='thin', color='FF0000'), # Red border
right=Side(border_style='thin', color='FF0000'),
top=Side(border_style='thin', color='FF0000'),
bottom=Side(border_style='thin', color='FF0000'))
# Apply the border to the cells
wb['A1'].border = border