I want to grab the text in a bunch of mouse selected Cells and do something with it:
doc = XSCRIPTCONTEXT.getDocument()
sheet = doc.Sheets[0]
sel = doc.getCurrentSelection()
r = sel.Rows.Count
c = sel.Columns.Count
I get the length of the selection but I don’t know it’s position on the Sheet. I dumped the various methods for object Selection but it does not mention a Position. It’s also not clear to me what the difference is between a Range and a mouse Selection. Is all this explained somewhere?
There’s sel.Position → X = (long)0x5ec6, Y = (long)0x1706
And sel.RangeAddress has what I’m looking for in a dictionary BUT I can’t do sel.RangeAddress[‘Sheet’] etc…
(com.sun.star.table.CellRangeAddress){ Sheet = (short)0x0, StartColumn = (long)0x2, StartRow = (long)0x2, EndColumn = (long)0x2, EndRow = (long)0x9 } Corresponds to my selection…
How are such data structures used?