Hello,
You can do this with queryVisibleCells()
.
Simple example:
Sub Snippet
Dim oSheets As Variant
Dim oCurrentController As Variant
Dim oActiveSheet As Variant
Dim oCellRangeByPosition As Variant
Dim oObj1 As Variant
Dim sAbsoluteName As String
oSheets = ThisComponent.getSheets()
oCurrentController = ThisComponent.getCurrentController()
oActiveSheet = oCurrentController.getActiveSheet()
oCellRangeByPosition = oActiveSheet.getCellRangeByPosition(0, 0, 0, 99) 'Cell range A1:A99'
oObj1 = oCellRangeByPosition.queryVisibleCells()
sAbsoluteName = oObj1.AbsoluteName 'sAbsoluteName contains visible cells in range'
End Sub
Just set you cell range and use queryVisibleCells()
to see what is not hidden. Use as basis for your selection.