- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How do I get only the rows of a data table (without headers) into a journal with JSL
At the end of a scripted analysis I would like to get my datatable into the journal. Since it is a template file import from excel, the column names are meaningless so I would like to not see those in the journal. Any way to dump just the rows and column contents, without the column names into the journal?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I get only the rows of a data table (without headers) into a journal with JSL
dt = Open( "$sample_data/big class.jmp" );
table = dt << GetAsReport;
(table << XPath( "//TableBox/*" )) << SetHeading( "" );
table << Journal;
Extending your idea: Use GetAsReport to operate on the tree before journaling it. Then broadcast the SetHeading to all the table box children that XPath returns. Table is a display box tree that can be used in a NewWindow(...) or journaled.
Add a table to a journal without the column headers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I get only the rows of a data table (without headers) into a journal with JSL
This bit of code will do it, but is there a more elegant solution? It makes the header dissapear only on the last table in the journal.
current data table() << journal;
current data table() << journal;
current data table() << journal;
TableNumber = n items(Current Journal() <<xpath("//TableBox"));
boxes = Current Journal()[TableBox(TableNumber)] <<xpath("//StringColBox");
For(i=1, i<= nitems(boxes), i++,
boxes[i] << set heading("")
);
boxes = Current Journal()[TableBox(TableNumber)] <<xpath("//NumberColBox");
For(i=1, i<= nitems(boxes), i++,
boxes[i] << set heading("")
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I get only the rows of a data table (without headers) into a journal with JSL
dt = Open( "$sample_data/big class.jmp" );
table = dt << GetAsReport;
(table << XPath( "//TableBox/*" )) << SetHeading( "" );
table << Journal;
Extending your idea: Use GetAsReport to operate on the tree before journaling it. Then broadcast the SetHeading to all the table box children that XPath returns. Table is a display box tree that can be used in a NewWindow(...) or journaled.
Add a table to a journal without the column headers.