up: programming - target - Libre Calc  
LibreCalc Programming
Accessing cells
What links here?
Dim oSheets
Dim oSheet
Dim oCell
oSheets = ThisComponent.getSheets()
For i = 0 To oSheets.getCount() - 1
    oSheet = oSheets.getByIndex(i)
    oCell = oSheet.getCellByPosition(0, 1) ' GetCell A2
    TheSum = TheSum + oCell.getValue()
Next
SumCellsAllSheets = TheSum


Use Sheet.getCellRangeByName("A2") to return a range of cells by name.

Cell = Sheet.getCellRangeByName("A1")
Cell = Sheet.getCellByPosition(c, r)
programming - Libre Calc - accessing cells
programming:c:time
filename:programming - Libre Calc - accessing cells
filename:programming%20%2D%20Libre%20Calc%20%2D%20accessing%20cells
last edit:March 21 2026 17:16:22 (55 days ago)
ct = 1778923147.000000 = May 16 2026 05:19:07
ft = 1774127782.000000 = March 21 2026 17:16:22
dt = 4795365.000000