Created
November 20, 2016 02:50
-
-
Save tanaikech/9909c2eb693e14f07f5dceb55e2209cb to your computer and use it in GitHub Desktop.
Googleスプレッドシートで空白のみのセルを削除する ref: http://qiita.com/tanaike/items/1e93a0355aaef8355035
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ss = SpreadsheetApp.getActiveSheet(); | |
var data = ss.getDataRange().getValues(); | |
for (var i in data){ | |
for (var j in data[i]){ | |
if (data[i][j].length > 0 && !/^[a-zA-Z0-9]+$/.test(data[i][j])){ | |
data[i][j] = null; | |
} | |
} | |
} | |
ss.getRange("A1").offset(0,0, data.length, data[0].length).setValues(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment