Please enable JavaScript to view this site.

Navigation: Scripts > Script details

Writing to Prism, text, HTML, XML or SQL tables

Scroll Prev Top Next More

Commands

Table Prism [datatable number] <CLEAR>

Table Text <&> <delimiter>  

Table CSV <’delimiter’>  

Table HTML <border #> <width #>

Table XML [filename]

Table SQL [datasource] <table > <login> <password> <CLEAR>

WTable [column title] [row] [col] <subcol>

WTable [column title] [text or %F or %N]

NextRow

EndTable

OpenOutput [“filename”] ,<CLEAR>, <”delimiter”>      

 

Explanation

These commands make it easy to export Prism results into structured tables. The first step is to define your table. Choose to place the results into a data table within Prism, to a text file (delimited with tabs), to a CSV (text file delimited with commas), to a HTML (web) table, to an XML table, or directly to a ODBC connected database. If you choose to write to a text, CSV or HTML file, create the file using the OpenOutput command before creating the table. This lets you combine other information (as explained in the next section) as well as the table. XML output must be in its own table, so enter its file name as part of the Table XML command.

Use the WTable command to write a value into the table. The first argument will become the column title in the new table (or the variable name when exporting to a database). The next three arguments define the cell on the current results (or data) table that will be written to the new table. Or enter text to just space columns apart, or %N to put in the loop number or %F to put in the current file name.

Note that the Wtable command has a name that can be misleading. It writes a single value (or text string) to a table. The command does not write an entire table. If you want to write an entire results (or data) table, use the WSheet command.

In almost all cases, you’ll create a table as part of a loop. The Next statement that ends the loop also starts the next row on the table. When the loop is complete, so is the table. In rare circumstances, you might not want the end of a row to correspond with the Next statement of a loop. In this case, end a row with the NextRow statement, and close the table before the loop ends with the EndTable statement.

 

 

 

 

 

 

© 1995-2019 GraphPad Software, LLC. All rights reserved.