I don’t think there is a reasonable (and somehow efficient) way to go through all the cells of a CellRange using the For-Each construct.
If you definitely prefer “For-Each” over different kinds of loops, you can do it for the DataArray
of a CellRange as shown in
Sub demo4you1()
myFixSheet = ThisComponent.Sheets(0)
myHardCodedRange = myFixSheet.getCellRangeByName("A1:Z2")
r = 0
For Each stripe In myHardCodedRange.DataArray()
r = r + 1
c = 0
For Each element In stripe
c = c + 1
If (TypeName(element)="String") AND (element<>"") Then Print r, c, element
Next element
Next stripe
End Sub
and if you don’t need to regard which cell returned what string, you can simpliyfy this by omitting r and c.
I would rather suggest to create nested loops for r and c, and to create the single cells -if needed at all- based on these indices. (You will already know that such indices are 0-based in the LibO API.) Doing it this way, your Sub may look like
Sub demo4you2()
myFixSheet = ThisComponent.Sheets(0)
myHardCodedRange = myFixSheet.getCellRangeByName("A1:Z2")
With myHardCodedRange.RangeAddress
For r = .StartRow To .EndRow
For c = .StartColumn To .EndColumn
rc_cell = myFixSheet.getCellByPosition(c, r)
Print rc_cell.AbsoluteName, rc_cell.Type, IIf(rc_cell.String<>"", rc_cell.String, ":empty:")
Next c
Next r
End With
End Sub
Anyway: If sticking to LibreOffice, you shouldn’t “think the VBA way”. And if VBA is actually simple, is a different question. It surely isn’t “simply better”.