I am learning to use the openpyxl module and I am trying to make a standard style in a sheet. I have been searching for an answer in documentation and other people questions but I don't find it.
I have found ways to change the style of single cells and I could loop it to apply to a high amount of cells, but that doesn't solve my problem as I need the whole sheet to fit the style.
So my question is if it's possible to do this and how.
Thank you.
I have read this documentation but it doesn't answer this question: https://openpyxl.readthedocs.io/en/stable/styles.html
from openpyxl.styles import NamedStyle, Font, Border, Side
import openpyxl
workbook = openpyxl.Workbook()
highlight = NamedStyle(name = "highlight")
highlight.font = Font(bold=True, size=20)
bd = Side(style='thick', color="000000")
highlight.border = Border(left=bd, top=bd, right=bd, bottom=bd)
sheet = workbook.get_sheet_by_name('Sheet')
sheet['A1'].style = highlight
workbook.save('example.xlsx')
In this example, I can set the format for a single cell but I need it to be applied in the whole sheet.