Google apps scriptで行の高さを指定する

Google apps scriptで行の高さを指定する

  • setRowHeight(rowPosition, height) //行の高さ調整

参照元Class Sheet  |  Apps Script  |  Google Developers

 

Google apps scriptで行の高さを指定する例

/*1行目の高さを100pxに変更*/
function rowheight() {

var ss,sht

ss = SpreadsheetApp.getActiveSpreadsheet();
sht = ss.getActiveSheet();

sht.setRowHeight(1,100);//1行目を100px幅に
}

 

結果

1行目の高さが100pxになった。

 

まとめ

 getRowHeight()と違うので注意。

RowHeightのつづり間違いに注意。

setRowHeight(rowPosition:行の位置, height:高さpx)を指定して使う。