Un par de macros interesantes para eliminar filas pares o impares, según necesidad. Estas macros pueden ser sustitudias por la publicada anteriormente, utilizando algún que otro truco, todo es cuestión de prueba-error. De cualquier manera aquí lo dejo:
Eliminar filas pares:
Sub eliminaFilasPares()
Dim oRow as Variant
oDocument = ThisComponent
oSelectedCells = oDocument.CurrentSelection
oActiveCells = oSelectedCells.RangeAddress
oSheets = oDocument.Sheets
oSheet = oSheets.getByIndex(oActiveCells.Sheet)`active table
For nRow = oActiveCells.EndRow To oActiveCells.StartRow step -1
If nRow Mod 2 <> 0 Then
Set oRow = oSheet.getRows().getByIndex(nRow)
`Select the row
`ThisComponent.getCurrentController().select(oRow)
`Delete the row from the worksheet
osheet.removeRange(oRow.RangeAddress, com.sun.star.sheet.CellDeleteMode.UP)
End if
Next
End sub
Eliminar filas impares
Sub eliminaFilasImpares()
Dim oRow as Variant
oDocument = ThisComponent
oSelectedCells = oDocument.CurrentSelection
oActiveCells = oSelectedCells.RangeAddress
oSheets = oDocument.Sheets
oSheet = oSheets.getByIndex(oActiveCells.Sheet)`active table
For nRow = oActiveCells.EndRow To oActiveCells.StartRow step -1
If nRow Mod 2 <> 0 Then
Set oRow = oSheet.getRows().getByIndex(nRow+1)
`Select the row
`ThisComponent.getCurrentController().select(oRow)
`Delete the row from the worksheet
osheet.removeRange(oRow.RangeAddress, com.sun.star.sheet.CellDeleteMode.UP)
End if
Next
End sub