He estado practicando con las macros y he preparado una muy sencilla.
Código: Seleccionar todo
Sub AJUSTES()
'--------------------------------------------------------------------------------------------
Dim oHoja As Object
Dim oCell4 As Object
Dim oCell2 As Object
Dim a As Integer
Dim b As Integer
oHoja = ThisComponent.getCurrentController.getActiveSheet()
For a = 3 to 700
' MsgBox oCell4.getType() '0: Vacia - 1: Número - 2: Texto - 3: Fórmula
oCell4 = oHoja.getCellByPosition(4,a)
oCell2 = oHoja.getCellByPosition(2,a)
If oCell4.Type = EMPTY Then
Call CeldaElimina(a, "E")
End If
If oCell2.Type = EMPTY Then
Call CeldaElimina(a, "C")
End If
Next a
End Sub
'--------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------
Error de ejecución de BASIC.
Se ha producido una excepción
Type: com.sun.star.lang.IndexOutOfBoundsException
Message: .
Os agradecería que me ayudaséis a saber por qué ocurre esto.
Un saludo y gracias