-
Notifications
You must be signed in to change notification settings - Fork 24
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
Safari issue in exported csv #48
Comments
Is the output itself incorrect, or does Safari "render" the csv incorrectly. What happens, if you change the eol character? |
I am facing same issue for Firefox browser. Steps to reproduce: Then open the provided localhost link in Firefox browser. (Here we can also open the same link in Chrome to test the difference in output) then onButton click convert the list to csv using plugin and download the file. code for this:
I downloaded files from both Firefox and Chrome and open it on Microsoft excel. Both files seems to be slightly different size. Also, I have tried using I opened both files in notepad and chrome file is showing the second entry in next line while Firefox file showing everything in one line. Let me know if any workaround for this one. Thanks |
I'm seeing the same issue on Safari (fine on Chrome) - has anyone figured out a workaround? |
I recently met this issue and here is a working example using blob: import 'dart:convert';
import 'dart:html' as html;
import 'package:csv/csv.dart';
void downloadCSV(String fileName, List<List<String>> csvRows) {
final csvData = const ListToCsvConverter().convert(csvRows);
final bytes = utf8.encode(csvData);
final blob = html.Blob([bytes]);
final url = html.Url.createObjectUrlFromBlob(blob);
html.AnchorElement(href: url)
..download = fileName
..click();
}
|
I am using this library to generate the csv from array list in flutter web
When there is chrome works fine.
But in safari it gives me the csv data but not in different raw but in all the records in single row
If anyone has solution please provide
Thanks in advance
The text was updated successfully, but these errors were encountered: