CSV Parser
Block Group: | Table Operations |
Icon: |
The CSV Parser block converts a CSV string into a table.
This is a commonly used block, because many data-driven features in DGLux5, such as charts and repeaters, require tabular data.
The CSV parser block is often used to parse a string that has been retrieved using a String Loader block.
For information on using dataflow blocks, see Dataflow.
For answers to some common questions about working with tables, see Tables.
Video Tutorial: Import CSV File
Input/Output Properties
The following properties of the CSV Parser block can take input and give output.
- input (string)
- withHeader (boolean)
- delimiter (character)
input receives the CSV string. It is often the output from a String Loader block.
withHeader specifies whether the CSV string includes a header row.
delimiter specifies the character that separates items in the CSV string. Typically this character is a comma (,).
Output Properties
The following properties of the CSV Parser block can give output but cannot take input.
- parseError (boolean)
- output (table)
parseError indicates whether the block encountered an error. An error might be caused by improperly formatted input.
output returns a table parsed from the CSV data.
Example
The following image shows, clockwise from top left:
- A String Loader block
- A CSV Parser block
- The output table of the CSV Parser block
- The CSV file