0

I'm working on a project and want to be able to manipulate data (add, remove, stylize etc.) of an open spreadsheet with python. Is there a way to do this or do I need to enter the file path to work with the spreadsheet?

For example, let's say I have multiple spreadsheets open (file1.xlsx, file2.xlsx, file3.xlsx), and I'm currently focused on file2.xlsx, I want my program to be able to recognize what file is currently focused and manipulate (mostly read) data from that file.

I have looked through libraries but I can't seem to find one that can do this, maybe there is a library which can get the path of the current focused file, idk?

  • If you are using Excel to view these spreadsheets, then there is no way to edit (with Python) and view them at the same time. View [this answer](https://stackoverflow.com/a/28879986/9731347) to a similar question. – SanguineL May 17 '23 at 17:22
  • However, if you wanted to select the file to edit with a dialog window, this is certainly possible. [This](https://stackoverflow.com/a/3579747/9731347) is the easiest way to accomplish that. – SanguineL May 17 '23 at 17:25

0 Answers0