2019年11月7日木曜日

GASのsetNumberFormatで表示形式の数値を自動にしたい場合は.setNumberFormat("General")


公式リファレンスに書かれている場所を見つけられず、Stack Overflow で見つけました。



コード.gs
function set_format() {
 var format = SpreadsheetApp.getActiveSheet().getRange("A2").setNumberFormat("General");
 Logger.log(format);
}


参考

https://stackoverflow.com/questions/38042702/applying-automatic-number-formatting