Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant create more then 1 field per row #32

Open
GustavoContreiras opened this issue Nov 30, 2019 · 1 comment
Open

Cant create more then 1 field per row #32

GustavoContreiras opened this issue Nov 30, 2019 · 1 comment

Comments

@GustavoContreiras
Copy link

GustavoContreiras commented Nov 30, 2019

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.

image

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

image

Edit: solved by using field delimiter ';'

image

@close2
Copy link
Owner

close2 commented Dec 3, 2019

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants