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

Excel Range should not act as an Array #1097

Open
gdementen opened this issue Feb 19, 2024 · 0 comments
Open

Excel Range should not act as an Array #1097

gdementen opened this issue Feb 19, 2024 · 0 comments

Comments

@gdementen
Copy link
Contributor

gdementen commented Feb 19, 2024

It makes things ambiguous, and it cuts users from using some of xlwings features cleanly (e.g. Range.insert). There is also more opportunities to break user code relying on xlwings methods and we add a method with the same name in Array (in addition to the same problem when we add methods to Range, which should be much rarer).

i.e.

        def __getattr__(self, key):
            if hasattr(Array, key):
                return getattr(self.__larray__(), key)
            else:
                return getattr(self.xw_range, key)

should be changed to:

        def __getattr__(self, key):
            return getattr(self.xw_range, key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant