TRUNC
function TRUNC(arg1: number = null, arg2: number = null): number | string | boolean
Description
Truncates a number to an integer by removing the decimal, or fractional, part of the number.
Parameters
- arg1
number
null Is the number you want to truncate.
- arg2
number
null Is a number specifying the precision of the truncation, 0 (zero) if omitted.
Returns
number | string | boolean
Try It
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.TRUNC(3.14159265, 5));