cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Batista
Level II

Tabulate to word's table

Hi! I have several table that was build with tabulate and they a quite big. Is there a way I can transfer to Word's as a table, also with the possibility to edit them? Because when I save them as word file they kind of need to adjustments. Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Tabulate to word's table

1. Create your Tabulate output as you always have done.

2. Click on the "Done" button in the output to get rid of the Control Panel

3. Save the Script to a Script Window, by clicking on the red triangle and selecting

     Save Script==>To Script Window

toscriptwindow.PNG

toscriptwindow2.PNG

4.  Add the following lines to the top of the script window

Names Default To Here( 1 );
nw = New Window( "Example",

toscriptwindow3.PNG

5. Add the following lines to the bottom of the script

);
nw << save msword( "$TEMP/tab.doc" );
Open( "$TEMP/tab.doc" );

toscriptwindow4.PNG

6. Change the location on lines 11 and 12

     "$TEMP/tab.doc"

to where you want to save your MSWord Document to

7. Run the script by clicking on the icon with the green triangle in it at the top of the Script Window

toscriptwindow5.PNG

 

This will save your Tabulate output to a Word Document.  If you want to save multiple Tabulates at the same time, take a look at my previous example, and just add in the different scripts one after another, separated by a comma as in the example.

 

 

Jim

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Tabulate to word's table

If you place all of your Tabulate output into a new window, you can save that window as a Word output, and each of the Tabulate tables will end up as Word Tables that you can manipulate in Word.

// A very simple example
Names Default To Here( 1 );
open("$SAMPLE_DATA/big class.jmp"); nw = New Window( "Example", tt = Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Grouping Columns( :sex ) ), Row Table( Grouping Columns( :age ) ) ) ), tt = Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Grouping Columns( :sex ) ), Row Table( Grouping Columns( :age ) ) ) ) ); nw << save msword( "$TEMP/tab.doc" ); Open( "$TEMP/tab.doc" );

 

Jim
Batista
Level II

Re: Tabulate to word's table

Hi, thanks for the reply. Can you explain me again how can I do that. I could not understand the commands that you use : (

txnelson
Super User

Re: Tabulate to word's table

Hopefully the below annotation to the script will help you understand what I did

// A very simple example
Names Default To Here( 1 );

// Open the data table
dt = open("$SAMPLE_DATA/big class.jmp");

// Create a new display window
nw = New Window( "Example",
	
	// Create the required Tabulate Table using JSL
	// This JSL is taken directly from the interactive
	// Tabulate Platform by clicking on the red triangle
	// for the Tabulate, and selecting "Save Script"
	tt = Tabulate(
		Show Control Panel( 0 ),
		Add Table(
			Column Table( Grouping Columns( :sex ) ),
			Row Table( Grouping Columns( :age ) )
		)
	),
	// This is the same tablulate as above, but it can be
	// any additional tabulate JSL you want
	tt = Tabulate(
		Show Control Panel( 0 ),
		Add Table(
			Column Table( Grouping Columns( :sex ) ),
			Row Table( Grouping Columns( :age ) )
		)
	)
	// You can have as many tabulate entries as desired
	// added to this script
);

// Save the output to MSWord
nw << save msword( "$TEMP/tab.doc" );

// Open up the just saved .doc file
Open( "$TEMP/tab.doc" );
Jim
Batista
Level II

Re: Tabulate to word's table

Sorry I might need more help. I cannot understand those commands. Can you explain simpler ... using "clicks" not commands?
txnelson
Super User

Re: Tabulate to word's table

1. Create your Tabulate output as you always have done.

2. Click on the "Done" button in the output to get rid of the Control Panel

3. Save the Script to a Script Window, by clicking on the red triangle and selecting

     Save Script==>To Script Window

toscriptwindow.PNG

toscriptwindow2.PNG

4.  Add the following lines to the top of the script window

Names Default To Here( 1 );
nw = New Window( "Example",

toscriptwindow3.PNG

5. Add the following lines to the bottom of the script

);
nw << save msword( "$TEMP/tab.doc" );
Open( "$TEMP/tab.doc" );

toscriptwindow4.PNG

6. Change the location on lines 11 and 12

     "$TEMP/tab.doc"

to where you want to save your MSWord Document to

7. Run the script by clicking on the icon with the green triangle in it at the top of the Script Window

toscriptwindow5.PNG

 

This will save your Tabulate output to a Word Document.  If you want to save multiple Tabulates at the same time, take a look at my previous example, and just add in the different scripts one after another, separated by a comma as in the example.

 

 

Jim
Batista
Level II

Re: Tabulate to word's table

Fantastic!!!! thanks !