cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lwx228
Level VIII

How to used JSL JMP tables into a multi-tabbed Excel workbook?

I would like to ask JMP community to help me out on a custom way to export JMP table to excel.

 

Thanks!2019-08-23_14-23-06.png

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
11 REPLIES 11
txnelson
Super User

Re: How to used JSL JMP tables into a multi-tabbed Excel workbook?

I am not sure exactly what all you need with your code, but here is a simple script that creates your required subsets and saves them to an Excel workbook.  If you need to save the jmp tables as separate tables, in addition to the workbook, you can do that with a simple loop after the workbook is created.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

cNa = dt << get column names;
xF = {};
For( c = 2, c <= N Col( dt ), c++,
	d2 = dt << Subset(
		All rows,
		columns( dt:name, Column( dt, c ) ),
		output table( Char( cNa[c] ) )
	);
	Insert Into( xF, d2 << get name );
);

close( dt, nosave );

Create Excel Workbook( "c:\TheWorkBook.xlsx", Eval( xF ), Eval( xF ) );
Jim
lwx228
Level VIII

Re: How to used JSL JMP tables into a multi-tabbed Excel workbook?

That's exactly what's needed.

Thank Jim!

Recommended Articles