XenoGuard Documentation

Read File

Actions » Windows » File Handling » Csv » Read File

The action Read File gets the content of a CSV file and displays the result in a table format.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the File Handling node.
  3. In the CSV node, select the Read File action.

Parameters:

The action has the following input parameters:


NAME DESCRIPTION
Path Name
Specifies the path name of the CSV to be read.

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Context Types
 [Variable, Parameter, Enum] 
Encoding
The encryption to be used for character encoding.

Allowed Values: ASCII, ANSI, UTF-8, UTF-8-BOM, Unicode

Allowed Context Scopes [Fixed, Local, Global]

Allowed Context Types [Variable, Parameter, Enum]

Top Row Contains Column Names
Determines whether the top row contains the column name.

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Data Type [Boolean]
Column Delimiter
The sign that separates each column of a CSV file.

Default Value: semi-colon (;)

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
[-] Hide

Here are the descriptions of the character encoding used in XenoGuard 4.0:

  • ASCII - a 7-bit character set that contains characters from 0 to 127. Usually appropriate for protocols that require ASCII.
  • ANSI - an 8-bit character set that contains characters from 128 to 255. 
  • UTF-8 - a character that can be 1 to 4 bytes long. Works well with many operating systems and backward compatible with ASCII.
  • UTF-8-BOM - a sequence of bytes at the beginning of a text stream that makes reading of UTF-8 easier. 
  • Unicode - a variable-length character with one to two 16- bit integers.

Results:

The action returns the following results:


NAME
DESCRIPTION
Row Count
The number of imported rows from the CSV file.

Allowed Context Scopes [Fixed]
Allowed Context Types [Variable, Parameter]
Rows
The imported rows from the CSV file.

Allowed Context Scopes [Fixed]
Allowed Context Types [Variable, Parameter]

Warning A file access error occurs when writing in the CSV file while it is open. Make sure that the file being accessed is closed or not active.

Example 1 (Display contents of a CSV file):

This example creates a local variable named ReadFile with Text as data type. The value of the variable is passed as the path name of the CSV file and displays all of its contents. The number of records is then output via the Message Box.


See other CSV operations:

Read File
Read Value
Write Value
Save Buffer
Clear Content