I've always been a big fan of producing the solution interactively first, then script. I know it is not always possible, but you can get close.
Opening the text file gives this script (for my example, of course) found in the Source script with the JMP table:
Open(
"C:\Testing.txt",
columns( New Column( "V1", Character, "Nominal" ) ),
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Tab, Comma, CSV( 1 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 1 ),
Data Starts( 2 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
)
You can modify as needed for your specific case.
Now for removing the V and converting to numeric, I would create a second column for that. This allows for error checking in case the voltage format changes, for some reason. Plus, it gives better data traceability. I created a column with this formula: Num( Word( 1, :V1, "V" ) ). I then looked at the "Copy Table Script" found in the table panel and pulled out the related part of the script to create the new column.
In JSL that would be:
New Column( "Numeric V1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Num( Word( 1, :V1, "V" ) ) )
)
Putting the two together should be your script.
Dan Obermiller