Bis jetzt habe ich nur herausgefunden, wie ich sehe, ob in einer Zelle ein Text, eine Zahl, eine Formel oder nichts ist.
Wie finde ich heraus, ob ein Fehler in der Formel ist?
Code: Alles auswählen
ErsteZeile = 11
LetzteZeile = LoeschenZeile-1
ErsteSpalte = 0
LetzteSpalte = vLetzteSpalte
For x = ErsteZeile to LetzteZeile
For y = ErsteSpalte to LetzteSpalte
Adresse = oDoc.sheets.getByName("Angebot").getCellByPosition(y,x)
'Test was was ist
'If Adresse.Type = 0 Then
'Adresse.String = "-0-" 'Kein Inhalt
'ElseIf Adresse.Type = 1 Then
'Adresse.String = "-1-" 'Zahl
'ElseIf Adresse.Type = 2 Then
'Adresse.String = "-2-" 'Text
'ElseIf Adresse.Type = 3 Then
'Adresse.String = "-3-" 'Formel
'End If
'Ende Test
Select Case Adresse.Type
Case com.sun.star.table.CellContentType.EMPTY
Adresse.String = "-"
Adresse.VertJustify = com.sun.star.table.CellVertJustify.CENTER
Adresse.HoriJustify = com.sun.star.table.CellHoriJustify.CENTER
End Select
Next y
Next x