Home > Support > NI Product Manuals > LabVIEW Communications System Design Suite 1.0 Manual

Reads data from a file and converts the data to a 2D string array.

This node reads a spreadsheet or spreadsheet file saved in text format. This node calls the Spreadsheet String to Array node to convert the data and opens and closes the file as part of the read operation.

connector_pane_image
datatype_icon

format

A string that uses format specifiers to determine how to convert the data to characters. Examples:

  • %d converts the data to integer form using as many characters as necessary to contain the entire number.
  • %s copies the input string.

Default: %.3f — creates a string to represent the number with three digits to the right of the decimal point

datatype_icon

file path

The file that this node reads.

This input can be a reference to a file or an absolute file path. The node opens the specified file without requiring you to call Open/Create/Replace File first.

If you specify an empty path, a relative path, or a path to a non-existent file, this node returns an error.

Default: No value — Displays a file dialog box that prompts you to select a file.

datatype_icon

number of lines

Maximum number of lines the node reads. A line is a character string ending with a carriage return, linefeed, or a carriage return followed by a linefeed; a string ending at the end of file; or a string that has the maximum line length specified by the maximum characters per line input. If this input is less than 0, the node reads the entire file.

Default: -1 — reads the whole file

datatype_icon

start of read offset

Position in the file, measured in characters (or bytes), at which the node begins reading.

The offset unit is bytes rather than numbers because byte stream files can contain segments of different types of data. Therefore, to read an array of 100 numbers that follows a header of 57 characters, set this input to 57.

datatype_icon

maximum characters per line

Maximum number of characters the node reads before ending the search for the end of a line.

Default: 0 — no limit on the number of characters the node reads

datatype_icon

transpose?

A Boolean that indicates whether to transpose the data after converting it from a string.

TRUE Transposes the data.
FALSE Does not transpose the data.

Default: FALSE

datatype_icon

delimiter

A character or string of characters used to separate fields in the spreadsheet text. For example, a value of , (comma) specifies a single comma as the delimiter.

Default: \t — single tab character

datatype_icon

new file path

Path to the file.

datatype_icon

all rows output (string)

Data read from the file.

datatype_icon

first row output (string)

First row of the all rows array. Use this output when you want to read one row into a 1D array.

datatype_icon

mark after read

Location of the file mark after the node runs. The mark points to the character (byte) following the last character read.

datatype_icon

end of file?

A Boolean value that specifies whether the node attempted to read past the end of the file.

TRUE The node attempted to read past the end of the file.
FALSE The node did not reach the end of the file while reading data.