Skip to content

Instantly share code, notes, and snippets.

@biarm
Created March 20, 2014 09:45
Show Gist options
  • Save biarm/9660376 to your computer and use it in GitHub Desktop.
Save biarm/9660376 to your computer and use it in GitHub Desktop.
Small Google Alls Script that deletes rows with blank cells in a spreadsheet
function cleanUp(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = ss.getActiveSheet();
var i = s.getLastRow();
var values = s.getRange(1,1,i).getValues();
for (i; i > 0; i--) {
if (values[i-1] == "") {
s.deleteRow(i);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment