calc

SPLIT funktion für OpenOffice

Hier ein Macro mit dem man auch in OpenOffice SPLIT nutzen kann:

REM ***** BASIC *****

Sub TestStrSplit
Dim a
Dim s As String
Dim i As Integer

s = "hello OOoBasic programmers, this is another solution"

a = StrSplitArray(s," ",2)
MsgBox(a)
End Sub

Function StrSplitArray(s As String, SplitChar As String, Field As Integer)
Dim tmp
tmp = StrSplit(s, SplitChar)
if(UBound(tmp) >= Field) then
StrSplitArray = tmp(Field)
else
StrSplitArray = "#NV"
endif
End Function

Function StrSplit(s As String, SplitChar As String)

Inhalt abgleichen