For the latest version of JMP Help, visit JMP.com/help.


Publication date: 04/28/2021

Save a Data Table

To save a data table, send a Save message to the data table. Here are some examples:

dt << Save(); // save using the current name
dt << Save( "Newest Big Class.jmp" ) // save as a new file
dt << Save( "c:/My Data/New Big Class.jmp" );  // save as a new file
dt << Save( "My Table", JMP( 5 ) ); // save as JMP 5 table
dt << Save("") // prompt to select the directory and save in the desired format
dt << Save( "Big Class.xls" ); // save as a Microsoft Excel file
Create Excel Workbook( "c:/MyData/data.xlsx", {"Abrasion", "Big Class"},
{"Abrasive", "Class"} ); // save several data table as a workbook

Note: If you specify the filename with no path and have not set the default directory, the file is saved on your primary partition (Windows) or in your <username>/Documents folder (macOS). For more information about setting the default directory, see Relative Paths in the Types of Data section.

On Windows, saving with a .txt extension exports according to the Text Export preferences. On macOS, add Text as a second argument to the Save function, as follows:

dt << Save( "New Big Class.txt", Text );

If you plan to set the name of a data table and later send the Save message, you can just specify the name in a Save message.

dt << Set Name( "New Big Class.jmp" );
dt << Save();

works the same as

dt << Save( "New Big Class.jmp" );

Including Save and the pathname is also an alternative to using Save As along with the pathname.

Revert to a Saved Data Table

To return to the most recently saved data table, send a Revert message to the data table.

dt << Revert();
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).