Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain the workbook #3

Closed
Wtower opened this issue Jan 19, 2022 · 0 comments
Closed

Obtain the workbook #3

Wtower opened this issue Jan 19, 2022 · 0 comments
Assignees

Comments

@Wtower
Copy link
Owner

Wtower commented Jan 19, 2022

According to the documentation

https://docs.xlwings.org/en/stable/api.html#xlwings.main.Books.open
https://stackoverflow.com/questions/49883687/xlwings-book-hangs-if-file-is-already-open/49905875#49905875

xw.books.open() should return a specified xlsx file and open it if not yet open.

This does not work well for workbooks that are shared in OneDrive or live in shared folders of OneDrive. Any attempt to open, or even access the fullname property of that book throws the following error.

xlwings.XlwingsError: Couldn't find your local OneDrive file, see: xlwings.org/error

This is a false error description after many hours of investigation.

A workaround would be to check the name property for an open worksheet of the same name, ignoring the path.

This is very dangerous if another workbook of the same file is open (both cannot be open as xl forbids it).

@Wtower Wtower self-assigned this Jan 19, 2022
@Wtower Wtower closed this as completed in f242a25 Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant