I'm currently using json2Csv for exporting data in csv table.
The data is exported correctly but I want to add footer row which will calculate total price.
The link is down below and in footer I want to get the total for prices: https://stackblitz.com/edit/angular-json2csv
In documentation there is nothing about adding row with totals (or footer row). Does anybody know how to add that?
Many thanks!
Not sure if there is a more official way to do this but this works: This is how I would format the data if I was writing the CSV by hand. You're just telling it which columns your footers belong in.
You'll need to pull in lodash to use this answer: https://lodash.com/docs/4.17.15
Stackblitz Link