Cells can be accessed via the sheet in which they are:
objSheets.getByName("TheSheetName")
.
'Print Cell Value, String, Or Formula
'******************************************************************
'Author: Sasa Kelecevic
'email: scat@teol.net
Sub ExampleGetValue
Dim oDocument As Object, oSheet As Object, oCell As Object
oDocument=ThisComponent
oSheet=oDocument.Sheets.getByName("Sheet1")
oCell=oSheet.getCellByPosition(0,0) 'A1
print oCell.getValue
'print oCell.getString
'print oCell.getFormula
End sub
'Set Cell Value, Format, String, Or Formula
'******************************************************************
'Author: Sasa Kelecevic
'email: scat@teol.net
Sub ExampleSetValue
Dim oDocument As Object, oSheet As Object, oCell As Object
oDocument=ThisComponent
oSheet=oDocument.Sheets.getByName("Sheet1")
oCell=oSheet.getCellByPosition(0,0) 'A1
oCell.setValue(23658)
'oCell.NumberFormat=2 '23658.00
'oCell.setString("oops")
'oCell.setFormula("=FUNCTION()")
'oCell.IsCellBackgroundTransparent = TRUE
'oCell.CellBackColor = RGB(255,141,56)
End Sub