How do I add (i.e insert) a picture file only if it doesn't exist? Currently I'm using:
python
xw.Picture.add(fig_path + '/quality_index.png', sheet='Overall Index',
left=xw.Range('G1').left, top=xw.Range('G1').top,
height=400, width=500)
However every time I run my python script a new picture is inserted on top of the prexisiting one. I would like to check if that picture exists (by assigning it a name first?) and then only insert it if it doesn't exist.
Bonus: can I specify the size of the picture in cm or inches?
Thanks!!
该提问来源于开源项目:xlwings/xlwings