Subscribe Bookmark RSS Feed

How to Extract few columns and save as .csv file ?

sharath00005

Community Member

Joined:

Sep 17, 2016

i want to extract few columns and then save this as .csv file , i need a jmp script with does this

i will usually do tables >> tabulate  (grouping columns ) >> make into data table and copy the columns to a csv file

1 REPLY
txnelson

Super User

Joined:

Jun 22, 2012

JMP will create for you most of the script that you need to do what you are wanting to do;  In the example below, I am using the Semiconductor Capability data table from the Sample data tables provided under the Help pull down menu

First you just need to run the Tabulate platform, setting it up the way you want it:

12821_pastedImage_0.png

Then under the red triangle, select Make into Data Table

12822_pastedImage_1.png

Most of the script that you will need, is contained in the Source code for that created the table.  To get to it, click on the red triangle next to the "Source" entry in the Tables Panel at the left of the table:

12823_pastedImage_2.png

Select Edit and the script that produced the table is displayed

12824_pastedImage_3.png

Cut and paste this into a JMP Script window (File==>New==>Script), and add the statement to save the new table

(Data Table( "Semiconductor Capability" ) << Tabulate(

       Add Table(

              Column Table( Analysis Columns( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1 ) ),

              Row Table( Grouping Columns( :lot_id ) )

       )

)) << Make Into Data Table;

// Note the ";" added to the end of the above line

// Add the statement to save the data table as a .csv file

current data table() << Save As("C:\The Example.csv");

Jim