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


Publication date: 04/28/2021

Create Excel Workbooks

You can save open data tables in a new or existing Excel workbook by using the Create Excel Workbook() function. The first example adds all open data tables without changing the worksheet names:

dt1 = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
dt2 = Open( "$SAMPLE_DATA/San Francisco Crime.jmp" );
Create Excel Workbook( "c:/MyWorkbook1.xlsx" );

The following example creates MyWorkbook2.xlsx by combining the open Big Class Families.jmp and San Francisco Crime.jmp sample data tables.

dt1 = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
dt2 = Open( "$SAMPLE_DATA/San Francisco Crime.jmp" );
 

// specify the data tables

tableList = {"Big Class Families", "San Francisco Crime"};
 

// specify the worksheets (optional)

sheetList = {"Families", "Crime"};
Create Excel Workbook( "c:/MyWorkbook2.xlsx", tableList, sheetList );

Use data table references to create the workbook.

dt1 = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
dt2 = Open( "$SAMPLE_DATA/San Francisco Crime.jmp" );
Create Excel Workbook(
	"c:/MyWorkbook3.xlsx",
	{dt1, dt2}, // data table references
	{"Families", "Crime"}
);

Create Excel Workbook() also accepts a mix of data table references and data table names in the list. For example, {dt1, dt2} above can also be expressed as {dt1, "San Francisco Crime"}.

Notes:

The saved file is an .xlsx file; the .xls format is not supported.

The JMP data tables must conform to the maximum Excel limit of 1 million rows and 16,535 columns, or the data will be truncated in Excel.

Data table references or data table names must always be in a list, even if the list has only one item.

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