IMPORT TXT Statement

Reads a text file (.TXT) from disk into a notebook table. Each line of text in the file becomes a two-column row in the target table. One column contains a line number (starting at 0) and the other column contains the text of the line.

Syntax


Parameters

Options

Example

IMPORT TXT 'C:\file.txt' INTO table1;

-- Read the first line only.
IMPORT TXT 'C:\file.txt' INTO table2
OPTIONS (TAKE_LINES: 1);

-- Read the fourth and fifth lines.
IMPORT TXT 'C:\utf8.txt' INTO table3
OPTIONS (SKIP_LINES: 3, TAKE_LINES: 2);

-- Read a file in Shift-JIS encoding.
IMPORT TXT 'C:\shiftjis.txt' INTO table4
OPTIONS (FILE_ENCODING: 932);