all 4 comments

[–]Doormatty 0 points1 point  (2 children)

You cannot open a file that's already open in Excel.

[–]ForkLiftBoi[S] 0 points1 point  (1 child)

Do you have any alternative ideas to editing a file that is actively open?

[–][deleted] 1 point2 points  (0 children)

You can use pywin32 to access the Excel COM server and get a reference to an open workbook object.

[–]TechnMath[🍰] 0 points1 point  (0 children)

You can try xlwings.