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

xw.Book() and xw.books.open() raise different error if file does not exist #540

Closed
fzumstein opened this issue Aug 5, 2016 · 3 comments
Closed
Labels
Milestone

Comments

@fzumstein
Copy link
Member

should be aligned

@fzumstein fzumstein added this to the short list milestone Aug 5, 2016
@ghost
Copy link

ghost commented Oct 14, 2016

xw.books.open("Test.xlsx") should open up this file if it isn't open. Right now just returning AttributeError.
xw.Book("Test.xlsx") opens up Test.xlsx as expected.

@ghost
Copy link

ghost commented Oct 14, 2016

I cloned this to my Git and rand the unit tests. They work fine and now so does xw.books.open("Test.xlsx"). Seems something was causing my previous calls to xl.books.open() to attempt to reference a None object.

@fzumstein
Copy link
Member Author

xw.books is the collection of the active app. If there's no Excel instance running, i.e. there's no app, it will not work. xw.Book is a convenience class that takes care of instantiating a new app if there isn't one yet.

@fzumstein fzumstein modified the milestones: v0.10.1, short list Oct 18, 2016
fzumstein pushed a commit that referenced this issue Oct 18, 2016
* initial commit on my fork

* test commit

* chenged gitignore

* linked eceptions for Book() and Books()

* fix for issue 540

coordinated exceptions accross calls to xw.Book and .books() methods.
Added one unit test to each unit test suite (look for _bad_open)

* deleted project files

* test
@fzumstein fzumstein added bug and removed enhancement labels Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant