I have a raw data need to text to column with many special character, then stack them. Could you please help provide solution by JSL script for generic case. Please help to refer my excel file for detail
Here is the script that will take the original data table and split out a target column and then stack the results. Given that some of the split out columns are made up of just string data, and some appear to be numeric values, the stacking of all of the columns does not seem to be what you probably want.
Names Default To Here( 1 );
dt = Current Data Table();
targetCol = "domain_frequency_core";
// Text to columns
Data Table( "Book1 (4)_Sheet1" ) <<
Text to Columns( columns( Column( targetCol ) ), Delimiters( "@" ) );
// Get list of all target columns except original column
stackList = Filter Each( {name}, dt << get column names( string ),
Contains( name, targetCol ) & name != targetCol
);
// Stack the new columns
dt << Stack(
columns( stackList ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Output Table( "Final Stacked Data Table" )
);
Please take the time to study the script. All of the functions and platforms used are documented in the Scripting Index and in the JMP Help screens.