Wpis z mikrobloga

REM *** BASIC ***

Sub Main
Dim Doc As Object
Dim Sheet As Object
Dim Cell As Object

Doc = ThisComponent
Sheet = Doc.Sheets(0)

Dim S ' pierwszy piersz
Dim K ' ostatni wiersz
For S = 1 To 10
K = S*(3+1)-1
Doc = ThisComponent
Sheet = Doc.Sheets(0)
' trzeba podać wiersz i kolumnę
Cell = Sheet.getCellByPosition(2, 0+(3+1)*S)
Cell.Formula = "=AVG(C"+S+":C"+(S+3)+")"
Next S

End Sub