Get Started
Usage API

SetFontSize

SetFontSize(nSize)

Set the font size for the characters of the current cell range.

Parameters:

Name Type Description
nSize number

The font size value measured in points.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A2").SetValue("2");
sRange = oWorksheet.GetRange("A1:D5");
sRange.SetFontSize(20);
builder.SaveFile("xlsx", "SetFontSize.xlsx");
builder.CloseFile();

Resulting document