Reputation: 183
I am trying to gain access to the active Excel workbook I have open using xlwings. Now I can do this using file paths but is there any way to do this without using the file path?
For example I am currently using:
xlwings.Workbook(file_path)
But if I take out file_path it creates a new workbook.
Thanks in advance,
Max
Upvotes: 1
Views: 3343
Reputation: 7070
According to your syntax, you're using a pre-historic version of xlwings, I recommend you to upgrade to the latest version (Book
instead of Workbook
). Check out the docs for what you're looking for:
xlwings.books.active
Upvotes: 2