Scripting Guide > Get Started > Capture a Script to Import a File
Publication date: 07/08/2024

Capture a Script to Import a File

When you open a non-JMP file in JMP, a script is automatically created and attached to the data table. This script contains the code to open the file.

Import a Text File

1. Select File > Open.

The Open Data File window appears.

2. Select Text Files from the list next to File name.

3. In the Open as section, select Data (Best Guess).

JMP formats the data based on tabs, commas, white space, and other characters in the text file.

4. Browse to select the file, and then select Open.

The file is opened as a data table. The data table includes a script named Source. This JSL script imports your text file with the text import rules that you used.

5. Right-click the Source script and select Edit.

You can copy this script, paste it into a new script window, and save it. Then you can run this script later to reimport the text file.

Tip: The import script is an Open() expression that specifies the text file and the import options to correctly import the file into JMP. The first part of this expression is the pathname to the specific file that you imported. If you save this script and want to run it a different place, you might need to edit the pathname so that it points to the text file. Pathnames are discussed in greater detail in Path Variables.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).