How to clear column data from app

Hello everybody!

I need your help!

I need to clear data from a column on my table.

How can I do that ?

Solved Solved
0 14 2,719
1 ACCEPTED SOLUTION

But, itโ€™s desition needs so long time.
And few weeks ago I have make this:

I have collect my data in to Google Apps Script.
From GAS, I have make this script:

    function clearMarked() {
      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var sheet = ss.getSheetByName("Animals")
      var data = sheet.getDataRange().getValues();
      var col = data[0].indexOf("ะ‘ะตะปะณั–ัั–");
      var numRows = sheet.getLastRow() + 1;
      var range = sheet.getRange(2, col+1, numRows);
      var result=range.clear();
      var date = new Date();
      Logger.log(date.toString());
      return date.toString();
    }

function doGet(request) {
  var result = clearMarked();
  
  return ContentService
   .createTextOutput(result)
   .setMimeType(ContentService.MimeType.TEXT)   
}

In appsheet I have make
button with action that call my GAS API

HYPERLINK("https://script.google.com/macros/s/ID/exec","")

Now my reset button clear marked data in few seconds.

After press this button I need just reload my app

View solution in original post

14 REPLIES 14
Top Labels in this Space