Skip to content

Excel Range should not act as an Array #1097

Open
@gdementen

Description

@gdementen

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions