# Add download to Runtime Summary

**URL:** https://community.beestat.io/t/add-download-to-runtime-summary/315
**Category:** Feature Requests
**Tags:** :download
**Created:** [January 22, 2021, 12:33am UTC](https://community.beestat.io/t/add-download-to-runtime-summary/315 "2021-01-22T00:33:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ziebelje](https://community.beestat.io/user_avatar/community.beestat.io/ziebelje/32/633_2.png) [@ziebelje](https://community.beestat.io/u/ziebelje)
#### Post date: [January 22, 2021, 12:33am UTC](https://community.beestat.io/t/add-download-to-runtime-summary/315/1 "2021-01-22T00:33:22Z")

</div>

Migrated from:

> <https://github.com/beestat/app/issues/220>
>
> Temporary rig for anyone who wants it:
> \`\`\`
> var do\_header = true;
> var csv = ''…;
> for(var runtime\_thermostat\_summary\_id in beestat.cache.runtime\_thermostat\_summary) {
> var runtime\_thermostat\_summary = beestat.cache.runtime\_thermostat\_summary\[runtime\_thermostat\_summary\_id\];
> if (do\_header === true) {
> csv += Object.keys(runtime\_thermostat\_summary).join(',') + '\\n';
> do\_header = false;
> }
> csv += Object.values(runtime\_thermostat\_summary).join(',');
> csv += "\\n";
> };
> 
> var hiddenElement = document.createElement('a');
> hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv);
> hiddenElement.target = '\_blank';
> hiddenElement.download = 'runtime\_thermostat\_summary.csv';
> hiddenElement.click();
> \`\`\`

Temporary rig for anyone who wants it:

```auto
var do_header = true;
var csv = '';
for(var runtime_thermostat_summary_id in beestat.cache.runtime_thermostat_summary) {
  var runtime_thermostat_summary = beestat.cache.runtime_thermostat_summary[runtime_thermostat_summary_id];
  if (do_header === true) {
    csv += Object.keys(runtime_thermostat_summary).join(',') + '\n';
    do_header = false;
  }
  csv += Object.values(runtime_thermostat_summary).join(',');
  csv += "\n";
};

var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv);
hiddenElement.target = '_blank';
hiddenElement.download = 'runtime_thermostat_summary.csv';
hiddenElement.click();

```
