Closed bySabi closed 2 years ago
Tested with this code:
import 'dart:io'; import 'dart:convert' show utf8; import 'package:csv/csv.dart'; final csvFilePath = './addresses.csv'; void main(List<String> arguments) async { final input = File(csvFilePath).openRead(); final raw = await input .transform(utf8.decoder) .transform(CsvToListConverter()) .toList(); print(raw); }
and this dataset: "addresses.csv"
John,Doe,120 jefferson st.,Riverside, NJ, 08075 Jack,McGinnis,220 hobo Av.,Phila, PA,09119 "John ""Da Man""",Repici,120 Jefferson St.,Riverside, NJ,08075
In the console output you can see that "08075 Jack" are the same element in the resulting List
List
[[John, Doe, 120 jefferson st., Riverside, NJ, 08075 Jack, McGinnis, 220 hobo Av., Phila, PA, 09119 John Da Man, Repici, 120 Jefferson St., Riverside, NJ, 8075]]
And the same as in the issue https://github.com/close2/csv/issues/49. All rows are a single element of the resulting List
Solved using CsvToListConverter(eol: "\n")
CsvToListConverter(eol: "\n")
Tested with this code:
and this dataset: "addresses.csv"
In the console output you can see that "08075 Jack" are the same element in the resulting
List
And the same as in the issue https://github.com/close2/csv/issues/49. All rows are a single element of the resulting
List