Add a transparent shape to an Excel file using Python/Openpyxl

Viewed 368

I have many different excel files, each with their own graph. A portion of each graph is forecasted, and the rest of each graph is non-forecasted. I was wondering if openpyxl had a method of opening an excel file, and creating a roughly 80% transparent shape (probably a rectangle) that I could place on top of the forecasted region of the chart.

I can easily loop through each excel file to add the shape, I just need to figure out how to do that for one file. I've tried reading through openpyxl's documentation here:

https://openpyxl.readthedocs.io/en/2.4/api/openpyxl.drawing.shapes.html

But I'm having trouble understanding the documentation, and there are no simple examples to go off of.

I've tried using xlsxwriter's insert_textbox method, but there is not way to make it ~80% transparent. There is only 100% or 0% transparent.

0 Answers
Related