Issue
Kindly share the link of code or code and I m trying but I m not found anything good for importing CSV file
which library I use?
Solution
so you can use Flutter csv library
import 'package:file_picker/file_picker.dart';
import 'package:csv/csv.dart';
pickFile() async {
FilePickerResult result = await FilePicker.platform.pickFiles();
if (result != null) {
PlatformFile file = result.files.first;
final input = new File(file.path).openRead();
final fields = await input
.transform(utf8.decoder)
.transform(new CsvToListConverter())
.toList();
print(fields);
}
}
Answered By - Muhammad Arbaz Zafar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.