title: Draw a line between two excel cells using openpyxl
body: <p>I would like to draw a line between the centers of two ( non-adjacent ) cells in an Excel work sheet using openpyxl.</p>
  
  <p>Using openpyxl I have created a fairly large lookup table. Many of the points in the lookup table are interpolated from a hand full of known points.</p>
  
  <p>I would like to draw lines between the cells that were created using the known points. These lines would sort of circle the areas that are interpolated.</p>
  
  <p>Expected Result:<br>
  (This is the actual Excel generated spread sheet, The lines were added by hand in Excel. I want to automate the line drawing. )</p>
  
  <p><a href="https://i.stack.imgur.com/B8yba.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B8yba.jpg" alt="enter image description here"></a>  </p>
  
  <p>In this case the white cells are known data points. Green(ish) cells are inside of the bounding trianges. Redish-Blueish are outside.
  All of data on this sheet was populated via a new sheet using openpyxl.</p>
  
  <p>The openpyxl documention hints that this is possible but I do not understand how.</p>
  
  <p>Something along the lines of:</p>
  
  <pre><code>ws.Line['A1':'P17].style['heavy','black']
  </code></pre>
  
  <p>I think is what I am looking for.</p>
  
  <p>[A bit more data ]  </p>
  
  <p>Using Excel and win32com I can automate drawing these lines.    </p>
  
  <pre><code>line = ws.Shapes.Addline(3,4,70,80).Line
  </code></pre>
  
  <p>However do to other limitations in Excel I have to create this offline using openpyxl.  <a href="https://stackoverflow.com/questions/54639467/setting-the-color-of-a-large-number-of-excel-cells-quickly">Other_Limitations</a><br>
  So to re-phrase my question:<br>
  <strong>Can openpyxl even draw lines?</strong></p>
  
  <p>I am beginning to think that I will have to create the spreadsheet with openpyxl then open the newly created workbook with Excel and draw the lines with Excel.</p>