I'm getting the last modified content in a spreadsheet through the Sheet Events, say with parameter ChangedContents.
Calling the functions below, I know whether I'm dealing with a single cell, a single range, or multiple ranges.
Code: Select all
Dim SelectionIsCell, SelectionIsUniqueCellRange, SelectionIsMultipleCellRanges As Boolean
SelectionIsCell = ChangedContents.supportsService("com.sun.star.sheet.SheetCell")
SelectionIsUniqueCellRange = ChangedContents.supportsService("com.sun.star.sheet.SheetCellRange")
SelectionIsMultipleCellRanges = ChangedContents.supportsService("com.sun.star.sheet.SheetCellRanges")
For instance, I'd like to be able to call getRangeAddress or getCellRangeByPosition on each range of ChangedContents, when it supports SheetCellRanges.
Thank you.