Scripting Guide > Getting Started > Capturing a Script to Import a File
发布日期: 04/13/2021

Capturing a Script to Import a File

To capture a script that imports a file, you open the file in JMP. JMP automatically records the steps that occurred when you opened 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, using 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 in the Types of Data.

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).