TRY NEW VERSION

PI

PI() → { number | string | boolean }

Returns the value of Pi, 3.14159265358979, accurate to 15 digits.

Parameters:

This method doesn't have any parameters.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.PI());
builder.SaveFile("xlsx", "PI.xlsx");
builder.CloseFile();

Resulting document