csv
csv copied to clipboard
Cant create more then 1 field per row
onPressed: () async {
//blocs.homePageBloc.onClickScheduleReview();
//Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => ScheduleReviewPage()));
Map<PermissionGroup, PermissionStatus> permissions = await PermissionHandler().requestPermissions([PermissionGroup.storage]);
bool isShown = await PermissionHandler().shouldShowRequestPermissionRationale(PermissionGroup.storage);
String appDocDir;
await getTemporaryDirectory().then((onValue) {
appDocDir = onValue.path;
});
final res = const ListToCsvConverter().convert([['aaa', ',', 'ccc'], ['barra n \n']]);
print(greenPen("[HomePage] tempDir: " + appDocDir));
File f = new File(appDocDir + "b.csv");
f.writeAsString(res);
blocs.providers.databaseProvider.uploadFile(f, 'csv', "c", "nnn");
},
Is the output right? Tried to follow the official example.

Edit: solved by using ';' but still have a problem with ','

Edit: solved by using field delimiter ';'

Excel is a very bad CSV reader / writer.
I will however try to improve the default values in a future release.
(Excel is for instance still not able to read UTF8 encoded CSV without manual intervention.)
⇒ Leaving this issue open as a reminder to improve the default values (/ mentioning Excel somewhere)