# Create a monthly speadsheet dump

**URL:** https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461
**Category:** Feature Requests
**Created:** [October 22, 2020, 5:24pm UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461 "2020-10-22T17:24:18Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Dmitry\_Alexeev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmitry_alexeev/32/15498_2.png) [@Dmitry\_Alexeev](https://community.glideapps.com/u/Dmitry_Alexeev)
#### Post date: [October 22, 2020, 5:24pm UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/1 "2020-10-22T17:24:18Z")

</div>

Hi there. Is there an idea how to make a dump of collected data in the spreadsheet to the new sheet or somewhere else and then clean rows once in the month.  
I use it for monthly expenses tool so once in a month I need to grab all the data and save them. Then I need to have a virgin clear spreadsheet and app to fill it with new records in a new months.

---

<div class="post-metadata">

### Author: ![linnhtetwin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/linnhtetwin/32/15546_2.png) [@linnhtetwin](https://community.glideapps.com/u/linnhtetwin)
#### Post date: [October 22, 2020, 5:38pm UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/2 "2020-10-22T17:38:12Z")

</div>

Have you tried about Zapier Integration?  
So you don’t need to worry about your data backup and you can clean your data sheet as you wish.  
Please check at [https://zapier.com/](https://community.glideapps.com/t/zapier-integration-update/5725)

---

<div class="post-metadata">

### Author: ![Dmitry\_Alexeev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmitry_alexeev/32/15498_2.png) [@Dmitry\_Alexeev](https://community.glideapps.com/u/Dmitry_Alexeev)
#### Post date: [October 22, 2020, 5:45pm UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/3 "2020-10-22T17:45:37Z")

</div>

it is too complicated to me to make it via zapier

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [October 22, 2020, 10:07pm UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/4 "2020-10-22T22:07:20Z")

</div>

You can make it with a Script that takes all your data from row 2 to the last row, then append to the destination sheet, finally go back to the original sheet and clean all those rows.

---

<div class="post-metadata">

### Author: ![Peter20](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/peter20/32/16162_2.png) [@Peter20](https://community.glideapps.com/u/Peter20)
#### Post date: [November 12, 2020, 4:24am UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/5 "2020-11-12T04:24:53Z")

</div>

Could you please tell me more about that script?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 12, 2020, 9:59am UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/6 "2020-11-12T09:59:17Z")

</div>

```
function TransferData() {
  
  //Get values from this week's submissions
  
  var sourceSS = SpreadsheetApp.getActive();
  var sourceSh = sourceSS.getSheetByName('Weekly Submission');
  var values = sourceSh.getRange('A2:J').getValues();
  
  //Copy this weeks submissions to Historical sheet
  
  var targetSS = SpreadsheetApp.openById("insert historical sheet ID here");
  var targetSh = targetSS.getSheetByName('Historical Data');
  var lastrow = targetSh.getLastRow();
  targetSh.getRange(lastrow + 1, 1, values.length, values[0].length).setValues(values);
  
  //Reset weekly submissions
  
  sourceSh.getRange('A2:J').clearContent();
```

---

<div class="post-metadata">

### Author: ![Peter20](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/peter20/32/16162_2.png) [@Peter20](https://community.glideapps.com/u/Peter20)
#### Post date: [November 15, 2020, 12:47am UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/7 "2020-11-15T00:47:51Z")

</div>

Thank you for your reply. I do appreciate it. I will try to use that script. Thank you. 🙂

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 15, 2020, 12:51am UTC](https://community.glideapps.com/t/create-a-monthly-speadsheet-dump/17461/8 "2020-11-15T00:51:53Z")

</div>

Do let me know if you run into any problems 😉
