TRY NEW VERSION

COS

COS(arg1) → { number | string | boolean }

Returns the cosine of an angle.

Parameters:

Name Type Description
arg1 number

Is the angle in radians for which you want the cosine.

Returns:

Type
number | string | boolean

Example

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

Resulting document