LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Thursday, November 7, 2019

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

Latest post

Creating a template copier app in Google Apps Script

Introduction This article will show you a template copier application in Google Apps Script.  This application will automatically copy a t...