cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Add "treat consecutive delimiters as one" to data import

Some data files we use that are generated by some equipment unfortunately saves the output using "tab" to make the formatting look nice when printed. Unfortunately, sometimes there's one tab, and sometimes there's two tabs, depending on the width of the contents of the field.

For example:

Row     Value1      Value2

1       1.2         6.2

2       12.5234213  1.2

3       0.1         2.2342

And in this contrived example, those spaces are defined with tabs. I'll type "\t" for each tab...

Row\tValue1\t\tValue2

1\t1.2\t\t6.2

2\t12.5234213\t1.2

3\t0.1\t\t2.2342

 

So JMP has no way to import that data directly with each value in the correct column. As a fix, I used Multiple File Import, imported Row Per Line strings, and used column formulas such as this:

cdt << New Column( "Gas1", Numeric, Formula( Word( 2, Regex( :Text, "[\s]", " ", GLOBALREPLACE ) ) ) );

But Excel has a "treat consecutive delimiters as one" in their import Wizard. If we agree that JMP is better than Excel, JMP should have this option, too!

2 Comments
Status changed to: Acknowledged
 
hogi
Level XII

Another workaround:
Instead of Regex, use Text to Columns.
Different than MFI this function - which vice-versa is not always what the user wants

Text To Columns: handle missing data correctly