How can I clear a column in Google Sheets using Google Apps Script?

Viewed 14414

Let's say I want to clear all values found in the column range G2:GX where GX corresponds to the last cell that is not empty.

2 Answers

sheet.getRange("G1:G").clear();

This syntax will clear a column from G1 to last available G Column value. if you want to clear it from between like from 3rd row, then you can use

sheet.getRange("G3:G").clear();

Related