반응형
import openpyxl as xls
wb = xls.Workbook()
ws = wb.active
box = Border(
left=Side(border_style="thin", color='00000000'),
right=Side(border_style="thin", color='00000000'),
top=Side(border_style="thin", color='00000000'),
bottom=Side(border_style="thin", color='00000000')
)
ws[cellStr].border = box # cellStr == 'A1'
wb.save(excelPath)
아래는 border_style 의 종류
openpyxl.styles.borders module — openpyxl 3.0.7 documentation
Value must be one of {‘hair’, ‘dashDotDot’, ‘dashDot’, ‘thin’, ‘mediumDashed’, ‘slantDashDot’, ‘dotted’, ‘dashed’, ‘medium’, ‘thick’, ‘mediumDashDot’, ‘double’, ‘mediumDashDotDot’}
openpyxl.readthedocs.io
반응형