Basically what I want to do is:
Code: Select all
oCell = ThisComponent.getCellByName("A4")
oCell.String = "Value"
oCell.Column = oCell.Coumn+1
oCell.Formula = "=0"
Code: Select all
oCell = ThisComponent.getCellByName("A4")
oCell.String = "Value"
oCell.Column = oCell.Coumn+1
oCell.Formula = "=0"
Code: Select all
oSheet = ThisComponent.CurrentController.ActiveSheet
oCellA4 =oSheet.getCellRangeByName("A4")
oCellA4.String = "Value"
CellAddr = oCellA4.CellAddress
oNeighbor = oSheet.getCellByPosition(CellAddr.Column + 1, CellAddr.Row)
oNeighbor.Formula = "=0"
Perfect, thanks a lot!FJCC wrote:This macro acts on the currently active sheet.Code: Select all
oSheet = ThisComponent.CurrentController.ActiveSheet oCellA4 =oSheet.getCellRangeByName("A4") oCellA4.String = "Value" CellAddr = oCellA4.CellAddress oNeighbor = oSheet.getCellByPosition(CellAddr.Column + 1, CellAddr.Row) oNeighbor.Formula = "=0"