Mir ist nicht bekannt, ob Sie mit der Funktion „Text in Spalten()“ das tun, was Sie wollen, aber hier ist eine einfache Funktion, die das tut, was Sie wollen
Names Default To Here( 1 );
dt = New Table( "Example",
Add Rows( 3 ),
New Column( "string",
Character,
"Nominal",
Set Values( {"1,2,3", "1,2,3,4", "1,,3,4"} ),
Set Display Width( 44 )
)
);
newTexttoColumns = Function({dt,x},{defaultlocal},
start = N Cols( dt );
For( theRow = 1, theRow <= N Rows( dt ), theRow++,
theWord = "";
wordCnt = 1;
For( i = 1, i <= Length( Column( x )[theRow] ), i++,
If( Substr( Column( x )[theRow], i, 1 ) == "," | i == Length( Column( x )[theRow] ),
If(i == Length( Column( x )[theRow]),theWord = theWord || Substr( Column( x )[theRow], i, 1 ));
If( N Col( dt ) < start + wordCnt,
dt << New Column( "", character )
);
Column( start + wordCnt )[theRow] = theWord;
wordCnt++;
theWord = "";
,
theWord = theWord || Substr( Column( x )[theRow], i, 1 )
)
);
);
0;
);
return = newTexttoColumns(dt,"string");