TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

NETWORKDAYS_INTL

NETWORKDAYS_INTL(arg1, arg2, arg3, arg4) → { number | string | boolean }

Returns the number of whole workdays between two dates with custom weekend parameters.

Parameters:

Name Type Description
arg1 any

Is a serial date number that represents the start date.

arg2 any

Is a serial date number that represents the end date.

arg3 number

Is a number or string specifying when weekends occur.

arg4 any

Is an optional set of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.NETWORKDAYS_INTL("8/1/2017", "9/1/2017", "0000011", "8/16/2017"));
builder.SaveFile("xlsx", "NETWORKDAYS_INTL.xlsx");
builder.CloseFile();

Resulting document