I need to download excel file to device, the api return is List, the sample data is shown below.
{"data":[{"First Name":"1","Last Name":"Dulce","Gender":"Abril","Country":"Female","Age":"United States","Date":"32","Id":"15/10/2017"},{"First Name":"2","Last Name":"Mara","Gender":"Hashimoto","Country":"Female","Age":"Great Britain","Date":"25","Id":"16/08/2016"},{"First Name":"3","Last Name":"Philip","Gender":"Gent","Country":"Male","Age":"France","Date":"36","Id":"21/05/2015"},{"First Name":"4","Last Name":"Kathleen","Gender":"Hanner","Country":"Female","Age":"United States","Date":"25","Id":"15/10/2017"},{"First Name":"5","Last Name":"Nereida","Gender":"Magwood","Country":"Female","Age":"United States","Date":"58","Id":"16/08/2016"}]}
My question is how can i make excel file from this array. I have to create excel file and download it to phone (device).
2
Answers
You can use this package excel
CSV data can be generated without any extra dependencies, assuming it fulfils the requirements. Something like this: