How to extract data into CSV from specific data

I want to extract data from either s specific gadget or from specific data elements into a csv vile.
With the icon on top I get the link for the csv but with following only data:
timestamp,Solar Yield (delta),Grid to battery,Grid to consumers,PV to battery.PV to grid,PV to consumers,Battery to consumers,Battery …
I have a widget for measuring the energy used for the heating system. So I want to see this data in the csv file.