cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

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