Je ne suis pas au courant de faire ce que vous voulez avec la fonction Text to Columns(), mais voici une fonction simple qui fera ce que vous voulez
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");