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

Read Tab separated file in JMP from server

how to read a tab-separated file (or any other delimeter  ) in JMP. 


dt=Open( 'http://www.<<someDomain>>/tab-separated.csv', text);

 

Here the first parameter in the Open function is the URL of the file.

file contains below sample, column may contains comma separated values that is why delimiter of file is Tab

column1|column2|column3|column4

1 | 2 | abc,xyz | 3 | 4| 

 

 

 

1 REPLY 1
txnelson
Super User

Re: Read Tab separated file in JMP from server

This can be handled easily.  The Open() function has many options that allow for the handling of different delimiters, etc.  The easiest way to generate the correct code, is to use the Data Previewer and then once the first file is input, it will contain the JSL that can be used for the additional files.

To do this, first click on 

     File=>Open

and navigate to the folder where the file you want to input resides.

txnelson_0-1674540825606.png

Click on the down arrow in the box currently displayed as "All JMP Files ........" and select 

txnelson_1-1674541003201.png

A new area in the window will be displayed that will allow you to used different approaches to open the files., Click on 

     Data (Using Preview)

txnelson_2-1674541151291.png

Select the file you want to open and then click Open

The Preview Window will open

txnelson_3-1674541302354.png

There are different settings you can change on this window, but considering that you specified that you want to use Tabs in addition to Commas, Click on the Delimited fields check box and then check the Tab check box.

txnelson_4-1674541467113.png

A preview of what the different fields will be are displayed in the window.  If it is what you want, then click on Next, and when the next window appears, click on Import.

Your data table will appear.

txnelson_5-1674541615077.png

Now to get a copy of the JSL  you can just open the Log window and it will list out the JSL that it used to open the data table.

txnelson_6-1674541826649.png

The JSL is pretty straight forward.  If you cut and paste this JSL into your script, you can then just change the pointer to the file you want to open, and the Import Settings will handle the End of Field options you changed.

 

 

 

 

 

 

 

Jim