Get Started
Documentation

SetFontSize

SetFontSize(size)

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

Parameters:

Name Type Description
size number The font size value measured in points.

Example

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

Resulting document