GraphPad Prism 8 User Guide

Importing data from a text file

Importing data from a text file

Previous topic Next topic No expanding text in this topic  

Importing data from a text file

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function Emails questions or corrections.  


Import <”filename”>, <row>, <col>, <subcol>

ImportLink <”filename”>, <row>, <col>, <subcol>



The Import command imports data from a text file into a data table. The ImportLink command replaces data in a data object file using existing choices for filtering and rearranging

If you omit the filename and are in a ForEach file loop, Prism will use the current loop’s file. If you include a file name, don’t precede it with a path, Prism will use the path defined in the SetPath statement if there is one.

If you want to import starting at a particular row or column, specify them. Row 0 is the title row, and row 1 is the first row with data. Column 0 is the X column, and column 1 is the first Y column. Column -1 contains the row titles. It is not possible to import subcolumn titles.

The advantage of the ImportLink command is that it lets you specify which parts of the file to import and how to rearrange the data. Before creating the script, manually import a data file and choose the option to maintain a link between Prism and the data (text) file. At this time, choose options on the Filter and Placement tabs of the Import dialog to select rows and columns to import and rearrangements (such as transpose). These properties are stored with a data object. See Data objects in Prism. The ImportLink command then replaces new data, using the same properties.

If there is only one data object on the table, don’t specify row, column, or subcolumn. Prism simply uses the only data object on the table.. If there is more than one data object you need to specify the row, column, and subcolumn of the upper-left corner of the data object you wish to import into.

Note that the ImportLink command updates a Prism data object linked to a text file. If you Paste Link data from Excel, you cannot update the link using this command. You'd need to write VBA code in Excel to change the data in Excel.