TRY NEW VERSION

ISOWEEKNUM

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

Returns the ISO week number in the year for a given date.

Parameters:

Name Type Description
arg1 number

Is the date-time code used by Microsoft Excel for date and time calculation.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");

const oWorksheet = Api.GetActiveSheet();

var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.ISOWEEKNUM("9/1/2017"); 

oWorksheet.GetRange("C1").SetValue(ans);

builder.SaveFile("xlsx", "ISOWEEKNUM.xlsx");
builder.CloseFile();

Resulting document