Table Of Contents

Read From Spreadsheet File (Integer) (G Dataflow)

Version:
    Last Modified: January 9, 2017

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

    This node reads a spreadsheet or spreadsheet file saved in text format. This node 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:

    • %3f — creates a string to represent the number with three digits to the right of the decimal point
    • %s — copies the input string

    Default: %d — converts the data to integer form using as many characters as necessary to contain the entire number

    datatype_icon

    file path

    The file that this node reads.

    The node opens the specified file without requiring you to call Open/Create/Replace File first.

    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 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 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 bytes the node reads before ending the search for the end of a line.

    spd-note-note
    Note  

    Strings are encoded in UTF-8. In most cases, the number of bytes in a string is equivalent to the number of characters. However, for strings containing the characters U+0080 through U+7FFFFFFF, the number of bytes is greater than the number of characters.

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

    datatype_icon

    transpose?

    A Boolean value that determines whether to transpose the data before conversion.

    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

    Array containing each row of data read from the file.

    datatype_icon

    first row

    Array containing the first row of data read from the file.

    datatype_icon

    mark after read

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

    spd-note-note
    Note  

    Strings are encoded in UTF-8. In most cases, the number of bytes in a string is equivalent to the number of characters. However, for strings containing the characters U+0080 through U+7FFFFFFF, the number of bytes is greater than the number of characters.

    datatype_icon

    end of file?

    A Boolean value that indicates 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.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: All devices (only within an Optimized FPGA VI)


    Recently Viewed Topics