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

Non-contiguous selections don't work #5

Closed
austin1howard opened this issue Jun 5, 2014 · 1 comment
Closed

Non-contiguous selections don't work #5

austin1howard opened this issue Jun 5, 2014 · 1 comment
Labels

Comments

@austin1howard
Copy link
Owner

If a non-contiguous selection (that is, not one big rectangular block) is passed to mpxl, error occurs.

@kamilm
Copy link
Collaborator

kamilm commented Jun 5, 2014

This works

from appscript import app

areas = app("Microsoft Excel").selection.areas.get()
selection = areas.pop(0).value.get()
for area in areas:
    selection = [row + area.value.get()[rowIndex] for rowIndex,row in enumerate(selection)]
print selection

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

2 participants