Edit font size

Here is a tip how to edit font size.

 

Source code

function setFontSize() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sh = ss.getActiveSheet();
  var size = 36;

  ss.getActiveRange().setFontSize(size);

  var hd = "New Font Size: ";
  var nw = ss.getActiveRange().getFontSize();

  Browser.msgBox(hd + nw);
}

 

Format

RangeObject.setFontSize(size)

 

Parameters

size … Set the font size’s value in numeric format.

 

Responses

None

 

How to get a range’s object?

Please refer the following tips.

Get an active range object

Get a range object by row & column number

Get a range object by address

 

How to get font size?

Please refer the following tip.

Get font size

Leave a Comment