[SOLVED] BASIC|Calc: how to delete cell

Hi

How to delete cell in basic/calc?
Not a row or column (removeByIndex).
I have empty cell between two fill cell
and I wona to delete that empty cell,
then the two fill cell are close to each other.

Doc.Sheets(1).getCellByPosition(x,y).?????????????????

By
Chris

It’s not needed (and even is wrong) to add [SOLVED] to the title here. Instead, you need to choose the solution by clicking to the checkbox to the left of the accepted answer, and that would mark the topic appropriately, including for searching purposes.

Use sheet’s removeRange method:

Doc.Sheets(1).removeRange(Doc.Sheets(1).getCellByPosition(x,y).RangeAddress, com.sun.star.sheet.CellDeleteMode.UP)