Truncates a number to an integer by removing the decimal, or fractional, part of the number.
Name | Type | Description |
arg1 | number | Is the number you want to truncate. |
arg2 | number | Is a number specifying the precision of the truncation, 0 (zero) if omitted. |
builder.CreateFile("xlsx"); var oWorksheet = Api.GetActiveSheet(); var oFunction = Api.GetWorksheetFunction(); oWorksheet.GetRange("A1").SetValue(oFunction.TRUNC(3.14159265, 5)); builder.SaveFile("xlsx", "TRUNC.xlsx"); builder.CloseFile();