Reply To: Get Selected Table Rows With ExtendScript?

#115802
Kal Starkis
Member

Okay, reading Michel’s comment again, and actually checking the behaviour in InDesign, I think I get it. If you select multiple cells, say in column 1 of a two column table, then shift-click on ANY cell in column 2, all the rows get selected. (It doesn’t matter which row you target.) So I can see how SelectionOptions.ADD_TO just mimics this behaviour.

And I guess app.selection[0].rows.everyItem().select() probably fails because there’s no guarantee of everyItem() delivering a contiguous selection (even though it does in this case). Since InDesign doesn’t support multiple selections, it makes sense that select() would require a single object. Jeremy, this may begin to explain why your selection (going back to your original question) was reported as a single object (Cell) and not a collection?? That seems like a bit of a hack on Adobe’s part though. Perhaps a genuine ExtendScript guru will stumble onto this thread and explain it to us in a way that makes sense.

This article was last modified on April 3, 2019

Comments (0)

Loading comments...