Skip to content

Commit

Permalink
Combines multiple selections into one, so it's easy to not include co…
Browse files Browse the repository at this point in the history
…lumns. Fixes #5
  • Loading branch information
Austin Howard committed Jul 23, 2014
1 parent 6be82b7 commit 6cc937e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mpxl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ def getSelection(self):
"""
Gets the active selection from excel using appscript module.
Returns list of lists, and saves as self.selectionList
If there's multiple selections, combine into one
"""
self.selectionList = app(u'Microsoft Excel').selection.value.get() # get selection
areas = app("Microsoft Excel").selection.areas.get()
self.selectionList = areas.pop(0).value.get()
for area in areas:
self.selectionList = [row + area.value.get()[rowIndex] for rowIndex,row in enumerate(self.selectionList)]
return self.selectionList

def insertPlot(self):
Expand Down

0 comments on commit 6cc937e

Please sign in to comment.