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

GetInputOrSelection non-contiguous #57

Open
RaymondWise opened this issue May 17, 2016 · 2 comments
Open

GetInputOrSelection non-contiguous #57

RaymondWise opened this issue May 17, 2016 · 2 comments

Comments

@RaymondWise
Copy link
Contributor

We should probably find all the implementations of GetInputOrSelection to determine what will fail when non-contiguous ranges are selected.

Ref: #56

@RaymondWise
Copy link
Contributor Author

Actually, are non-contiguous ranges acceptable as input anywhere?

@byronwall
Copy link
Owner

I've been a little fast and loose with identifying where non-contiguous ranges are allowed. In general, I'd like for them to be supported by default, with the exceptions being those spots where it doesn't make sense. It's easy enough to iterate through For Each rngCell in Selection and support non-contiguous ranges.

Where things start to break is when there are side effects (e.g. the split into columns feature) where the code causes things to happen outside of the cell. In these cases, it may be just as easy to support non-contiguous ranges (just use Offset to find the cell to edit) but things will go awry if someone selects cells in neighboring columns.

Other places that will break are those that are feeding the selection to some internal Excel thing that does not enjoy non-contiguous ranges. I suspect most of the charting stuff will behave oddly if fed non-contiguous ranges.

Part of the problem here is that most of the code was purpose built for things that I am doing regularly and then made general. The code by its nature supports all of the use cases I have in mind so I don't run up against edge cases where people use the code in unintended ways.

I'll find those references to GetInput to get things started.

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

2 participants