title: Openpyxl - Apply Borders to Cells
body: <p>I am hoping someone can help me as I have been unable to figure this one out for myself unfortunately. </p>
  
  <p>I am trying to put a thin border around a cell using openpyxl 2.3.3 and python 3.4. I have the following code:</p>
  
  <pre><code>from openpyxl.styles import Border
  
  ws.cell('A1').border = Border(top = Side(border_style='thin', color='FF000000'),    
                                right = Side(border_style='thin', color='FF000000'), 
                                bottom = Side(border_style='thin', color='FF000000'),
                                left = Side(border_style='thin', color='FF000000'))
  </code></pre>
  
  <p>Oddly this is throwing the following error:</p>
  
  <pre><code>NameError: name 'Side' is not defined
  </code></pre>
  
  <p>I have looked at the official documentation here: </p>
  
  <p><a href="http://openpyxl.readthedocs.org/en/2.4/styles.html" rel="nofollow noreferrer">http://openpyxl.readthedocs.org/en/2.4/styles.html</a>
  <a href="http://openpyxl.readthedocs.org/en/2.4/_modules/openpyxl/styles/borders.html" rel="nofollow noreferrer">http://openpyxl.readthedocs.org/en/2.4/_modules/openpyxl/styles/borders.html</a></p>
  
  <p>I have also looked at the following articles with no luck:</p>
  
  <p><a href="https://bitbucket.org/openpyxl/openpyxl/issues/365/styling-merged-cells-isnt-working" rel="nofollow noreferrer">https://bitbucket.org/openpyxl/openpyxl/issues/365/styling-merged-cells-isnt-working</a></p>
  
  <p><a href="https://stackoverflow.com/questions/24917201/applying-borders-to-a-cell-in-openpyxl">Applying borders to a cell in OpenPyxl</a></p>
  
  <p><a href="https://stackoverflow.com/questions/13650059/apply-borders-to-all-cells-in-a-range-with-openpyxl">Apply borders to all cells in a range with openpyxl</a></p>
  
  <p><a href="https://stackoverflow.com/questions/34520764/apply-border-to-range-of-cells-using-openpyxl">Apply Border To Range Of Cells Using Openpyxl</a></p>
  
  <p>Is anyone able to help me out?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Eamon</p>