name,description,defaultPrice
Product 1,"The description has item1, item2, item3",9.99
CSV files are parsed by the CSVFileReader
using the Univocity CSV Parser.
Most of the features exposed within the import services and file reading are based on features provided in Univocity.
Requirements:
All files must have a 'header' line so that each row can be parsed into a Map<String, String>
of data, where the header is the key, and the cell value is the value
The default delimiter is a comma ,
.
If you have data that has a comma inside it, surround the entire cell value with quotes.
name,description,defaultPrice
Product 1,"The description has item1, item2, item3",9.99
The description
field will be parsed as The description has item1, item2, item3
.
If you have data that has quotes in it, they can be escaped with another quote.
name,description,defaultPrice
Product 1,"The description has item1, item2, ""item3""",9.99
The description
field will be parsed as The description has item1, item2, "item3"
.