Excel.DocumentTask class

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents a task.

Extends

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

Properties

assignees

Returns a collection of assignees of the task.

changes

Gets the change records of the task.

comment

Gets the comment associated with the task.

completedBy

Gets the most recent user to have completed the task.

completedDateTime

Gets the date and time that the task was completed. All dates are in UTC.

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

createdBy

Gets the user who created the task.

createdDateTime

Gets the date and time that the task was created. All dates are in UTC.

id

Gets the ID of the task.

percentComplete

Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task.

priority

Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority.

startAndDueDateTime

Gets or sets the date and time the task should start and is due.

title

Specifies title of the task.

Methods

assign(assignee)

Adds the given user to the list of assignees attached to the task.

load(options)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNames)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNamesAndPaths)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that is passed to it.) Whereas the original Excel.DocumentTask object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.DocumentTaskData) that contains shallow copies of any loaded child properties from the original object.

unassign(assignee)

Removes the given user from the list of assignees attached to the task.

unassignAll()

Removes all users from the list of assignees attached to the task.

Property Details

assignees

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Returns a collection of assignees of the task.

readonly assignees: Excel.EmailIdentity[];

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

changes

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the change records of the task.

readonly changes: Excel.DocumentTaskChangeCollection;

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

comment

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the comment associated with the task.

readonly comment: Excel.Comment;

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

completedBy

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the most recent user to have completed the task.

readonly completedBy: Excel.EmailIdentity;

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

completedDateTime

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the date and time that the task was completed. All dates are in UTC.

readonly completedDateTime: Date;

Property Value

Date

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

context

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The request context associated with the object. This connects the add-in's process to the Office host application's process.

context: RequestContext;

Property Value

createdBy

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the user who created the task.

readonly createdBy: Excel.EmailIdentity;

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

createdDateTime

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the date and time that the task was created. All dates are in UTC.

readonly createdDateTime: Date;

Property Value

Date

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

id

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the ID of the task.

readonly id: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

percentComplete

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task.

percentComplete: number;

Property Value

number

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

priority

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority.

priority: number;

Property Value

number

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

startAndDueDateTime

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets or sets the date and time the task should start and is due.

startAndDueDateTime: Excel.DocumentTaskSchedule;

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

title

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies title of the task.

title: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

Method Details

assign(assignee)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Adds the given user to the list of assignees attached to the task.

assign(assignee: Excel.EmailIdentity): void;

Parameters

assignee
Excel.EmailIdentity

The identity of the user to add to the assignee list.

Returns

void

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

load(options)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(options?: Excel.Interfaces.DocumentTaskLoadOptions): Excel.DocumentTask;

Parameters

options
Excel.Interfaces.DocumentTaskLoadOptions

Provides options for which properties of the object to load.

Returns

load(propertyNames)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNames?: string | string[]): Excel.DocumentTask;

Parameters

propertyNames

string | string[]

A comma-delimited string or an array of strings that specify the properties to load.

Returns

load(propertyNamesAndPaths)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): Excel.DocumentTask;

Parameters

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select is a comma-delimited string that specifies the properties to load, and propertyNamesAndPaths.expand is a comma-delimited string that specifies the navigation properties to load.

Returns

toJSON()

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that is passed to it.) Whereas the original Excel.DocumentTask object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.DocumentTaskData) that contains shallow copies of any loaded child properties from the original object.

toJSON(): Excel.Interfaces.DocumentTaskData;

Returns

unassign(assignee)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Removes the given user from the list of assignees attached to the task.

unassign(assignee: Excel.EmailIdentity): void;

Parameters

assignee
Excel.EmailIdentity

The identity of the user to remove from the assignee list.

Returns

void

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

unassignAll()

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Removes all users from the list of assignees attached to the task.

unassignAll(): void;

Returns

void

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]