title: Is it possible to apply a style to a whole sheet with openpyxl?
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>So my question is if it's possible to do this and how.</p>
  
  <p>Thank you.</p>
  
  <p>I have read this documentation but it doesn't answer this question: <a href="https://openpyxl.readthedocs.io/en/stable/styles.html" rel="nofollow noreferrer">https://openpyxl.readthedocs.io/en/stable/styles.html</a></p>
  
  <pre class="lang-py prettyprint-override"><code>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')
  </code></pre>
  
  <p>In this example, I can set the format for a single cell but I need it to be applied in the whole sheet.</p>