I would like to draw a line between the centers of two ( non-adjacent ) cells in an Excel work sheet using openpyxl.
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.
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.
Expected Result:
(This is the actual Excel generated spread sheet, The lines were added by hand in Excel. I want to automate the line drawing. )
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.
The openpyxl documention hints that this is possible but I do not understand how.
Something along the lines of:
ws.Line['A1':'P17].style['heavy','black']
I think is what I am looking for.
[A bit more data ]
Using Excel and win32com I can automate drawing these lines.
line = ws.Shapes.Addline(3,4,70,80).Line
However do to other limitations in Excel I have to create this offline using openpyxl. Other_Limitations
So to re-phrase my question:
Can openpyxl even draw lines?
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.