/* office-js Copyright (c) Microsoft Corporation */ //////////////////////////////////////////////////////////////// //////////////////// Begin Office namespace //////////////////// //////////////////////////////////////////////////////////////// declare namespace Office { /** A Promise object. Promises can be chained via ".then", and errors can be caught via ".catch". * When a browser-provided native Promise implementation is available, Office.Promise will switch to use the native Promise instead. */ var Promise: IPromiseConstructor; // **Note**: this is a copy of the PromiseConstructor object from // https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es2015.promise.d.ts // It is necessary so that even with targeting "ES5" and not specifying any libs, // developers will still get IntelliSense for "Office.Promise" just as they would with a regular Promise. // (because even though Promise is part of standard lib.d.ts, PromiseConstructor is not) interface IPromiseConstructor { /** * A reference to the prototype. */ readonly prototype: Promise; /** * Creates a new Promise. * @param executor A callback used to initialize the promise. This callback is passed two arguments: * a resolve callback used resolve the promise with a value or the result of another promise, * and a reject callback used to reject the promise with a provided reason or error. */ new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise<[T1, T2, T3, T4]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ all(values: Array>): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. * @param values An array of Promises. * @returns A new Promise. */ race(values: Array>): Promise; /** * Creates a new rejected promise for the provided reason. * @param reason The reason the promise was rejected. * @returns A new rejected Promise. */ reject(reason: any): Promise; /** * Creates a new rejected promise for the provided reason. * @param reason The reason the promise was rejected. * @returns A new rejected Promise. */ reject(reason: any): Promise; /** * Creates a new resolved promise for the provided value. * @param value A promise. * @returns A promise whose internal state matches the provided promise. */ resolve(value: T | PromiseLike): Promise; /** * Creates a new resolved promise. * @returns A resolved promise. */ resolve(): Promise; } /** * Gets the Context object that represents the runtime environment of the add-in and provides access to the top-level objects of the API. * * @remarks * * **Applications**: Excel, Outlook, PowerPoint, Project, Word */ var context: Context; /** * Provides a method for associating action names with functions that carry out an action. */ const actions: Actions; /** * Represents the add-in. */ const addin: Addin; /** * Represents the Auth interface. */ const auth: Auth; /** * Represents the ribbon associated with the Office application. */ const ribbon: Ribbon; /** * Occurs when the runtime environment is loaded and the add-in is ready to start interacting with the application and hosted document. * * The reason parameter of the initialize event listener function returns an `InitializationReason` enumeration value that specifies how * initialization occurred. A task pane or content add-in can be initialized in two ways: * * - The user just inserted it from Recently Used Add-ins section of the Add-in drop-down list on the Insert tab of the ribbon in the Office * application, or from Insert add-in dialog box. * * - The user opened a document that already contains the add-in. * * *Note*: The reason parameter of the initialize event listener function only returns an `InitializationReason` enumeration value for task pane * and content add-ins. It does not return a value for Outlook add-ins. * * @remarks * * **Support details** * * For more information about Office application and server requirements, see * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. * * *Supported applications, by platform* * * * * * * * *
Office on the web Office on Windows Office on Mac Office on iPad Outlook on mobile devices
Excel Supported Supported Supported Supported Not applicable
Outlook Supported Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported Not applicable
Project Not supported Supported Supported Not supported Not applicable
Word Supported Supported Supported Supported Not applicable
* * @param reason Indicates how the app was initialized. */ function initialize(reason: InitializationReason): void; /** * Checks if the specified requirement set is supported by the Office application. * @param name - Set name; e.g., "MatrixBindings". * @param minVersion - The minimum required version; e.g., "1.4". */ function isSetSupported(name: string, minVersion?: string): boolean; /** * Ensures that the Office JavaScript APIs are ready to be called by the add-in. If the framework hasn't initialized yet, the callback or promise * will wait until the Office application is ready to accept API calls. Note that though this API is intended to be used inside an Office add-in, it can * also be used outside the add-in. In that case, once Office.js determines that it is running outside of an Office application, it will call * the callback and resolve the promise with "null" for both the application and platform. * * @param callback - An optional callback function, that will receive the application and platform info. * Alternatively, rather than use a callback, an add-in may simply wait for the Promise returned by the function to resolve. * @returns A Promise that contains the application and platform info, once initialization is completed. */ function onReady(callback?: (info: { host: HostType, platform: PlatformType }) => any): Promise<{ host: HostType, platform: PlatformType }>; /** * Returns a promise of an object described in the expression. Callback is invoked only if the function fails. * * @param expression The object to be retrieved. Example "bindings#BindingName", retrieves a binding promise for a binding named 'BindingName' * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * * @remarks * * **Support details** * * For more information about Office application and server requirements, see * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. * * *Supported applications, by platform* * * * * *
Office on the web Office on Windows Office on iPad
Excel Supported Supported Supported
Word Not supported Supported Supported
*/ function select(expression: string, callback?: (result: AsyncResult) => void): Binding; /** * Toggles on and off the `Office` alias for the full `Microsoft.Office.WebExtension` namespace. * * @remarks * * **Support details** * * For more information about Office application and server requirements, see * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. * * *Supported applications, by platform* * * * * * * * *
Office on the web Office on Windows Office on Mac Office on iPad Outlook on mobile devices
Excel Supported Supported Not supported Supported Not applicable
Outlook Supported Supported Supported Supported Supported
PowerPoint Supported Supported Not supported Supported Not applicable
Project Not supported Supported Not supported Not supported Not applicable
Word Supported Supported Not supported Supported Not applicable
* * @param useShortNamespace True to use the shortcut alias; otherwise false to disable it. The default is true. */ function useShortNamespace(useShortNamespace: boolean): void; // Enumerations /** * Specifies the state of the active view of the document, for example, whether the user can edit the document. */ enum ActiveView { /** * The active view of the Office application only lets the user read the content in the document. */ Read, /** * The active view of the Office application lets the user edit the content in the document. */ Edit } /** * Specifies the result of an asynchronous call. * * @remarks * * Returned by the `status` property of the {@link Office.AsyncResult | AsyncResult} object. */ enum AsyncResultStatus { /** * The call succeeded. */ Succeeded, /** * The call failed, check the error object. */ Failed } /** * Specifies the type of the binding object that should be returned. */ enum BindingType { /** * Plain text. Data is returned as a run of characters. */ Text, /** * Tabular data without a header row. Data is returned as an array of arrays, for example in this form: * [[row1column1, row1column2],[row2column1, row2column2]] */ Matrix, /** * Tabular data with a header row. Data is returned as a {@link Office.TableData | TableData} object. */ Table } /** * Specifies how to coerce data returned or set by the invoked method. * * @remarks * * Application and platform support for each `CoercionType` is specified in the following requirement set descriptions. * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion 1.1} (when using `Office.CoercionType.Image`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) * */ enum CoercionType { /** * Return or set data as text (string). Data is returned or set as a one-dimensional run of characters. */ Text, /** * Return or set data as tabular data with no headers. Data is returned or set as an array of arrays containing one-dimensional runs of * characters. For example, three rows of string values in two columns would be: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]. * * **Note**: Only applies to data in Excel and Word. */ Matrix, /** * Return or set data as tabular data with optional headers. Data is returned or set as an array of arrays with optional headers. * * **Note**: Only applies to data in Excel and Word. */ Table, /** * Return or set data as HTML. * * **Note**: Only applies to data in add-ins for Word and Outlook add-ins for Outlook (compose mode). */ Html, /** * Return or set data as Office Open XML. * * **Note**: Only applies to data in Word. */ Ooxml, /** * Return a JSON object that contains an array of the IDs, titles, and indexes of the selected slides. For example, * `{"slides":[{"id":257,"title":"Slide 2","index":2},{"id":256,"title":"Slide 1","index":1}]}` for a selection of two slides. * * **Note**: Only applies to data in PowerPoint when calling the {@link Office.Document | Document}.getSelectedData method to get the current * slide or selected range of slides. */ SlideRange, /** * Data is returned or set as an image stream. * **Note**: Only applies to data in Excel, Word, and PowerPoint. */ Image, /** * Data is returned or set as XML data containing an SVG image. * **Note**: Only applies to data in Excel, Word, and PowerPoint. */ XmlSvg } /** * Specifies the type of the XML node. */ enum CustomXMLNodeType { /** * The node is an attribute. */ Attribute, /** * The node is CData. */ CData, /** * The node is a comment. */ NodeComment, /** * The node is an element. */ Element, /** * The node is a Document element. */ NodeDocument, /** * The node is a processing instruction. */ ProcessingInstruction, /** * The node is text. */ Text, } /** * Specifies whether the document in the associated application is read-only or read-write. * * @remarks * * Returned by the mode property of the {@link Office.Document | Document} object. */ enum DocumentMode { /** * The document is read-only. */ ReadOnly, /** * The document can be read and written to. */ ReadWrite } /** * Specifies the kind of event that was raised. Returned by the `type` property of an `*EventArgs` object. * * Add-ins for Project support the `Office.EventType.ResourceSelectionChanged`, `Office.EventType.TaskSelectionChanged`, and * `Office.EventType.ViewSelectionChanged` event types. * * Only task pane add-ins for Outlook support Mailbox API set event types. * */ enum EventType { /** * A `Document.ActiveViewChanged` event was raised in PowerPoint. */ ActiveViewChanged, /** * Occurs when any date or time of the selected appointment or series is changed in Outlook. * **Important**: Only available with task pane implementation. * * To add an event handler for the `AppointmentTimeChanged` event, use the `addHandlerAsync` method of the `Item` object. * The event handler receives an argument of type * {@link https://learn.microsoft.com/javascript/api/outlook/office.appointmenttimechangedeventargs?view=outlook-js-1.7 | Office.AppointmentTimeChangedEventArgs}. * * [Api set: Mailbox 1.7] */ AppointmentTimeChanged, /** * Occurs when an attachment is added to or removed from an item. **Important**: Only available with task pane implementation. * * To add an event handler for the `AttachmentsChanged` event, use the `addHandlerAsync` method of the `Item` object. * The event handler receives an argument of type * {@link https://learn.microsoft.com/javascript/api/outlook/office.attachmentschangedeventargs?view=outlook-js-1.8 | Office.AttachmentsChangedEventArgs}. * * [Api set: Mailbox 1.8] */ AttachmentsChanged, /** * Occurs when data within the binding is changed in Excel or Word. * * To add an event handler for the `BindingDataChanged` event of a binding, use the `addHandlerAsync` method of the Binding object. * The event handler receives an argument of type {@link Office.BindingDataChangedEventArgs}. */ BindingDataChanged, /** * Occurs when the selection is changed within the binding in Excel or Word. * * To add an event handler for the `BindingSelectionChanged` event of a binding, use * the `addHandlerAsync` method of the Binding object. The event handler receives an argument of type {@link Office.BindingSelectionChangedEventArgs}. */ BindingSelectionChanged, /** * Triggers when Dialog has an event, such as dialog closed or dialog navigation failed. */ DialogEventReceived, /** * Triggers when a dialog sends a message via `messageParent`. */ DialogMessageReceived, /** * Triggers when a host page sends a message to a child dialog box with `messageChild`. */ DialogParentMessageReceived, /** * Triggers when a document-level selection happens in Excel or Word. */ DocumentSelectionChanged, /** * Occurs when the appointment location is changed in Outlook. **Important**: Only available with task pane implementation. * * To add an event handler for the `EnhancedLocationsChanged` event, use the `addHandlerAsync` method of the `Item` object. * The event handler receives an argument of type * {@link https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocationschangedeventargs?view=outlook-js-1.8 | Office.EnhancedLocationsChangedEventArgs}. * * [Api set: Mailbox 1.8] */ EnhancedLocationsChanged, /** * Occurs in Outlook when an action is selected on a notification message with a defined * {@link https://learn.microsoft.com/javascript/api/outlook/office.notificationmessagedetails#actions | custom action}. * Currently, "Dismiss" is the only supported action that fires this event. * * **Important**: This event is only available with task pane implementation. * * To add an event handler for the `InfobarClicked` event, use the `addHandlerAsync` method of the `Item` object. * The event handler receives an argument of type * {@link https://learn.microsoft.com/javascript/api/outlook/office.infobarclickedeventargs?view=outlook-js-1.10 | Office.InfobarClickedEventArgs}. * * [Api set: Mailbox 1.10] */ InfobarClicked, /** * Occurs when a different Outlook item is selected for viewing while the task pane is pinned. * **Important**: Only available with task pane implementation. * * To add an event handler for the `ItemChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. * * [Api set: Mailbox 1.5] */ ItemChanged, /** * Triggers when a `customXmlPart` node is deleted. */ NodeDeleted, /** * Triggers when a `customXmlPart` node is inserted. */ NodeInserted, /** * Triggers when a `customXmlPart` node is replaced. */ NodeReplaced, /** * Occurs when the recipient list of the selected item or the appointment location is changed in Outlook. * **Important**: Only available with task pane implementation. * * To add an event handler for the `RecipientsChanged` event, use the `addHandlerAsync` method of the `Item` object. * The event handler receives an argument of type * {@link https://learn.microsoft.com/javascript/api/outlook/office.recipientschangedeventargs?view=outlook-js-1.7 | Office.RecipientsChangedEventArgs}. * * [Api set: Mailbox 1.7] */ RecipientsChanged, /** * Occurs when the recurrence pattern of the selected series is changed in Outlook. * **Important**: Only available with task pane implementation. * * To add an event handler for the `RecurrenceChanged` event, use the `addHandlerAsync` method of the `Item` object. * The event handler receives an argument of type * {@link https://learn.microsoft.com/javascript/api/outlook/office.recurrencechangedeventargs?view=outlook-js-1.7 | Office.RecurrenceChangedEventArgs}. * * [Api set: Mailbox 1.7] */ RecurrenceChanged, /** * Triggers when a Resource selection happens in Project. */ ResourceSelectionChanged, /** * Occurs in Outlook when one or more messages are selected or deselected. * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. * * To add an event handler for the `SelectedItemsChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. * * [Api set: Mailbox 1.13] */ SelectedItemsChanged, /** * Occurs in Outlook when the sensitivity label of a message or appointment changes. * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. * * To add an event handler for the `SensitivityLabelChanged` event, use the `addHandlerAsync` method of the `Item` object. * The event handler receives an argument of type * {@link https://learn.microsoft.com/javascript/api/outlook/office.sensitivitylabelchangedeventargs | Office.SensitivityLabelChangedEventArgs}. * * [Api set: Mailbox 1.13] */ SensitivityLabelChanged, /** * A `Settings.settingsChanged` event was raised in Excel, PowerPoint, or Word. */ SettingsChanged, /** * Triggers when a Task selection happens in Project. */ TaskSelectionChanged, /** * Triggers when a View selection happens in Project. */ ViewSelectionChanged } /** * Specifies the format in which to return the document. */ enum FileType { /** * Returns only the text of the document as a string. */ Text, /** * Returns the entire document (.pptx, .docx, .xlsx, or .xlsm) in Office Open XML (OOXML) format as a byte array. * * Note: The .xslm file type is supported in Excel on Windows and Mac. It's not supported in Excel on the web. * In Excel on Windows, the file slices from the `getFileAsync` method include the VBA signature files for .xslm file types. The VBA signature files are vbaProjectSignature.bin, vbaProbjectSignatureAgile.bin, and vbaProjectSignatureV3.bin. * In Excel on Mac, the file slices from the `getFileAsync` method don't include the VBA signature files, because this platform doesn't support the VBA signature feature. */ Compressed, /** * Returns the entire document in PDF format as a byte array. */ Pdf } /** * Specifies whether filtering from the Office application is applied when the data is retrieved. */ enum FilterType { /** * Return all data (not filtered by the Office application). */ All, /** * Return only the visible data (as filtered by the Office application). */ OnlyVisible } /** * Specifies the type of place or object to navigate to. */ enum GoToType { /** * Goes to a binding object using the specified binding ID. * * Supported applications: Excel, Word */ Binding, /** * Goes to a named item using that item's name. * In Excel, you can use any structured reference for a named range or table: "Worksheet2!Table1" * * Supported applications: Excel */ NamedItem, /** * Goes to a slide using the specified ID. * * Supported applications: PowerPoint */ Slide, /** * Goes to the specified index by slide number or {@link Office.Index}. * * Supported applications: PowerPoint */ Index } /** * Specifies the Office application in which the add-in is running. * * @remarks * **Important**: In Outlook, this enum is available from Mailbox requirement set 1.5. */ enum HostType { /** * The Office application is Microsoft Word. */ Word, /** * The Office application is Microsoft Excel. */ Excel, /** * The Office application is Microsoft PowerPoint. */ PowerPoint, /** * The Office application is Microsoft Outlook. */ Outlook, /** * The Office application is Microsoft OneNote. */ OneNote, /** * The Office application is Microsoft Project. */ Project, /** * The Office application is Microsoft Access. * * @deprecated Microsoft Access is no longer supported. */ Access } /** * Specifies the relative PowerPoint slide. */ enum Index { /** * Represents the first PowerPoint slide */ First, /** * Represents the last PowerPoint slide */ Last, /** * Represents the next PowerPoint slide */ Next, /** * Represents the previous PowerPoint slide */ Previous } /** * Specifies whether the add-in was just inserted or was already contained in the document. */ enum InitializationReason { /** * The add-in was just inserted into the document. */ Inserted, /** * The add-in is already part of the document that was opened. */ DocumentOpened } /** * Specifies the OS or other platform on which the Office application is running. * * @remarks * **Important**: In Outlook, this enum is available from Mailbox requirement set 1.5. */ enum PlatformType { /** * The platform is PC (Windows). */ PC, /** * The platform is Office on the web (in a browser). * * **Important**: In Outlook, `OfficeOnline` is returned if an add-is is running in Outlook on the web or in * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows (preview)}. */ OfficeOnline, /** * The platform is Mac. */ Mac, /** * The platform is an iOS device. */ iOS, /** * The platform is an Android device. */ Android, /** * The platform is WinRT. */ Universal } /** * Specifies the project fields that are available as a parameter for the {@link Office.Document | Document}.getProjectFieldAsync method. * * @remarks * * A ProjectProjectFields constant can be used as a parameter of the {@link Office.Document | Document}.getProjectFieldAsync method. */ enum ProjectProjectFields { /** * The number of digits after the decimal for the currency. */ CurrencyDigits, /** * The currency symbol. */ CurrencySymbol, /** * The placement of the currency symbol: Not specified = -1; Before the value with no space ($0) = 0; After the value with no space (0$) = 1; * Before the value with a space ($ 0) = 2; After the value with a space (0 $) = 3. */ CurrencySymbolPosition, DurationUnits, /** * The GUID of the project. */ GUID, /** * The project finish date. */ Finish, /** * The project start date. */ Start, /** * Specifies whether the project is read-only. */ ReadOnly, /** * The project version. */ VERSION, /** * The work units of the project, such as days or hours. */ WorkUnits, /** * The Project Web App URL, for projects that are stored in Project Server. */ ProjectServerUrl, /** * The SharePoint URL, for projects that are synchronized with a SharePoint list. */ WSSUrl, /** * The name of the SharePoint list, for projects that are synchronized with a tasks list. */ WSSList } /** * Specifies the resource fields that are available as a parameter for the {@link Office.Document | Document}.getResourceFieldAsync method. * * @remarks * * A ProjectResourceFields constant can be used as a parameter of the {@link Office.Document | Document}.getResourceFieldAsync method. * * For more information about working with fields in Project, see * {@link https://support.microsoft.com/office/615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. In * Project Help, search for Available fields. */ enum ProjectResourceFields { /** * The accrual method that defines how a task accrues the cost of the resource: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Accrual, /** * The calculated actual cost of the resource for assignments in the project. */ ActualCost, /** * The actual overtime cost for a resource. */ ActualOvertimeCost, /** * The actual overtime work for a resource, in minutes. */ ActualOvertimeWork, /** * The actual overtime work for the resource that has been protected (made read-only). */ ActualOvertimeWorkProtected, /** * The actual work that the resource has done on assignments in the project. */ ActualWork, /** * The actual work for the resource that has been protected (made read-only). */ ActualWorkProtected, /** * The name of the base calendar for the resource. */ BaseCalendar, /** * The budget cost for the baseline resource. */ Baseline10BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline10BudgetWork, /** * The cost for the baseline resource. */ Baseline10Cost, /** * The work for the baseline resource, in minutes. */ Baseline10Work, /** * The budget cost for the baseline resource. */ Baseline1BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline1BudgetWork, /** * The cost for the baseline resource. */ Baseline1Cost, /** * The work for the baseline resource, in minutes. */ Baseline1Work, /** * The budget cost for the baseline resource. */ Baseline2BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline2BudgetWork, /** * The cost for the baseline resource. */ Baseline2Cost, /** * The work for the baseline resource, in minutes. */ Baseline2Work, /** * The budget cost for the baseline resource. */ Baseline3BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline3BudgetWork, /** * The cost for the baseline resource. */ Baseline3Cost, /** * The work for the baseline resource, in minutes. */ Baseline3Work, /** * The budget cost for the baseline resource. */ Baseline4BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline4BudgetWork, /** * The cost for the baseline resource. */ Baseline4Cost, /** * The work for the baseline resource, in minutes. */ Baseline4Work, /** * The budget cost for the baseline resource. */ Baseline5BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline5BudgetWork, /** * The cost for the baseline resource. */ Baseline5Cost, /** * The work for the baseline resource, in minutes. */ Baseline5Work, /** * The budget cost for the baseline resource. */ Baseline6BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline6BudgetWork, /** * The cost for the baseline resource. */ Baseline6Cost, /** * The work for the baseline resource, in minutes. */ Baseline6Work, /** * The budget cost for the baseline resource. */ Baseline7BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline7BudgetWork, /** * The cost for the baseline resource. */ Baseline7Cost, /** * The work for the baseline resource, in minutes. */ Baseline7Work, /** * The budget cost for the baseline resource. */ Baseline8BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline8BudgetWork, /** * The cost for the baseline resource. */ Baseline8Cost, /** * The work for the baseline resource, in minutes. */ Baseline8Work, /** * The budget cost for the baseline resource. */ Baseline9BudgetCost, /** * The budget work for the baseline resource, in hours. */ Baseline9BudgetWork, /** * The cost for the baseline resource. */ Baseline9Cost, /** * The work for the baseline resource, in minutes. */ Baseline9Work, /** * The budget cost for the baseline resource. */ BaselineBudgetCost, /** * The budget work for the baseline resource, in hours. */ BaselineBudgetWork, /** * The baseline cost for the resource for assignments in the project. */ BaselineCost, /** * The baseline work for the resource for assignments in the project, in minutes. */ BaselineWork, /** * The budget cost for the resource. */ BudgetCost, /** * The budget work for the resource. */ BudgetWork, /** * The GUID of the resource calendar. */ ResourceCalendarGUID, /** * The code value of the resource. */ Code, /** * A cost field for the resource. */ Cost1, /** * A cost field for the resource. */ Cost10, /** * A cost field for the resource. */ Cost2, /** * A cost field for the resource. */ Cost3, /** * A cost field for the resource. */ Cost4, /** * A cost field for the resource. */ Cost5, /** * A cost field for the resource. */ Cost6, /** * A cost field for the resource. */ Cost7, /** * A cost field for the resource. */ Cost8, /** * A cost field for the resource. */ Cost9, /** * The date the resource was created. */ ResourceCreationDate, /** * A date field for the resource. */ Date1, /** * A date field for the resource. */ Date10, /** * A date field for the resource. */ Date2, /** * A date field for the resource. */ Date3, /** * A date field for the resource. */ Date4, /** * A date field for the resource. */ Date5, /** * A date field for the resource. */ Date6, /** * A date field for the resource. */ Date7, /** * A date field for the resource. */ Date8, /** * A date field for the resource. */ Date9, /** * A duration field for the resource. */ Duration1, /** * A duration field for the resource. */ Duration10, /** * A duration field for the resource. */ Duration2, /** * A duration field for the resource. */ Duration3, /** * A duration field for the resource. */ Duration4, /** * A duration field for the resource. */ Duration5, /** * A duration field for the resource. */ Duration6, /** * A duration field for the resource. */ Duration7, /** * A duration field for the resource. */ Duration8, /** * A duration field for the resource. */ Duration9, /** * The email address of the resource. */ Email, /** * The end date of the resource availability. */ End, /** * A finish field for the task. */ Finish1, /** * A finish field for the task. */ Finish10, /** * A finish field for the task. */ Finish2, /** * A finish field for the task. */ Finish3, /** * A finish field for the task. */ Finish4, /** * A finish field for the task. */ Finish5, /** * A finish field for the task. */ Finish6, /** * A finish field for the task. */ Finish7, /** * A finish field for the task. */ Finish8, /** * A finish field for the task. */ Finish9, /** * A Boolean flag field for the resource. */ Flag10, /** * A Boolean flag field for the resource. */ Flag1, /** * A Boolean flag field for the resource. */ Flag11, /** * A Boolean flag field for the resource. */ Flag12, /** * A Boolean flag field for the resource. */ Flag13, /** * A Boolean flag field for the resource. */ Flag14, /** * A Boolean flag field for the resource. */ Flag15, /** * A Boolean flag field for the resource. */ Flag16, /** * A Boolean flag field for the resource. */ Flag17, /** * A Boolean flag field for the resource. */ Flag18, /** * A Boolean flag field for the resource. */ Flag19, /** * A Boolean flag field for the resource. */ Flag2, /** * A Boolean flag field for the resource. */ Flag20, /** * A Boolean flag field for the resource. */ Flag3, /** * A Boolean flag field for the resource. */ Flag4, /** * A Boolean flag field for the resource. */ Flag5, /** * A Boolean flag field for the resource. */ Flag6, /** * A Boolean flag field for the resource. */ Flag7, /** * A Boolean flag field for the resource. */ Flag8, /** * A Boolean flag field for the resource. */ Flag9, /** * The group the resource belongs to. */ Group, /** * The percentage of work units that the resource has assigned in the project. If the resource is working full-time on the project, Units = 100. */ Units, /** * The name of the resource. */ Name, /** * The text value of the notes regarding the resource. */ Notes, /** * A number field for the resource. */ Number1, /** * A number field for the resource. */ Number10, /** * A number field for the resource. */ Number11, /** * A number field for the resource. */ Number12, /** * A number field for the resource. */ Number13, /** * A number field for the resource. */ Number14, /** * A number field for the resource. */ Number15, /** * A number field for the resource. */ Number16, /** * A number field for the resource. */ Number17, /** * A number field for the resource. */ Number18, /** * A number field for the resource. */ Number19, /** * A number field for the resource. */ Number2, /** * A number field for the resource. */ Number20, /** * A number field for the resource. */ Number3, /** * A number field for the resource. */ Number4, /** * A number field for the resource. */ Number5, /** * A number field for the resource. */ Number6, /** * A number field for the resource. */ Number7, /** * A number field for the resource. */ Number8, /** * A number field for the resource. */ Number9, /** * The overtime cost for a resource. */ OvertimeCost, /** * The overtime rate for a resource. */ OvertimeRate, /** * The overtime work for a resource. */ OvertimeWork, /** * The percentage of work complete for a resource. */ PercentWorkComplete, /** * The cost per use of the resource. */ CostPerUse, /** * Indicates whether the resource is a generic resource (identified by skill rather than by name). */ Generic, /** * Indicates whether the resource is overallocated. */ OverAllocated, /** * The amount of regular work for the resource. */ RegularWork, /** * The remaining cost for the resource. */ RemainingCost, /** * The remaining overtime cost for the resource. */ RemainingOvertimeCost, /** * The remaining overtime work for the resource, in minutes. */ RemainingOvertimeWork, /** * The remaining work for the resource, in minutes. */ RemainingWork, /** * The ID of the resource. */ ResourceGUID, /** * The total cost of the resource. */ Cost, /** * The total work for the resource, in minutes. */ Work, /** * The start date for the resource. */ Start, /** * A start field for the resource. */ Start1, /** * A start field for the resource. */ Start10, /** * A start field for the resource. */ Start2, /** * A start field for the resource. */ Start3, /** * A start field for the resource. */ Start4, /** * A start field for the resource. */ Start5, /** * A start field for the resource. */ Start6, /** * A start field for the resource. */ Start7, /** * A start field for the resource. */ Start8, /** * A start field for the resource. */ Start9, /** * The standard rate of pay for the resource, in cost per hour. */ StandardRate, /** * A text field for the resource. */ Text1, /** * A text field for the resource. */ Text10, /** * A text field for the resource. */ Text11, /** * A text field for the resource. */ Text12, /** * A text field for the resource. */ Text13, /** * A text field for the resource. */ Text14, /** * A text field for the resource. */ Text15, /** * A text field for the resource. */ Text16, /** * A text field for the resource. */ Text17, /** * A text field for the resource. */ Text18, /** * A text field for the resource. */ Text19, /** * A text field for the resource. */ Text2, /** * A text field for the resource. */ Text20, /** * A text field for the resource. */ Text21, /** * A text field for the resource. */ Text22, /** * A text field for the resource. */ Text23, /** * A text field for the resource. */ Text24, /** * A text field for the resource. */ Text25, /** * A text field for the resource. */ Text26, /** * A text field for the resource. */ Text27, /** * A text field for the resource. */ Text28, /** * A text field for the resource. */ Text29, /** * A text field for the resource. */ Text3, /** * A text field for the resource. */ Text30, /** * A text field for the resource. */ Text4, /** * A text field for the resource. */ Text5, /** * A text field for the resource. */ Text6, /** * A text field for the resource. */ Text7, /** * A text field for the resource. */ Text8, /** * A text field for the resource. */ Text9 } /** * Specifies the task fields that are available as a parameter for the {@link Office.Document | Document}.getTaskFieldAsync method. * * @remarks * * A ProjectTaskFields constant can be used as a parameter of the {@link Office.Document | Document}.getTaskFieldAsync method. * * For more information about working with fields in Project, see the * {@link https://support.microsoft.com/office/615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. * In Project Help, search for Available fields. */ enum ProjectTaskFields { /** * The current actual cost for the task. */ ActualCost, /** * The actual duration of the task, in minutes. */ ActualDuration, /** * The actual finish date of the task. */ ActualFinish, /** * The actual overtime cost for the task. */ ActualOvertimeCost, /** * The actual overtime work for the task, in minutes. */ ActualOvertimeWork, /** * The actual start date of the task. */ ActualStart, /** * The actual work for the task, in minutes. */ ActualWork, /** * A text field for the task. */ Text1, /** * A text field for the task. */ Text10, /** * A finish field for the task. */ Finish10, /** * A start field for the task. */ Start10, /** * A text field for the task. */ Text11, /** * A text field for the task. */ Text12, /** * A text field for the task. */ Text13, /** * A text field for the task. */ Text14, /** * A text field for the task. */ Text15, /** * A text field for the task. */ Text16, /** * A text field for the task. */ Text17, /** * A text field for the task. */ Text18, /** * A text field for the task. */ Text19, /** * A finish field for the task. */ Finish1, /** * A start field for the task. */ Start1, /** * A text field for the task. */ Text2, /** * A text field for the task. */ Text20, /** * A text field for the task. */ Text21, /** * A text field for the task. */ Text22, /** * A text field for the task. */ Text23, /** * A text field for the task. */ Text24, /** * A text field for the task. */ Text25, /** * A text field for the task. */ Text26, /** * A text field for the task. */ Text27, /** * A text field for the task. */ Text28, /** * A text field for the task. */ Text29, /** * A finish field for the task. */ Finish2, /** * A start field for the task. */ Start2, /** * A text field for the task. */ Text3, /** * A text field for the task. */ Text30, /** * A finish field for the task. */ Finish3, /** * A start field for the task. */ Start3, /** * A text field for the task. */ Text4, /** * A finish field for the task. */ Finish4, /** * A start field for the task. */ Start4, /** * A text field for the task. */ Text5, /** * A finish field for the task. */ Finish5, /** * A start field for the task. */ Start5, /** * A text field for the task. */ Text6, /** * A finish field for the task. */ Finish6, /** * A start field for the task. */ Start6, /** * A text field for the task. */ Text7, /** * A finish field for the task. */ Finish7, /** * A start field for the task. */ Start7, /** * A text field for the task. */ Text8, /** * A finish field for the task. */ Finish8, /** * A start field for the task. */ Start8, /** * A text field for the task. */ Text9, /** * A finish field for the task. */ Finish9, /** * A start field for the task. */ Start9, /** * The budget cost for the baseline task. */ Baseline10BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline10BudgetWork, /** * The cost for the baseline task. */ Baseline10Cost, /** * The duration for the baseline task, in minutes. */ Baseline10Duration, /** * The finish date for the baseline task. */ Baseline10Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline10FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline10FixedCostAccrual, /** * The start date for the baseline task. */ Baseline10Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline10Work, /** * The budget cost for the baseline task. */ Baseline1BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline1BudgetWork, /** * The cost for the baseline task. */ Baseline1Cost, /** * The duration for the baseline task, in minutes. */ Baseline1Duration, /** * The finish date for the baseline task. */ Baseline1Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline1FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline1FixedCostAccrual, /** * The start date for the baseline task. */ Baseline1Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline1Work, /** * The budget cost for the baseline task. */ Baseline2BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline2BudgetWork, /** * The cost for the baseline task. */ Baseline2Cost, /** * The duration for the baseline task, in minutes. */ Baseline2Duration, /** * The finish date for the baseline task. */ Baseline2Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline2FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline2FixedCostAccrual, /** * The start date for the baseline task. */ Baseline2Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline2Work, /** * The budget cost for the baseline task. */ Baseline3BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline3BudgetWork, /** * The cost for the baseline task. */ Baseline3Cost, /** * The duration for the baseline task, in minutes. */ Baseline3Duration, /** * The finish date for the baseline task. */ Baseline3Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline3FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline3FixedCostAccrual, /** * The start date for the baseline task. */ Baseline3Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline3Work, /** * The budget cost for the baseline task. */ Baseline4BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline4BudgetWork, /** * The cost for the baseline task. */ Baseline4Cost, /** * The duration for the baseline task, in minutes. */ Baseline4Duration, /** * The finish date for the baseline task. */ Baseline4Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline4FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline4FixedCostAccrual, /** * The start date for the baseline task. */ Baseline4Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline4Work, /** * The budget cost for the baseline task. */ Baseline5BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline5BudgetWork, /** * The cost for the baseline task. */ Baseline5Cost, /** * The duration for the baseline task, in minutes. */ Baseline5Duration, /** * The finish date for the baseline task. */ Baseline5Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline5FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline5FixedCostAccrual, /** * The start date for the baseline task. */ Baseline5Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline5Work, /** * The budget cost for the baseline task. */ Baseline6BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline6BudgetWork, /** * The cost for the baseline task. */ Baseline6Cost, /** * The duration for the baseline task, in minutes. */ Baseline6Duration, /** * The finish date for the baseline task. */ Baseline6Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline6FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline6FixedCostAccrual, /** * The start date for the baseline task. */ Baseline6Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline6Work, /** * The budget cost for the baseline task. */ Baseline7BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline7BudgetWork, /** * The cost for the baseline task. */ Baseline7Cost, /** * The duration for the baseline task, in minutes. */ Baseline7Duration, /** * The finish date for the baseline task. */ Baseline7Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline7FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline7FixedCostAccrual, /** * The start date for the baseline task. */ Baseline7Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline7Work, /** * The budget cost for the baseline task. */ Baseline8BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline8BudgetWork, /** * The cost for the baseline task. */ Baseline8Cost, /** * The duration for the baseline task, in minutes. */ Baseline8Duration, /** * The finish date for the baseline task. */ Baseline8Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline8FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline8FixedCostAccrual, /** * The start date for the baseline task. */ Baseline8Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline8Work, /** * The budget cost for the baseline task. */ Baseline9BudgetCost, /** * The budget work for the baseline task, in hours. */ Baseline9BudgetWork, /** * The cost for the baseline task. */ Baseline9Cost, /** * The duration for the baseline task, in minutes. */ Baseline9Duration, /** * The finish date for the baseline task. */ Baseline9Finish, /** * The fixed cost of any non-resource expense for the baseline task. */ Baseline9FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ Baseline9FixedCostAccrual, /** * The start date for the baseline task. */ Baseline9Start, /** * The total person-hours scheduled for the baseline task, in minutes. */ Baseline9Work, /** * The budget cost for the baseline task. */ BaselineBudgetCost, /** * The budget work for the baseline task, in hours. */ BaselineBudgetWork, /** * The cost for the baseline task. */ BaselineCost, /** * The duration for the baseline task, in minutes. */ BaselineDuration, /** * The finish date for the baseline task. */ BaselineFinish, /** * The fixed cost of any non-resource expense for the baseline task. */ BaselineFixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ BaselineFixedCostAccrual, /** * The start date for the baseline task. */ BaselineStart, /** * The total person-hours scheduled for the baseline task, in minutes. */ BaselineWork, /** * The budget cost for the task. */ BudgetCost, BudgetFixedCost, BudgetFixedWork, /** * The budget work for the task, in hours. */ BudgetWork, /** * The GUID of the task calendar. */ TaskCalendarGUID, /** * A constraint date for the task. */ ConstraintDate, /** * A constraint type for the task: As Soon As Possible = 0, As Late As Possible = 1, Must Start On = 2, Must Finish On = 3, * Start No Earlier Than = 4, Start No Later Than = 5, Finish No Earlier Than = 6, Finish No Later Than = 7. */ ConstraintType, /** * A cost field of the task. */ Cost1, /** * A cost field of the task. */ Cost10, /** * A cost field of the task. */ Cost2, /** * A cost field of the task. */ Cost3, /** * A cost field of the task. */ Cost4, /** * A cost field of the task. */ Cost5, /** * A cost field of the task. */ Cost6, /** * A cost field of the task. */ Cost7, /** * A cost field of the task. */ Cost8, /** * A cost field of the task. */ Cost9, /** * A date field of the task. */ Date1, /** * A date field of the task. */ Date10, /** * A date field of the task. */ Date2, /** * A date field of the task. */ Date3, /** * A date field of the task. */ Date4, /** * A date field of the task. */ Date5, /** * A date field of the task. */ Date6, /** * A date field of the task. */ Date7, /** * A date field of the task. */ Date8, /** * A date field of the task. */ Date9, /** * The deadline for a task. */ Deadline, /** * A duration field of the task. */ Duration1, /** * A duration field of the task. */ Duration10, /** * A duration field of the task. */ Duration2, /** * A duration field of the task. */ Duration3, /** * A duration field of the task. */ Duration4, /** * A duration field of the task. */ Duration5, /** * A duration field of the task. */ Duration6, /** * A duration field of the task. */ Duration7, /** * A duration field of the task. */ Duration8, /** * A duration field of the task. */ Duration9, /** * A duration field of the task. */ Duration, /** * The method for calculating earned value for the task. */ EarnedValueMethod, /** * The duration between the Early Finish and Late Finish dates for the task, in minutes. */ FinishSlack, /** * The fixed cost for the task. */ FixedCost, /** * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. */ FixedCostAccrual, /** * A Boolean flag field for the task. */ Flag10, /** * A Boolean flag field for the task. */ Flag1, /** * A Boolean flag field for the task. */ Flag11, /** * A Boolean flag field for the task. */ Flag12, /** * A Boolean flag field for the task. */ Flag13, /** * A Boolean flag field for the task. */ Flag14, /** * A Boolean flag field for the task. */ Flag15, /** * A Boolean flag field for the task. */ Flag16, /** * A Boolean flag field for the task. */ Flag17, /** * A Boolean flag field for the task. */ Flag18, /** * A Boolean flag field for the task. */ Flag19, /** * A Boolean flag field for the task. */ Flag2, /** * A Boolean flag field for the task. */ Flag20, /** * A Boolean flag field for the task. */ Flag3, /** * A Boolean flag field for the task. */ Flag4, /** * A Boolean flag field for the task. */ Flag5, /** * A Boolean flag field for the task. */ Flag6, /** * A Boolean flag field for the task. */ Flag7, /** * A Boolean flag field for the task. */ Flag8, /** * A Boolean flag field for the task. */ Flag9, /** * The amount of time that the task can be delayed without delaying its successor tasks. */ FreeSlack, /** * Indicates whether the task has rollup subtasks. */ HasRollupSubTasks, /** * The index of the selected task. After the project summary task, the index of the first task in a project is 1. */ ID, /** * The name of the task. */ Name, /** * The text value of the notes regarding the task. */ Notes, /** * A number field for the task. */ Number1, /** * A number field for the task. */ Number10, /** * A number field for the task. */ Number11, /** * A number field for the task. */ Number12, /** * A number field for the task. */ Number13, /** * A number field for the task. */ Number14, /** * A number field for the task. */ Number15, /** * A number field for the task. */ Number16, /** * A number field for the task. */ Number17, /** * A number field for the task. */ Number18, /** * A number field for the task. */ Number19, /** * A number field for the task. */ Number2, /** * A number field for the task. */ Number20, /** * A number field for the task. */ Number3, /** * A number field for the task. */ Number4, /** * A number field for the task. */ Number5, /** * A number field for the task. */ Number6, /** * A number field for the task. */ Number7, /** * A number field for the task. */ Number8, /** * A number field for the task. */ Number9, /** * The scheduled (as opposed to actual) duration of the task. */ ScheduledDuration, /** * The scheduled (as opposed to actual) finish date of the task. */ ScheduledFinish, /** * The scheduled (as opposed to actual) start date of the task. */ ScheduledStart, /** * The level of the task in the outline hierarchy. */ OutlineLevel, /** * The overtime cost for the task. */ OvertimeCost, /** * The overtime work for the task. */ OvertimeWork, /** * The percent complete status of the task. */ PercentComplete, /** * The percentage of work completed for the task. */ PercentWorkComplete, /** * The IDs of the task's predecessors. */ Predecessors, /** * The finish date of a task before leveling occurred. */ PreleveledFinish, /** * The start date of a task before leveling occurred. */ PreleveledStart, /** * The priority of the task, with values from 0 (low) to 1000 (high). The default priority value is 500. */ Priority, /** * Indicates whether the task is active. */ Active, /** * Indicates whether the task is on the critical path. */ Critical, /** * Indicates whether the task is a milestone. */ Milestone, /** * Indicates whether any assignments for a task are overallocated. */ Overallocated, /** * Indicates whether subtask information is rolled up to the summary task bar. */ IsRollup, /** * Indicates whether the task is a summary task. */ Summary, /** * The amount of regular work for the task. */ RegularWork, /** * The remaining cost for the task. */ RemainingCost, /** * The remaining duration for the task, in minutes. */ RemainingDuration, /** * The remaining overtime cost for the task. */ RemainingOvertimeCost, /** * The remaining work for the task, in minutes. */ RemainingWork, /** * The names of the resources assigned to a task. */ ResourceNames, /** * The total cost of the task. */ Cost, /** * The finish date of the task. */ Finish, /** * The start date of the task. */ Start, /** * The total person-hours scheduled for the task, in minutes. */ Work, /** * The duration between the Early Start and Late Start dates for the task. */ StartSlack, /** * The status of the task: Complete = 0, on schedule = 1, late = 2, future task = 3, status not available = 4. */ Status, /** * The IDs of the task's successors. */ Successors, /** * The enterprise resource responsible for accepting or rejecting assignment progress updates for the task. */ StatusManager, /** * The total slack time for the task, in minutes. */ TotalSlack, /** * The GUID of the task. */ TaskGUID, /** * The way the task is calculated: Fixed units = 0, fixed duration = 1, fixed work = 2. */ Type, /** * The work breakdown structure code of the task. */ WBS, /** * The work breakdown structure codes of the task predecessors, separated by the list separator. */ WBSPREDECESSORS, /** * The work breakdown structure codes of the task successors, separated by the list separator. */ WBSSUCCESSORS, /** * The ID of the task in a SharePoint list, for a project that is synchronized with a SharePoint tasks list. */ WSSID } /** * Specifies the types of views that the {@link Office.Document | Document}.getSelectedViewAsync method can recognize. * * @remarks * * The {@link Office.Document | Document}.getSelectedViewAsync method returns the ProjectViewTypes constant value and name that corresponds to the * active view. */ enum ProjectViewTypes { /** * The Gantt chart view. */ Gantt, /** * The Network Diagram view. */ NetworkDiagram, /** * The Task Diagram view. */ TaskDiagram, /** * The Task form view. */ TaskForm, /** * The Task Sheet view. */ TaskSheet, /** * The Resource Form view. */ ResourceForm, /** * The Resource Sheet view. */ ResourceSheet, /** * The Resource Graph view. */ ResourceGraph, /** * The Team Planner view. */ TeamPlanner, /** * The Task Details view. */ TaskDetails, /** * The Task Name Form view. */ TaskNameForm, /** * The Resource Names view. */ ResourceNames, /** * The Calendar view. */ Calendar, /** * The Task Usage view. */ TaskUsage, /** * The Resource Usage view. */ ResourceUsage, /** * The Timeline view. */ Timeline } /** * Specifies whether to select (highlight) the location to navigate to (when using the {@link Office.Document | Document}.goToByIdAsync method). */ enum SelectionMode { Default, /** * The location will be selected (highlighted). */ Selected, /** * The cursor is moved to the beginning of the location. */ None } /** * Provides options to determine the startup behavior of the add-in upon next start-up. */ enum StartupBehavior { /** * The add-in does not load until opened by the user. */ none = 'None', /** * Load the add-in but do not show UI. */ load = 'Load', } /** * Specifies enumerated values for the `cells` property in the cellFormat parameter of * {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | table formatting methods}. */ enum Table { /** * The entire table, including column headers, data, and totals (if any). */ All, /** * Only the data (no headers and totals). */ Data, /** * Only the header row. */ Headers } /** * Specifies whether values, such as numbers and dates, returned by the invoked method are returned with their formatting applied. * * @remarks * * For example, if the valueFormat parameter is specified as "formatted", a number formatted as currency, or a date formatted as mm/dd/yy in the * Office application will have its formatting preserved. If the valueFormat parameter is specified as "unformatted", a date will be returned in its * underlying sequential serial number form. */ enum ValueFormat { /** * Return unformatted data. */ Unformatted, /** * Return formatted data. */ Formatted } /** * Visibility mode of the add-in. */ enum VisibilityMode { /** * UI is hidden. */ hidden = 'Hidden', /** * Displayed as a task pane. */ taskpane = 'Taskpane', } // Objects /** * Manages actions and keyboard shortcuts. */ interface Actions { /** * Associates the ID or name of an action with a function. * * @param actionId The ID of an action that is defined in an extended manifest or the name of the function as specified in a **FunctionName** element in the manifest. * @param actionFunction The function that is run when the action is invoked. */ associate: (actionId: string, actionFunction: (arg?: any) => void) => void; /** * Replaces existing add-in shortcuts with custom shortcuts for the user. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} * * @param shortcuts An object of custom shortcuts with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2"}`. * To learn how to specify a valid action ID and a key combination, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts | Add custom keyboard shortcuts to your Office Add-ins}. (Note that a key combination can be `null`, in which case, the action keeps the key combination specified in the JSON file.) * @returns A promise that resolves when every custom shortcut assignment in `shortcuts` has been registered. Even if there is a conflict with existing shortcuts, the customized shortcut will be registered. * Otherwise, the promise will be rejected with error code and error message. An "InvalidOperation" error code is returned if any action ID in `shortcuts` does not exist, or if shortcut combination is invalid. */ replaceShortcuts(shortcuts: {[actionId: string]: string}): Promise; /** * Gets the existing shortcuts for the add-in. The set always includes (1) the shortcuts defined in the add-in's extended manifest for keyboard shortcuts and (2) the current user's custom shortcuts if those exist. * The shortcut can be `null` if it conflicts with the shortcut of another add-in or with the Office application. Specifically, it would be `null` if, when prompted to choose which shortcut to use, the user didn't choose the action of the current add-in. For more information about conflicts with shortcuts, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts#avoid-key-combinations-in-use-by-other-add-ins | Avoid key combinations in use by other add-ins}. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} * * @returns A promise that resolves to an object of shortcuts, with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2", "SetUnderline": null}`. */ getShortcuts(): Promise<{[actionId: string]: string|null}>; /** * Checks if a set of shortcut combinations are currently in use for the user, as defined by another add-in or by the Office application. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} * * @param shortcuts An array of shortcut combinations. For example, `["Ctrl+1", "Ctrl+2"]`. * @returns A promise that resolves to an array of objects. Each object consists of a shortcut combination and Boolean value. The value is `true` if the shortcut combination conflicts with a shortcut of another add-in or with a shortcut of the Office application; otherwise, `false`. For example, `[{shortcut:"Ctrl+1", inUse:true},{shortcut:"Ctrl+2", inUse:false}]`. */ areShortcutsInUse(shortcuts: string[]): Promise>; } /** * Provides options for configuring the binding that is created. */ interface AddBindingFromNamedItemOptions { /** * The unique ID of the binding. Autogenerated if not supplied. */ id?: string /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides options for configuring the prompt and identifying the binding that is created. */ interface AddBindingFromPromptOptions { /** * The unique ID of the binding. Autogenerated if not supplied. */ id?: string /** * Specifies the string to display in the prompt UI that tells the user what to select. Limited to 200 characters. * If no promptText argument is passed, "Please make a selection" is displayed. */ promptText?: string /** * Specifies a table of sample data displayed in the prompt UI as an example of the kinds of fields (columns) that can be bound by your add-in. * The headers provided in the TableData object specify the labels used in the field selection UI. * * **Note**: This parameter is used only in add-ins for Access. It is ignored if provided when calling the method in an add-in for Excel. * * @deprecated Microsoft Access is no longer supported. */ sampleData?: Office.TableData /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides options for identifying the binding that is created. */ interface AddBindingFromSelectionOptions { /** * The unique ID of the binding. Autogenerated if not supplied. */ id?: string /** * The names of the columns involved in the binding. */ columns?: string[] /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Represents add-in level functionality for operating or configuring various aspects of the add-in. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} */ interface Addin { /** * Sets the startup behavior for the add-in for when the document is opened next time. * @param behavior - Specifies startup behavior of the add-in. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} */ setStartupBehavior(behavior: Office.StartupBehavior): Promise; /** * Gets the current startup behavior for the add-in. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} */ getStartupBehavior(): Promise; /** * Shows the task pane associated with the add-in. * @returns A promise that is resolved when the UI is shown. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} */ showAsTaskpane(): Promise; /** * Hides the task pane. * @returns A promise that is resolved when the UI is hidden. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} */ hide(): Promise; /** * Adds a handler for the `onVisibilityModeChanged` event. * @param handler - The handler function that is called when the event is emitted. This function takes in a message for the receiving component. * @returns A promise that resolves to a function when the handler is added. Calling it removes the handler. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} */ onVisibilityModeChanged( handler: (message: VisibilityModeChangedMessage) => void, ): Promise<() => Promise>; /** * Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds. * This API is only supported in Excel. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} */ beforeDocumentCloseNotification: BeforeDocumentCloseNotification; } namespace AddinCommands { /** * The `Event` object is passed as a parameter to add-in functions invoked by function command buttons. The object allows the add-in to identify * which button was clicked and to signal the Office application that it has completed its processing. * * @remarks * * For information on support in Excel, Word, and PowerPoint, see * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets}. * * The following outlines support information for Outlook. * * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface Event { /** * Information about the control that triggered calling this function. * * @remarks * * The following outlines support information for Outlook. * * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ source:Source; /** * Indicates that the add-in has completed processing and will automatically be closed. * * This method must be called at the end of a function which was invoked by the following: * * - A function command button (that is, an add-in command defined with an **\** element, where the `xsi:type` attribute is set to `ExecuteFunction`). * * - An {@link https://learn.microsoft.com/javascript/api/manifest/event | event} defined in the * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#events | Events extension point} of an on-send add-in in Outlook. * For example, an `ItemSend` event. * * @remarks * * The following outlines support information for Outlook. * * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: The `options` parameter only applies to Outlook add-ins that implement the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins | on-send feature}. It was introduced in Mailbox 1.8. * * @param options Optional. An object that specifies the behavior of an on-send add-in in Outlook when it completes processing an `ItemSend` event. */ completed(options?: EventCompletedOptions): void; } /** * Specifies the behavior of an {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins | on-send} add-in in Outlook * when it completes processing an `ItemSend` event. * * @remarks * * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface EventCompletedOptions { /** * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} * to signal completion of an event handler, this value indicates if the handled event should continue execution or be canceled. * For example, an on-send add-in that handles the `ItemSend` event can set `allowEvent` to `false` to cancel the sending of a message. * * @remarks * * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ allowEvent: boolean; } /** * Encapsulates source data for add-in events. * * @remarks * * For information on support in Excel, Word, and PowerPoint, see * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets}. * * The following outlines support information for Outlook. * * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface Source { /** * The ID of the control that triggered calling this function. The ID comes from the manifest. * * @remarks * * The following outlines support information for Outlook. * * [Api set: Mailbox 1.3] * * See {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets} for more support information. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ id: string; } } /** * Provides an option for preserving context data of any type, unchanged, for use in a callback. */ interface AsyncContextOptions { /** * A user-defined item of any type that is returned, unchanged, in the `asyncContext` property of the `AsyncResult` object * that is passed to a callback. */ asyncContext?: any } /** * An object which encapsulates the result of an asynchronous request, including status and error information if the request failed. * * When the function you pass to the `callback` parameter of an "Async" method executes, it receives an AsyncResult object that you can access * from the `callback` function's only parameter. */ interface AsyncResult { /** * Gets the user-defined item passed to the optional `asyncContext` parameter of the invoked method in the same state as it was passed in. * This returns the user-defined item (which can be of any JavaScript type: String, Number, Boolean, Object, Array, Null, or Undefined) passed * to the optional `asyncContext` parameter of the invoked method. Returns Undefined, if you didn't pass anything to the asyncContext parameter. */ asyncContext: any; /** * Gets an object that may provide additional information if an {@link Office.Error | error} occurred. * * @remarks * * This property returns additional information if the following errors occur with these supported APIs. * * *Supported APIs* * * `Office.context.mailbox.item.getCallbackTokenAsync`, `Office.context.mailbox.item.getUserIdentityTokenAsync` * * *Supported errors* * * * * * * * * * * * * * * * *
AsyncResult.error.name AsyncResult.error.messageDescription of diagnostics object returned
HTTPRequestFailureThe request has failed. Please look at the diagnostics object for the HTTP error code.The HTTP error code in a JSON object e.g., {"HTTPCode":"401"}.
InternalServerErrorThe Exchange server returned an error. Please look at the diagnostics object for more information.The error message from the Exchange server in a JSON object e.g., {"ErrorText": "The mailbox database is temporarily unavailable"}.
*/ diagnostics: any; /** * Gets an {@link Office.Error} object that provides a description of the error, if any error occurred. */ error: Office.Error; /** * Gets the {@link Office.AsyncResultStatus} of the asynchronous operation. */ status: AsyncResultStatus; /** * Gets the payload or content of this asynchronous operation, if any. * * @remarks * * You access the AsyncResult object in the function passed as the argument to the callback parameter of an "Async" method, such as the * `getSelectedDataAsync` and `setSelectedDataAsync` methods of the {@link Office.Document | Document} object. * * **Note**: What the value property returns for a particular "Async" method varies depending on the purpose and context of that method. * To determine what is returned by the value property for an "Async" method, refer to the "Callback value" section of the method's topic. */ value: T; } /** * The Office Auth namespace, `Office.auth`, provides a method that allows the Office client application to obtain an access token to the add-in's web application. * Indirectly, this also enables the add-in to access the signed-in user's Microsoft Graph data without requiring the user to sign in a second time. */ interface Auth { /** * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. * * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox. * * **Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead. * * @deprecated Use `Office.auth.getAccessToken` instead. * * @remarks * * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} * * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. * * @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors. * @param callback - Optional. Accepts a callback function that can parse the token for the user's ID or use the token in the "on behalf of" flow to get access to Microsoft Graph. * If `AsyncResult.status` is "succeeded", then `AsyncResult.value` is the raw AAD v. 2.0-formatted access token. */ getAccessTokenAsync(options?: AuthOptions, callback?: (result: AsyncResult) => void): void; /** * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. * * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox. * * **Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead. * * @deprecated Use `Office.auth.getAccessToken` instead. * * @remarks * * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} * * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. * * @param callback - Optional. Accepts a callback function that can parse the token for the user's ID or use the token in the "on behalf of" flow to get access to Microsoft Graph. * If `AsyncResult.status` is "succeeded", then `AsyncResult.value` is the raw AAD v. 2.0-formatted access token. */ getAccessTokenAsync(callback?: (result: AsyncResult) => void): void; /** * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. * * @remarks * * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} * * **Important**: * * - In Outlook, this API isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. * * - In Outlook on the web, this API isn't supported if you use the Safari browser. This results in error 13001 ("The user is not signed into Office"). * * - In Outlook on the web, if you use the * {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync} * method to open a dialog, you must close the dialog before you can call `getAccessToken`. * * - In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000). * To retrieve an access token in older builds, use * {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) | * OfficeRuntime.auth.getAccessToken} instead. For more information, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-sso-in-event-based-activation | Enable single sign-on (SSO) in Outlook add-ins that use event-based activation}. * * @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors. * @returns Promise to the access token. */ getAccessToken(options?: AuthOptions): Promise; } /** * Provides options for the user experience when Office obtains an access token to the add-in from AAD v. 2.0 with the `getAccessToken` method. */ interface AuthOptions { /** * Allows Office to get an access token silently or through interactive consent, if one is required. Default value is `false`. * If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error. * If set to `true`, Office will show an interactive consent UI after it fails to silently get an access token. * The prompt will only allow consent to the AAD profile scope, not to any Microsoft Graph scopes. */ allowConsentPrompt?: boolean; /** * Allows Office to get an access token silently provided consent is present or show interactive UI to sign in the user. Default value is `false`. * If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error. * If set to `true`, Office will show an interactive sign-in UI after it fails to silently get an access token. */ allowSignInPrompt?: boolean; /** * Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is `false`. * * **Warning**: `forceAddAccount` has been deprecated. Use `allowSignInPrompt` instead. * * @deprecated Use `allowSignInPrompt` instead. */ forceAddAccount?: boolean; /** * Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or if the user's consent has * been revoked. Default value is `false`. * * **Warning**: `forceConsent` has been deprecated. Use `allowConsentPrompt` instead. * * @deprecated Use `allowConsentPrompt` instead. */ forceConsent?: boolean; /** * Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft Graph requires multifactor * authentication. The string value identifies the type of additional factor that is required. In most cases, you won't know at development * time whether the user's tenant requires an additional factor or what the string should be. So this option would be used in a "second try" * call of `getAccessToken` after Microsoft Graph has sent an error requesting the additional factor and containing the string that should * be used with the `authChallenge` option. */ authChallenge?: string; /** * A user-defined item of any type that is returned, unchanged, in the `asyncContext` property of the `AsyncResult` object that is passed to a callback. */ asyncContext?: any; /** * Causes Office to return a descriptive error when the add-in wants to access Microsoft Graph and the user/admin has not granted consent to Graph scopes. Default value is `false`. * Office only supports consent to Graph scopes when the add-in has been deployed by a tenant admin. * Setting this option to `true` will cause Office to inform your add-in beforehand (by returning a descriptive error) if Graph access will fail. * * @remarks * * **Note**: If you're developing an Outlook add-in that uses single sign-on (SSO), comment out the `forMSGraphAccess` option before sideloading the add-in for testing. * Otherwise, you'll receive {@link https://learn.microsoft.com/office/dev/add-ins/develop/troubleshoot-sso-in-office-add-ins#13012 | error 13012}. For additional guidance, see * {@link https://learn.microsoft.com/office/dev/add-ins/develop/authorize-to-microsoft-graph#details-on-sso-with-an-outlook-add-in | Details on SSO with an Outlook add-in}. */ forMSGraphAccess?: boolean; } /** * Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds. * The notification dialog will allow the user to confirm the request to close the document or cancel the request to close the document. * This API is only supported in Excel. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} */ interface BeforeDocumentCloseNotification { /** * Enable a modal notification dialog that appears when the user attempts to close a document. The document won't close until the user responds. * This notification dialog asks the user to confirm the request to close the document, or allows the user to cancel the request to close the document. * The `BeforeDocumentCloseNotification` API is only supported in Excel. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} */ enable(): Promise; /** * Prevents the notification dialog from appearing when the user attempts to close a document. * The `BeforeDocumentCloseNotification` API is only supported in Excel. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} */ disable(): Promise; /** * Adds an event handler that detects when the `BeforeDocumentCloseNotification` close operation is cancelled. * This event handler will be triggered if both of the following conditions are met. * * 1. The add-in calls the `enable` method on the `BeforeDocumentCloseNotification` object. * * 2. When the notification dialog is open, the end user clicks the **Don't close** button within the dialog, clicks the Close button in the upper right corner of the dialog, or presses the Esc key. * * The `BeforeDocumentCloseNotification` API is only supported in Excel. * @param handler The event handler that is called when the dialog is cancelled. * @returns A promise that resolves when the event handler is added. * * @remarks * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} */ onCloseActionCancelled( handler: () => void ): Promise<() => Promise>; } /** * Represents a binding to a section of the document. * * The Binding object exposes the functionality possessed by all bindings regardless of type. * * The Binding object is never called directly. It is the abstract parent class of the objects that represent each type of binding: * {@link Office.MatrixBinding}, {@link Office.TableBinding}, or {@link Office.TextBinding}. All three of these objects inherit the getDataAsync * and setDataAsync methods from the Binding object that enable to you interact with the data in the binding. They also inherit the ID and type * properties for querying those property values. Additionally, the MatrixBinding and TableBinding objects expose additional methods for matrix- * and table-specific features, such as counting the number of rows and columns. * * @remarks * * **Applications**: Word, Excel (deprecated, use {@link https://learn.microsoft.com/javascript/api/excel/excel.binding?view=excel-js-preview | Excel.Binding} instead) * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} */ interface Binding { /** * Get the Document object associated with the binding. */ document: Office.Document; /** * A string that uniquely identifies this binding among the bindings in the same {@link Office.Document} object. */ id: string; /** * Gets the type of the binding. */ type: Office.BindingType; /** * Adds an event handler to the object for the specified {@link Office.EventType}. Supported EventTypes are * `Office.EventType.BindingDataChanged` and `Office.EventType.BindingSelectionChanged`. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. * @param handler The event handler function to add, whose only parameter is of type {@link Office.BindingDataChangedEventArgs} or {@link Office.BindingSelectionChangedEventArgs}. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; /** * Adds an event handler to the object for the specified {@link Office.EventType}. Supported EventTypes are * `Office.EventType.BindingDataChanged` and `Office.EventType.BindingSelectionChanged`. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. * @param handler The event handler function to add, whose only parameter is of type {@link Office.BindingDataChangedEventArgs} or {@link Office.BindingSelectionChangedEventArgs}. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: Office.AsyncResult) => void): void; /** * Returns the data contained within the binding. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * When called from a MatrixBinding or TableBinding, the getDataAsync method will return a subset of the bound values if the optional startRow, * startColumn, rowCount, and columnCount parameters are specified (and they specify a contiguous and valid range). * * @param options Provides options for how to get the data in a binding. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the values in the specified binding. * If the `coercionType` parameter is specified (and the call is successful), the data is returned in the format described in the CoercionType enumeration topic. */ getDataAsync(options?: GetBindingDataOptions, callback?: (result: AsyncResult) => void): void; /** * Returns the data contained within the binding. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * When called from a MatrixBinding or TableBinding, the getDataAsync method will return a subset of the bound values if the optional startRow, * startColumn, rowCount, and columnCount parameters are specified (and they specify a contiguous and valid range). * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the values in the specified binding. * If the `coercionType` parameter is specified (and the call is successful), the data is returned in the format described in the CoercionType enumeration topic. */ getDataAsync(callback?: (result: AsyncResult) => void): void; /** * Removes the specified handler from the binding for the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} * * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. * @param options Provides options to determine which event handler or handlers are removed. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; /** * Removes the specified handler from the binding for the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} * * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, callback?: (result: AsyncResult) => void): void; /** * Writes data to the bound section of the document represented by the specified binding object. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * The value passed for data contains the data to be written in the binding. The kind of value passed determines what will be written as * described in the following table. * * * * * * * * * * * * * * * * * * *
data valueData written
A stringPlain text or anything that can be coerced to a string will be written.
An array of arrays ("matrix")Tabular data without headers will be written. For example, to write data to three rows in two columns, you can pass an array like this: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]. To write a single column of three rows, pass an array like this: [["R1C1"], ["R2C1"], ["R3C1"]].
A TableData objectA table with headers will be written.
* * Additionally, these application-specific actions apply when writing data to a binding. For Word, the specified data is written to the * binding as follows. * * * * * * * * * * * * * * * * * * * * * * *
data valueData written
A stringThe specified text is written.
An array of arrays ("matrix") or a TableData objectA Word table is written.
HTMLThe specified HTML is written. If any of the HTML you write is invalid, Word will not raise an error. Word will write as much of the HTML as it can and will omit any invalid data.
Office Open XML ("Open XML")The specified the XML is written.
* * For Excel, the specified data is written to the binding as follows. * * * * * * * * * * * * * * * * * * *
data valueData written
A stringThe specified text is inserted as the value of the first bound cell. You can also specify a valid formula to add that formula to the bound cell. For example, setting data to "=SUM(A1:A5)" will total the values in the specified range. However, when you set a formula on the bound cell, after doing so, you can't read the added formula (or any pre-existing formula) from the bound cell. If you call the Binding.getDataAsync method on the bound cell to read its data, the method can return only the data displayed in the cell (the formula's result).
An array of arrays ("matrix"), and the shape exactly matches the shape of the binding specifiedThe set of rows and columns are written.You can also specify an array of arrays that contain valid formulas to add them to the bound cells. For example, setting data to [["=SUM(A1:A5)","=AVERAGE(A1:A5)"]] will add those two formulas to a binding that contains two cells. Just as when setting a formula on a single bound cell, you can't read the added formulas (or any pre-existing formulas) from the binding with the Binding.getDataAsync method - it returns only the data displayed in the bound cells.
A TableData object, and the shape of the table matches the bound tableThe specified set of rows and/or headers are written, if no other data in surrounding cells will be overwritten. **Note**: If you specify formulas in the TableData object you pass for the *data* parameter, you might not get the results you expect due to the "calculated columns" feature of Excel, which automatically duplicates formulas within a column. To work around this when you want to write *data* that contains formulas to a bound table, try specifying the data as an array of arrays (instead of a TableData object), and specify the *coercionType* as Microsoft.Office.Matrix or "matrix".
* * For Excel on the web: * * - The total number of cells in the value passed to the data parameter can't exceed 20,000 in a single call to this method. * * - The number of formatting groups passed to the cellFormat parameter can't exceed 100. * A single formatting group consists of a set of formatting applied to a specified range of cells. * * In all other cases, an error is returned. * * The setDataAsync method will write data in a subset of a table or matrix binding if the optional startRow and startColumn parameters are * specified, and they specify a valid range. * * In the callback function passed to the setDataAsync method, you can use the properties of the AsyncResult object to return the following * information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param data The data to be set in the current selection. Possible data types by Office application: * * string: Excel on the web and Windows, and Word on the web and on Windows only * * array of arrays: Excel and Word only * * {@link Office.TableData}: Excel and Word only * * HTML: Word on the web and on Windows only * * Office Open XML: Word only * * @param options Provides options for how to set the data in a binding. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setDataAsync(data: TableData | any, options?: SetBindingDataOptions, callback?: (result: AsyncResult) => void): void; /** * Writes data to the bound section of the document represented by the specified binding object. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * The value passed for data contains the data to be written in the binding. The kind of value passed determines what will be written as * described in the following table. * * * * * * * * * * * * * * * * * * *
data valueData written
A stringPlain text or anything that can be coerced to a string will be written.
An array of arrays ("matrix")Tabular data without headers will be written. For example, to write data to three rows in two columns, you can pass an array like this: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]. To write a single column of three rows, pass an array like this: [["R1C1"], ["R2C1"], ["R3C1"]].
A TableData objectA table with headers will be written.
* * Additionally, these application-specific actions apply when writing data to a binding. For Word, the specified data is written to the * binding as follows. * * * * * * * * * * * * * * * * * * * * * * *
data valueData written
A stringThe specified text is written.
An array of arrays ("matrix") or a TableData objectA Word table is written.
HTMLThe specified HTML is written. If any of the HTML you write is invalid, Word will not raise an error. Word will write as much of the HTML as it can and will omit any invalid data.
Office Open XML ("Open XML")The specified the XML is written.
* * For Excel, the specified data is written to the binding as follows. * * * * * * * * * * * * * * * * * * *
data valueData written
A stringThe specified text is inserted as the value of the first bound cell. You can also specify a valid formula to add that formula to the bound cell. For example, setting data to "=SUM(A1:A5)" will total the values in the specified range. However, when you set a formula on the bound cell, after doing so, you can't read the added formula (or any pre-existing formula) from the bound cell. If you call the Binding.getDataAsync method on the bound cell to read its data, the method can return only the data displayed in the cell (the formula's result).
An array of arrays ("matrix"), and the shape exactly matches the shape of the binding specifiedThe set of rows and columns are written.You can also specify an array of arrays that contain valid formulas to add them to the bound cells. For example, setting data to [["=SUM(A1:A5)","=AVERAGE(A1:A5)"]] will add those two formulas to a binding that contains two cells. Just as when setting a formula on a single bound cell, you can't read the added formulas (or any pre-existing formulas) from the binding with the Binding.getDataAsync method - it returns only the data displayed in the bound cells.
A TableData object, and the shape of the table matches the bound tableThe specified set of rows and/or headers are written, if no other data in surrounding cells will be overwritten. **Note**: If you specify formulas in the TableData object you pass for the *data* parameter, you might not get the results you expect due to the "calculated columns" feature of Excel, which automatically duplicates formulas within a column. To work around this when you want to write *data* that contains formulas to a bound table, try specifying the data as an array of arrays (instead of a TableData object), and specify the *coercionType* as Microsoft.Office.Matrix or "matrix".
* * For Excel on the web: * * - The total number of cells in the value passed to the data parameter can't exceed 20,000 in a single call to this method. * * - The number of formatting groups passed to the cellFormat parameter can't exceed 100. * A single formatting group consists of a set of formatting applied to a specified range of cells. * * In all other cases, an error is returned. * * The setDataAsync method will write data in a subset of a table or matrix binding if the optional startRow and startColumn parameters are * specified, and they specify a valid range. * * In the callback function passed to the setDataAsync method, you can use the properties of the AsyncResult object to return the following * information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param data The data to be set in the current selection. Possible data types by Office application: * * string: Excel on the web and on Windows, and Word on the web and on Windows only * * array of arrays: Excel and Word only * * `TableData`: Excel and Word only * * HTML: Word on the web and on Windows only * * Office Open XML: Word only * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setDataAsync(data: TableData | any, callback?: (result: AsyncResult) => void): void; } /** * Represents the bindings the add-in has within the document. */ interface Bindings { /** * Gets an {@link Office.Document} object that represents the document associated with this set of bindings. */ document: Document; /** * Creates a binding against a named object in the document. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * For Excel, the itemName parameter can refer to a named range or a table. * * By default, adding a table in Excel assigns the name "Table1" for the first table you add, "Table2" for the second table you add, and so on. * To assign a meaningful name for a table in the Excel UI, use the Table Name property on the Table Tools | Design tab of the ribbon. * * **Note**: In Excel, when specifying a table as a named item, you must fully qualify the name to include the worksheet name in the name of * the table in this format: "Sheet1!Table1" * * For Word, the itemName parameter refers to the Title property of a Rich Text content control. (You can't bind to content controls other * than the Rich Text content control). * * By default, a content control has no Title value assigned. To assign a meaningful name in the Word UI, after inserting a Rich Text content * control from the Controls group on the Developer tab of the ribbon, use the Properties command in the Controls group to display the Content * Control Properties dialog box. Then set the Title property of the content control to the name you want to reference from your code. * * **Note**: In Word, if there are multiple Rich Text content controls with the same Title property value (name), and you try to bind to one * these content controls with this method (by specifying its name as the itemName parameter), the operation will fail. * * @param itemName Name of the bindable object in the document. For Example 'MyExpenses' table in Excel." * @param bindingType The {@link Office.BindingType} for the data. The method returns null if the selected object cannot be coerced into the specified type. * @param options Provides options for configuring the binding that is created. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object that represents the specified named item. */ addFromNamedItemAsync(itemName: string, bindingType: BindingType, options?: AddBindingFromNamedItemOptions, callback?: (result: AsyncResult) => void): void; /** * Creates a binding against a named object in the document. * * @remarks * * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings}, * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings}, * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * For Excel, the itemName parameter can refer to a named range or a table. * * By default, adding a table in Excel assigns the name "Table1" for the first table you add, "Table2" for the second table you add, and so on. * To assign a meaningful name for a table in the Excel UI, use the Table Name property on the Table Tools | Design tab of the ribbon. * * **Note**: In Excel, when specifying a table as a named item, you must fully qualify the name to include the worksheet name in the name of * the table in this format: "Sheet1!Table1" * * For Word, the itemName parameter refers to the Title property of a Rich Text content control. (You can't bind to content controls other * than the Rich Text content control). * * By default, a content control has no Title value assigned. To assign a meaningful name in the Word UI, after inserting a Rich Text content * control from the Controls group on the Developer tab of the ribbon, use the Properties command in the Controls group to display the Content * Control Properties dialog box. Then set the Title property of the content control to the name you want to reference from your code. * * **Note**: In Word, if there are multiple Rich Text content controls with the same Title property value (name), and you try to bind to one * these content controls with this method (by specifying its name as the itemName parameter), the operation will fail. * * @param itemName Name of the bindable object in the document. For Example 'MyExpenses' table in Excel." * @param bindingType The {@link Office.BindingType} for the data. The method returns null if the selected object cannot be coerced into the specified type. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object that represents the specified named item. */ addFromNamedItemAsync(itemName: string, bindingType: BindingType, callback?: (result: AsyncResult) => void): void; /** * Create a binding by prompting the user to make a selection on the document. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * Adds a binding object of the specified type to the Bindings collection, which will be identified with the supplied ID. * The method fails if the specified selection cannot be bound. * * @param bindingType Specifies the type of the binding object to create. Required. * Returns null if the selected object cannot be coerced into the specified type. * @param options Provides options for configuring the prompt and identifying the binding that is created. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object that represents the selection specified by the user. */ addFromPromptAsync(bindingType: BindingType, options?: AddBindingFromPromptOptions, callback?: (result: AsyncResult) => void): void; /** * Create a binding by prompting the user to make a selection on the document. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * Adds a binding object of the specified type to the Bindings collection, which will be identified with the supplied ID. * The method fails if the specified selection cannot be bound. * * @param bindingType Specifies the type of the binding object to create. Required. * Returns null if the selected object cannot be coerced into the specified type. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object that represents the selection specified by the user. */ addFromPromptAsync(bindingType: BindingType, callback?: (result: AsyncResult) => void): void; /** * Create a binding based on the user's current selection. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * Adds the specified type of binding object to the Bindings collection, which will be identified with the supplied id. * * Note In Excel, if you call the addFromSelectionAsync method passing in the Binding.id of an existing binding, the Binding.type of that * binding is used, and its type cannot be changed by specifying a different value for the bindingType parameter. * If you need to use an existing ID and change the bindingType, call the Bindings.releaseByIdAsync method first to release the binding, and * then call the addFromSelectionAsync method to reestablish the binding with a new type. * * @param bindingType Specifies the type of the binding object to create. Required. * Returns null if the selected object cannot be coerced into the specified type. * @param options Provides options for identifying the binding that is created. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object that represents the selection specified by the user. */ addFromSelectionAsync(bindingType: BindingType, options?: AddBindingFromSelectionOptions, callback?: (result: AsyncResult) => void): void; /** * Create a binding based on the user's current selection. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * Adds the specified type of binding object to the Bindings collection, which will be identified with the supplied id. * * Note In Excel, if you call the addFromSelectionAsync method passing in the Binding.id of an existing binding, the Binding.type of that * binding is used, and its type cannot be changed by specifying a different value for the bindingType parameter. * If you need to use an existing ID and change the bindingType, call the Bindings.releaseByIdAsync method first to release the binding, and * then call the addFromSelectionAsync method to reestablish the binding with a new type. * * @param bindingType Specifies the type of the binding object to create. Required. * Returns null if the selected object cannot be coerced into the specified type. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object that represents the selection specified by the user. */ addFromSelectionAsync(bindingType: BindingType, callback?: (result: AsyncResult) => void): void; /** * Gets all bindings that were previously created. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array that contains each binding created for the referenced Bindings object. */ getAllAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets all bindings that were previously created. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * @param callback A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array that contains each binding created for the referenced Bindings object. */ getAllAsync(callback?: (result: AsyncResult) => void): void; /** * Retrieves a binding based on its Name * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * Fails if the specified ID does not exist. * * @param id Specifies the unique name of the binding object. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object specified by the ID in the call. */ getByIdAsync(id: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Retrieves a binding based on its Name * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * Fails if the specified ID does not exist. * * @param id Specifies the unique name of the binding object. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the Binding object specified by the ID in the call. */ getByIdAsync(id: string, callback?: (result: AsyncResult) => void): void; /** * Removes the binding from the document * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * Fails if the specified ID does not exist. * * @param id Specifies the unique name to be used to identify the binding object. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ releaseByIdAsync(id: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Removes the binding from the document * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} * * Fails if the specified ID does not exist. * * @param id Specifies the unique name to be used to identify the binding object. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ releaseByIdAsync(id: string, callback?: (result: AsyncResult) => void): void; } /** * Provides information about the binding that raised the DataChanged event. */ interface BindingDataChangedEventArgs { /** * Gets an {@link Office.Binding} object that represents the binding that raised the DataChanged event. */ binding: Binding; /** * Gets an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. */ type: EventType; } /** * Provides information about the binding that raised the SelectionChanged event. */ interface BindingSelectionChangedEventArgs { /** * Gets an {@link Office.Binding} object that represents the binding that raised the SelectionChanged event. */ binding: Binding; /** * Gets the number of columns selected. If a single cell is selected returns 1. * * If the user makes a non-contiguous selection, the count for the last contiguous selection within the binding is returned. * * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property * to work correctly. */ columnCount: number; /** * Gets the number of rows selected. If a single cell is selected returns 1. * * If the user makes a non-contiguous selection, the count for the last contiguous selection within the binding is returned. * * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property * to work correctly. */ rowCount: number; /** * The zero-based index of the first column of the selection counting from the leftmost column in the binding. * * If the user makes a non-contiguous selection, the coordinates for the last contiguous selection within the binding are returned. * * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property * to work correctly. */ startColumn: number; /** * The zero-based index of the first row of the selection counting from the first row in the binding. * * If the user makes a non-contiguous selection, the coordinates for the last contiguous selection within the binding are returned. * * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property * to work correctly. */ startRow: number; /** * Gets an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. */ type: EventType; } /** * Represents the runtime environment of the add-in and provides access to key objects of the API. * The current context exists as a property of Office. It's accessed using `Office.context`. * * @remarks * * **Support details** * * For more information about Office application and server requirements, see * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. * * *Supported applications, by platform* * * * * * * * *
Office on the web Office on Windows Office on Mac Office on iPad Outlook on mobile devices
Excel Supported Supported Supported Supported Not applicable
Outlook Supported Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported Not applicable
Project Not supported Supported Supported Not supported Not applicable
Word Supported Supported Supported Supported Not applicable
*/ interface Context { /** * True, if the current platform allows the add-in to display a UI for selling or upgrading; otherwise returns False. * * @remarks * * **Applications**: Excel, Word * * `commerceAllowed` is only supported in Office on iPad. * * The iOS App Store doesn't support apps with add-ins that provide links to additional payment systems. However, Office Add-ins running in * Office on the Windows desktop or in the browser do allow such links. If you want the UI of your add-in to provide a link to an * external payment system on platforms other than iOS, you can use the commerceAllowed property to control when that link is displayed. */ commerceAllowed: boolean; /** * Gets the locale (language) specified by the user for editing the document or item. * * @remarks * * The `contentLanguage` value reflects the **Editing Language** setting specified with **File** \> **Options** \> **Language** in the Office * application. * * **Support details** * * For more information about Office application and server requirements, see * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. * * *Supported applications, by platform* * * * * * * * *
Office on the web Office on Windows Office on Mac Office on iPad Outlook on mobile devices
Excel Supported Supported Not supported Supported Not applicable
Outlook Supported Supported Supported Supported Supported
PowerPoint Supported Supported Not supported Supported Not applicable
Project Not supported Supported Not supported Not supported Not applicable
Word Supported Supported Not supported Supported Not applicable
*/ contentLanguage: string; /** * Gets information about the environment in which the add-in is running. * * @remarks * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. * For all Mailbox requirement sets, you can use the * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-1.1&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} * property to get similar information. */ diagnostics: ContextInformation; /** * Gets the locale (language) specified by the user for the UI of the Office application. * * @remarks * * The returned value is a string in the RFC 1766 Language tag format, such as en-US. * * The `displayLanguage` value reflects the current **Display Language** setting specified with **File** \> **Options** \> **Language** in the Office * application. * * When using in Outlook, the applicable modes are Compose or Read. * * **Support details** * * For more information about Office application and server requirements, see * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. * * *Supported applications, by platform* * * * * * * * *
Office on the web Office on Windows Office on Mac Office on iPad Outlook on mobile devices
Excel Supported Supported Supported Supported Not applicable
Outlook Supported Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported Not applicable
Project Not supported Supported Supported Not supported Not applicable
Word Not supported Supported Supported Supported Not applicable
*/ displayLanguage: string; /** * Gets an object that represents the document the content or task pane add-in is interacting with. */ document: Office.Document; /** * Contains the Office application in which the add-in is running. * * @remarks * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. You can also use the * `Office.context.diagnostics` property to get the application starting with requirement set 1.5. For all * Mailbox requirement sets, you can use the * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-1.1&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} * property to get similar information. */ host: HostType; /** * Gets the license information for the user's Office installation. */ license: string; /** Provides access to the Microsoft Outlook add-in object model. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Key properties**: * * - `diagnostics`: Provides diagnostic information to an Outlook add-in. * * - `item`: Provides methods and properties for accessing a message or appointment in an Outlook add-in. * * - `userProfile`: Provides information about the user in an Outlook add-in. */ mailbox: Office.Mailbox; /** * Provides access to the properties for Office theme colors. */ officeTheme: OfficeTheme; /** * Gets a partition key for local storage. Add-ins should use this partition key as part of the storage key to securely store data. The partition key is `undefined` in environments without partitioning, such as the browser controls for Windows applications. * * @remarks * * See the article {@link https://learn.microsoft.com/office/dev/add-ins/develop/persisting-add-in-state-and-settings | Persist add-in state and settings} for more information. */ partitionKey: string; /** * Provides the platform on which the add-in is running. * * @remarks * **Important**: * * - In Outlook, this property is available from Mailbox requirement set 1.5. You can also use the * `Office.context.diagnostics` property to get the platform starting with requirement set 1.5. For all * Mailbox requirement sets, you can use the * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-1.1&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} * property to get similar information. * * - In Outlook, `OfficeOnline` is returned if an add-is is running in Outlook on the web or in * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows (preview)}. */ platform: PlatformType; /** * Provides a method for determining what requirement sets are supported on the current Office application and platform. */ requirements: RequirementSetSupport; /** * Gets an object that represents the custom settings or state of a mail add-in saved to a user's mailbox. * * The `RoamingSettings` object lets you store and access data for a mail add-in that is stored in a user's mailbox, so it's available to * that add-in when it is running from any client application used to access that mailbox. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ roamingSettings: Office.RoamingSettings; /** * Gets the object to check the status of the catalog of sensitivity labels in Outlook and retrieve all available * sensitivity labels if the catalog is enabled. * * @remarks * * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ sensitivityLabelsCatalog: Office.SensitivityLabelsCatalog; /** * Specifies whether the platform and device allows touch interaction. * True if the add-in is running on a touch device, such as an iPad; false otherwise. * * @remarks * * **Applications**: Excel, PowerPoint, Word * * `touchEnabled` is only supported in Office on iPad. * * Use the touchEnabled property to determine when your add-in is running on a touch device and if necessary, adjust the kind of controls, and * size and spacing of elements in your add-in's UI to accommodate touch interactions. */ touchEnabled: boolean; /** * Provides objects and methods that you can use to create and manipulate UI components, such as dialog boxes. */ ui: UI; } /** * Provides information about the environment in which the add-in is running. * * @remarks * **Important**: In Outlook, this object is available from Mailbox requirement set 1.5. * For all Mailbox requirement sets, you can use the * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-1.1&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} * property to get similar information. */ interface ContextInformation { /** * Gets the Office application in which the add-in is running. */ host: Office.HostType; /** * Gets the platform on which the add-in is running. * * @remarks * **Important**: In Outlook, `OfficeOnline` is returned if an add-is is running in Outlook on the web or in * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows (preview)}. */ platform: Office.PlatformType; /** * Gets the version of Office on which the add-in is running. */ version: string; } /** * Represents an individual control or command and the state it should have. * * @remarks * * For code samples showing how to use a `Control` object and its properties, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} */ interface Control { /** * Identifier of the control as specified in the manifest. */ id: string; /** * Indicates whether the control should be enabled or disabled. The default is true. */ enabled?: boolean; } /** * Represents an XML node in a tree in a document. * * @remarks * * **Applications**: Word */ interface CustomXmlNode { /** * Gets the base name of the node without the namespace prefix, if one exists. */ baseName: string; /** * Retrieves the string GUID of the CustomXMLPart. */ namespaceUri: string; /** * Gets the type of the CustomXMLNode. */ nodeType: string; /** * Gets the nodes associated with the XPath expression. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xPath The XPath expression that specifies the nodes to get. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the `xPath` parameter. */ getNodesAsync(xPath: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets the nodes associated with the XPath expression. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xPath The XPath expression that specifies the nodes to get. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the `xPath` parameter. */ getNodesAsync(xPath: string, callback?: (result: AsyncResult) => void): void; /** * Gets the node value. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the value of the referenced node. */ getNodeValueAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets the node value. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the value of the referenced node. */ getNodeValueAsync(callback?: (result: AsyncResult) => void): void; /** * Gets the text of an XML node in a custom XML part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the inner text of the referenced nodes. */ getTextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets the text of an XML node in a custom XML part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the inner text of the referenced nodes. */ getTextAsync(callback?: (result: AsyncResult) => void): void; /** * Gets the node's XML. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the XML of the referenced node. */ getXmlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets the node's XML. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the XML of the referenced node. */ getXmlAsync(callback?: (result: AsyncResult) => void): void; /** * Sets the node value. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param value The value to be set on the node * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setNodeValueAsync(value: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Sets the node value. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param value The value to be set on the node * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setNodeValueAsync(value: string, callback?: (result: AsyncResult) => void): void; /** * Asynchronously sets the text of an XML node in a custom XML part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param text Required. The text value of the XML node. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setTextAsync(text: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously sets the text of an XML node in a custom XML part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param text Required. The text value of the XML node. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setTextAsync(text: string, callback?: (result: AsyncResult) => void): void; /** * Sets the node XML. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xml The XML to be set on the node * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setXmlAsync(xml: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Sets the node XML. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xml The XML to be set on the node * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setXmlAsync(xml: string, callback?: (result: AsyncResult) => void): void; } /** * Represents a single CustomXMLPart in an {@link Office.CustomXmlParts} collection. * * @remarks * * **Applications**: Word */ interface CustomXmlPart { /** * True, if the custom XML part is built in; otherwise false. */ builtIn: boolean; /** * Gets the GUID of the CustomXMLPart. */ id: string; /** * Gets the set of namespace prefix mappings ({@link Office.CustomXmlPrefixMappings}) used against the current CustomXmlPart. */ namespaceManager: CustomXmlPrefixMappings; /** * Adds an event handler to the object using the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType Specifies the type of event to add. For a CustomXmlPart object, the eventType parameter can be specified as * `Office.EventType.NodeDeleted`, `Office.EventType.NodeInserted`, and `Office.EventType.NodeReplaced`. * @param handler The event handler function to add, whose only parameter is of type {@link Office.NodeDeletedEventArgs}, * {@link Office.NodeInsertedEventArgs}, or {@link Office.NodeReplacedEventArgs} * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: (result: any) => void, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Adds an event handler to the object using the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType Specifies the type of event to add. For a CustomXmlPart object, the eventType parameter can be specified as * `Office.EventType.NodeDeleted`, `Office.EventType.NodeInserted`, and `Office.EventType.NodeReplaced`. * @param handler The event handler function to add, whose only parameter is of type {@link Office.NodeDeletedEventArgs}, * {@link Office.NodeInsertedEventArgs}, or {@link Office.NodeReplacedEventArgs} * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: (result: any) => void, callback?: (result: AsyncResult) => void): void; /** * Deletes the Custom XML Part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ deleteAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Deletes the Custom XML Part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ deleteAsync(callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xPath An XPath expression that specifies the nodes you want returned. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the xPath parameter. */ getNodesAsync(xPath: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. / * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xPath An XPath expression that specifies the nodes you want returned. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the xPath parameter. */ getNodesAsync(xPath: string, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the XML inside this custom XML part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the XML of the referenced CustomXmlPart object. */ getXmlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the XML inside this custom XML part. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the XML of the referenced CustomXmlPart object. */ getXmlAsync(callback?: (result: AsyncResult) => void): void; /** * Removes an event handler for the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param eventType Specifies the type of event to remove. For a CustomXmlPart object, the eventType parameter can be specified as * `Office.EventType.NodeDeleted`, `Office.EventType.NodeInserted`, and `Office.EventType.NodeReplaced`. * @param handler The name of the handler to remove. * @param options Provides options to determine which event handler or handlers are removed. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, handler?: (result: any) => void, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; /** * Removes an event handler for the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param eventType Specifies the type of event to remove. For a CustomXmlPart object, the eventType parameter can be specified as * `Office.EventType.NodeDeleted`, `Office.EventType.NodeInserted`, and `Office.EventType.NodeReplaced`. * @param handler The name of the handler to remove. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, handler?: (result: any) => void, callback?: (result: AsyncResult) => void): void; } /** * Represents a collection of CustomXmlPart objects. * * @remarks * * **Applications**: Word */ interface CustomXmlParts { /** * Asynchronously adds a new custom XML part to a file. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xml The XML to add to the newly created custom XML part. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the newly created CustomXmlPart object. */ addAsync(xml: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously adds a new custom XML part to a file. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param xml The XML to add to the newly created custom XML part. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the newly created CustomXmlPart object. */ addAsync(xml: string, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the specified custom XML part by its ID. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param id The GUID of the custom XML part, including opening and closing braces. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a CustomXmlPart object that represents the specified custom XML part. * If there is no custom XML part with the specified ID, the method returns null. */ getByIdAsync(id: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the specified custom XML part by its ID. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param id The GUID of the custom XML part, including opening and closing braces. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a CustomXmlPart object that represents the specified custom XML part. * If there is no custom XML part with the specified ID, the method returns null. */ getByIdAsync(id: string, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the specified custom XML parts by its namespace. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param ns The namespace URI. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array of CustomXmlPart objects that match the specified namespace. */ getByNamespaceAsync(ns: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the specified custom XML parts by its namespace. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * @param ns The namespace URI. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array of CustomXmlPart objects that match the specified namespace. */ getByNamespaceAsync(ns: string, callback?: (result: AsyncResult) => void): void; } /** * Represents a collection of CustomXmlPart objects. * * @remarks * * **Applications**: Word */ interface CustomXmlPrefixMappings { /** * Asynchronously adds a prefix to namespace mapping to use when querying an item. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * If no namespace is assigned to the requested prefix, the method returns an empty string (""). * * @param prefix Specifies the prefix to add to the prefix mapping list. Required. * @param ns Specifies the namespace URI to assign to the newly added prefix. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addNamespaceAsync(prefix: string, ns: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously adds a prefix to namespace mapping to use when querying an item. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * If no namespace is assigned to the requested prefix, the method returns an empty string (""). * * @param prefix Specifies the prefix to add to the prefix mapping list. Required. * @param ns Specifies the namespace URI to assign to the newly added prefix. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addNamespaceAsync(prefix: string, ns: string, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the namespace mapped to the specified prefix. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * If the prefix already exists in the namespace manager, this method will overwrite the mapping of that prefix except when the prefix is one * added or used by the data store internally, in which case it will return an error. * * @param prefix TSpecifies the prefix to get the namespace for. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the namespace mapped to the specified prefix. */ getNamespaceAsync(prefix: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the namespace mapped to the specified prefix. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * If the prefix already exists in the namespace manager, this method will overwrite the mapping of that prefix except when the prefix is one * added or used by the data store internally, in which case it will return an error. * * @param prefix TSpecifies the prefix to get the namespace for. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the namespace mapped to the specified prefix. */ getNamespaceAsync(prefix: string, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the prefix for the specified namespace. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * If no prefix is assigned to the requested namespace, the method returns an empty string (""). If there are multiple prefixes specified in * the namespace manager, the method returns the first prefix that matches the supplied namespace. * * @param ns Specifies the namespace to get the prefix for. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the prefix of the specified namespace. */ getPrefixAsync(ns: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the prefix for the specified namespace. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} * * If no prefix is assigned to the requested namespace, the method returns an empty string (""). If there are multiple prefixes specified in * the namespace manager, the method returns the first prefix that matches the supplied namespace. * * @param ns Specifies the namespace to get the prefix for. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is a string that contains the prefix of the specified namespace. */ getPrefixAsync(ns: string, callback?: (result: AsyncResult) => void): void; } /** * The object that is returned when `UI.displayDialogAsync` is called. It exposes methods for registering event handlers and closing the dialog. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} */ interface Dialog { /** * Called from a parent page to close the corresponding dialog box. * * This method is asynchronous. It does not take a callback parameter and it does not return a Promise object, so it cannot be awaited with either the `await` keyword or the `then` function. See this best practice for more information: {@link https://learn.microsoft.com/office/dev/add-ins/develop/dialog-best-practices#opening-another-dialog-immediately-after-closing-one | Opening another dialog immediately after closing one} */ close(): void; /** * Registers an event handler. The two supported events are: * * - DialogMessageReceived. Triggered when the dialog box sends a message to its parent. * * - DialogEventReceived. Triggered when the dialog box has been closed or otherwise unloaded. * * @param eventType Must be either DialogMessageReceived or DialogEventReceived. * @param handler A function which accepts either an object with a `message` and `origin` property, if `eventType` is `DialogMessageReceived`, or an object with an `error` property, if `eventType` is `DialogEventReceived`. Note that the `origin` property is `undefined` on clients that don’t support {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1}. */ addEventHandler(eventType: Office.EventType, handler: (args: {message: string, origin: string | undefined} | {error: number}) => void): void; /** * Delivers a message from the host page, such as a task pane or a UI-less function file, to a dialog that was opened from the page. * * @remarks * * **Applications**: Excel, Outlook (Minimum requirement set: Mailbox 1.9), PowerPoint, Word * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.9} * * - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required. * * @param message Accepts a message from the host page to deliver to the dialog. Anything that can be serialized to a string, including JSON and XML, can be sent. * @param messageOptions Optional. Provides options for how to send the message. */ messageChild(message: string, messageOptions?: DialogMessageOptions): void; /** * FOR INTERNAL USE ONLY. DO NOT CALL IN YOUR CODE. */ sendMessage(name: string): void; } /** * Provides options for how to send messages, in either direction, between a dialog and its parent. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} */ interface DialogMessageOptions { /** * Specifies the intended recipient domain for a message sent, in either direction, between a dialog and its parent. For example, `https://resources.contoso.com`. */ targetOrigin: string; } /** * Provides options for how a dialog is displayed. */ interface DialogOptions { /** * Defines the height of the dialog as a percentage of the current display. Defaults to 80%. 250px minimum. */ height?: number, /** * Defines the width of the dialog as a percentage of the current display. Defaults to 80%. 150px minimum. */ width?: number, /** * Determines whether the dialog box should be displayed within an IFrame. This setting is only applicable in Office on the web, and is * ignored by other platforms. If false (default), the dialog will be displayed as a new browser window (pop-up). Recommended for * authentication pages that cannot be displayed in an IFrame. If true, the dialog will be displayed as a floating overlay with an IFrame. * This is best for user experience and performance. */ displayInIframe?: boolean /** * Determines if the pop-up blocker dialog will be shown to the user. Defaults to true. * * `true` - The framework displays a pop-up to trigger the navigation and avoid the browser's pop-up blocker. * `false` - The dialog will not be shown and the developer must handle pop-ups (by providing a user interface artifact to trigger the navigation). */ promptBeforeOpen?: boolean; /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides information about the message from the parent page that raised the `DialogParentMessageReceived` event. * * To add an event handler for the `DialogParentMessageReceived` event, use the `addHandlerAsync` method of the * {@link Office.UI} object. * */ interface DialogParentMessageReceivedEventArgs { /** * Gets the content of the message sent from the parent page, which can be any string or stringified data. */ message: string; /** * Gets the domain of the parent page that called `Dialog.messageChild`. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1}. * The property is `undefined` on clients that do not support this requirement set. */ origin: string | undefined; /** * Gets an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. */ type: EventType; } /** * An abstract class that represents the document the add-in is interacting with. * * @remarks * * **Applications**: Excel, PowerPoint, Project, Word */ interface Document { /** * Gets an object that provides access to the bindings defined in the document. * * @remarks * * You don't instantiate the Document object directly in your script. To call members of the Document object to interact with the current * document or worksheet, use `Office.context.document` in your script. */ bindings: Bindings; /** * Gets an object that represents the custom XML parts in the document. */ customXmlParts: CustomXmlParts; /** * Gets the mode the document is in. */ mode: DocumentMode; /** * Gets an object that represents the saved custom settings of the content or task pane add-in for the current document. */ settings: Settings; /** * Gets the URL of the document that the Office application currently has open. Returns null if the URL is unavailable. */ url: string; /** * Adds an event handler for a Document object event. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType For a Document object event, the eventType parameter can be specified as `Office.EventType.Document.SelectionChanged` or * `Office.EventType.Document.ActiveViewChanged`, or the corresponding text value of this enumeration. * @param handler The event handler function to add, whose only parameter is of type {@link Office.DocumentSelectionChangedEventArgs}. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Adds an event handler for a Document object event. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType For a Document object event, the eventType parameter can be specified as `Office.EventType.Document.SelectionChanged` or * `Office.EventType.Document.ActiveViewChanged`, or the corresponding text value of this enumeration. * @param handler The event handler function to add, whose only parameter is of type {@link Office.DocumentSelectionChangedEventArgs}. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; /** * Returns the state of the current view of the presentation (edit or read). * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#activeview | ActiveView} * * Can trigger an event when the view changes. * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the state of the presentation's current view. * The value returned can be either "edit" or "read". "edit" corresponds to any of the views in which you can edit slides: * Normal, Slide Sorter, or Outline View. "read" corresponds to either Slide Show or Reading View. */ getActiveViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<"edit" | "read">) => void): void; /** * Returns the state of the current view of the presentation (edit or read). * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#activeview | ActiveView} * * Can trigger an event when the view changes. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the state of the presentation's current view. * The value returned can be either "edit" or "read". "edit" corresponds to any of the views in which you can edit slides: * Normal, Slide Sorter, or Outline View. "read" corresponds to either Slide Show or Reading View. */ getActiveViewAsync(callback?: (result: AsyncResult<"edit" | "read">) => void): void; /** * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins on iPad, file slice is supported up to 65536 (64 KB). * Note that specifying file slice size of above permitted limit will result in an "Internal Error" failure. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#compressedfile | CompressedFile} (when using `Office.FileType.Compressed`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textfile | TextFile} (when using `Office.FileType.Text`) * * For add-ins running in Office applications other than Office on iPad, the `getFileAsync` method supports getting files in slices of up * to 4194304 bytes (4 MB). For add-ins running in Office apps on iPad, the `getFileAsync` method supports getting files in slices of up to * 65536 (64 KB). * * The `fileType` parameter can be specified by using the {@link Office.FileType} enumeration or text values. But the possible values vary with * the application. * * *Supported FileTypes, by platform* * * * * * *
Office on the web Office on Windows Office on Mac Office on iPad
Excel Compressed, Pdf Compressed, Pdf, TextCompressed, Pdf, Text Not supported
PowerPoint Compressed, Pdf Compressed, Pdf Compressed, Pdf Compressed, Pdf
Word Compressed, Pdf, TextCompressed, Pdf, TextCompressed, Pdf, TextCompressed, Pdf
* * @param fileType The format in which the file will be returned * @param options Provides options for setting the size of slices that the document will be divided into. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the File object. */ getFileAsync(fileType: FileType, options?: GetFileOptions, callback?: (result: AsyncResult) => void): void; /** * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins on iPad, file slice is supported up to 65536 (64 KB). * Note that specifying file slice size of above permitted limit will result in an "Internal Error" failure. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#compressedfile | CompressedFile} (when using `Office.FileType.Compressed`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textfile | TextFile} (when using `Office.FileType.Text`) * * For add-ins running in Office applications other than Office on iPad, the `getFileAsync` method supports getting files in slices of up * to 4194304 bytes (4 MB). For add-ins running in Office apps on iPad, the `getFileAsync` method supports getting files in slices of up to * 65536 (64 KB). * * The `fileType` parameter can be specified by using the {@link Office.FileType} enumeration or text values. But the possible values vary with * the application. * * *Supported FileTypes, by platform* * * * * * *
Office on the web Office on Windows Office on Mac Office on iPad
Excel Compressed, Pdf Compressed, Pdf, TextCompressed, Pdf, Text Not supported
PowerPoint Compressed, Pdf Compressed, Pdf Compressed, Pdf Compressed, Pdf
Word Compressed, Pdf, TextCompressed, Pdf, TextCompressed, Pdf, TextCompressed, Pdf
* * @param fileType The format in which the file will be returned * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the File object. */ getFileAsync(fileType: FileType, callback?: (result: AsyncResult) => void): void; /** * Gets file properties of the current document. * * @remarks * * **Requirement sets**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * You get the file's URL with the url property `asyncResult.value.url`. * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the file's properties (with the URL found at `asyncResult.value.url`). */ getFilePropertiesAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets file properties of the current document. * * @remarks * * **Requirement sets**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * You get the file's URL with the url property `asyncResult.value.url`. * * @param callback A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the file's properties (with the URL found at `asyncResult.value.url`). */ getFilePropertiesAsync(callback?: (result: AsyncResult) => void): void; /** * Reads the data contained in the current selection in the document. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return * the following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
CoercionTypeSupported applications
Office.CoercionType.Html
  • Word
Office.CoercionType.Matrix (array of arrays)
  • Excel
  • Word
Office.CoercionType.Ooxml (Office Open XML)
  • Word
Office.CoercionType.SlideRange
  • PowerPoint
Office.CoercionType.Table (TableData object)
  • Excel
  • Word
Office.CoercionType.Text (string)
  • Excel
  • PowerPoint
  • Project
  • Word
Office.CoercionType.XmlSvg
  • Excel on Windows and on Mac
* * @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types. * * @param options Provides options for customizing what data is returned and how it is formatted. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the data in the current selection. * This is returned in the data structure or format you specified with the coercionType parameter. * (See Remarks for more information about data coercion.) */ getSelectedDataAsync(coercionType: Office.CoercionType, options?: GetSelectedDataOptions, callback?: (result: AsyncResult) => void): void; /** * Reads the data contained in the current selection in the document. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return * the following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
CoercionTypeSupported applications
Office.CoercionType.Html
  • Word
Office.CoercionType.Matrix (array of arrays)
  • Excel
  • Word
Office.CoercionType.Ooxml (Office Open XML)
  • Word
Office.CoercionType.SlideRange
  • PowerPoint
Office.CoercionType.Table (TableData object)
  • Excel
  • Word
Office.CoercionType.Text (string)
  • Excel
  • PowerPoint
  • Project
  • Word
Office.CoercionType.XmlSvg
  • Excel on Windows and on Mac
* * @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the data in the current selection. * This is returned in the data structure or format you specified with the coercionType parameter. * (See Remarks for more information about data coercion.) */ getSelectedDataAsync(coercionType: Office.CoercionType, callback?: (result: AsyncResult) => void): void; /** * Goes to the specified object or location in the document. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * PowerPoint doesn't support the goToByIdAsync method in Master Views. * * The behavior caused by the selectionMode option varies by Office application: * * In Excel: `Office.SelectionMode.Selected` selects all content in the binding, or named item. Office.SelectionMode.None for text bindings, * selects the cell; for matrix bindings, table bindings, and named items, selects the first data cell (not first cell in header row for tables). * * In PowerPoint: `Office.SelectionMode.Selected` selects the slide title or first textbox on the slide. * `Office.SelectionMode.None` doesn't select anything. * * In Word: `Office.SelectionMode.Selected` selects all content in the binding. Office.SelectionMode.None for text bindings, moves the cursor * to the beginning of the text; for matrix bindings and table bindings, selects the first data cell (not first cell in header row for tables). * * @param id The identifier of the object or location to go to. * @param goToType The type of the location to go to. * @param options Provides options for whether to select the location that is navigated to. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the current view. */ goToByIdAsync(id: string | number, goToType: GoToType, options?: GoToByIdOptions, callback?: (result: AsyncResult) => void): void; /** * Goes to the specified object or location in the document. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * PowerPoint doesn't support the goToByIdAsync method in Master Views. * * The behavior caused by the selectionMode option varies by Office application: * * In Excel: `Office.SelectionMode.Selected` selects all content in the binding, or named item. Office.SelectionMode.None for text bindings, * selects the cell; for matrix bindings, table bindings, and named items, selects the first data cell (not first cell in header row for tables). * * In PowerPoint: `Office.SelectionMode.Selected` selects the slide title or first textbox on the slide. * `Office.SelectionMode.None` doesn't select anything. * * In Word: `Office.SelectionMode.Selected` selects all content in the binding. Office.SelectionMode.None for text bindings, moves the cursor * to the beginning of the text; for matrix bindings and table bindings, selects the first data cell (not first cell in header row for tables). * * @param id The identifier of the object or location to go to. * @param goToType The type of the location to go to. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the current view. */ goToByIdAsync(id: string | number, goToType: GoToType, callback?: (result: AsyncResult) => void): void; /** * Removes an event handler for the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} * * @param eventType The event type. For document can be 'Document.SelectionChanged' or 'Document.ActiveViewChanged'. * @param options Provides options to determine which event handler or handlers are removed. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; /** * Removes an event handler for the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} * * @param eventType The event type. For document can be 'Document.SelectionChanged' or 'Document.ActiveViewChanged'. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, callback?: (result: AsyncResult) => void): void; /** * Writes the specified data into the current selection. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion 1.1} (when using `Office.CoercionType.Image`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) * * **Application-specific behaviors** * * The following application-specific actions apply when writing data to a selection. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ApplicationConditionBehavior
WordIf there's no selection and the insertion point is at a valid location, the specified data is inserted at the insertion pointIf data is a string, the specified text is inserted.
If data is an array of arrays ("matrix") or a TableData object, a new Word table is inserted.
If data is HTML, the specified HTML is inserted. (**Important**: If any of the HTML you insert is invalid, Word won't raise an error. Word will insert as much of the HTML as it can and omits any invalid data).
If data is Office Open XML, the specified XML is inserted.
If data is a Base64-encoded image stream, the specified image is inserted.
If there's a selectionIt will be replaced with the specified data following the same rules as above.
Insert imagesInserted images are placed inline. The imageLeft and imageTop parameters are ignored. The image aspect ratio is always locked. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
ExcelIf a single cell is selectedIf data is a string, the specified text is inserted as the value of the current cell.
If data is an array of arrays ("matrix"), the specified set of rows and columns are inserted, if no other data in surrounding cells will be overwritten.
If data is a TableData object, a new Excel table with the specified set of rows and headers is inserted, if no other data in surrounding cells will be overwritten.
If multiple cells are selectedIf the shape doesn't match the shape of data, an error is returned.
If the shape of the selection exactly matches the shape of data, the values of the selected cells are updated based on the values in data.
Insert imagesInserted images are floating. The position imageLeft and imageTop parameters are relative to currently selected cells. Negative imageLeft and imageTop values are allowed and possibly readjusted by Excel to position the image inside a worksheet. Image aspect ratio is locked unless both imageWidth and imageHeight parameters are provided. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
All other casesAn error is returned.
Excel on the webIn addition to the behaviors described for Excel above, these limits apply when writing data in Excel on the webThe total number of cells you can write to a worksheet with the data parameter can't exceed 20,000 in a single call to this method.
The number of formatting groups passed to the cellFormat parameter can't exceed 100. A single formatting group consists of a set of formatting applied to a specified range of cells.
PowerPointInsert imageInserted images are floating. The position imageLeft and imageTop parameters are optional but if provided, both should be present. If a single value is provided, it will be ignored. Negative imageLeft and imageTop values are allowed and can position an image outside of a slide. If no optional parameter is given and slide has a placeholder, the image will replace the placeholder in the slide. Image aspect ratio will be locked unless both imageWidth and imageHeight parameters are provided. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
* * **Applications** * * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
CoercionTypeSupported applications
Office.CoercionType.Html
  • Word
Office.CoercionType.Matrix (array of arrays)
  • Excel
  • Word
Office.CoercionType.Ooxml (Office Open XML)
  • Word
Office.CoercionType.SlideRange
  • PowerPoint on the web and on Windows
Office.CoercionType.Table (TableData object)
  • Excel
  • Word
Office.CoercionType.Text (string)
  • Excel
  • PowerPoint
  • Project
  • Word
Office.CoercionType.XmlSvg
  • Excel on Windows and on Mac
  • PowerPoint on the web, on Windows, and on Mac
  • Word on Windows and on Mac
* * @param data The data to be set. Either a string or {@link Office.CoercionType} value, 2D array or TableData object. * * If the value passed for `data` is: * * - A string: Plain text or anything that can be coerced to a string will be inserted. * In Excel, you can also specify data as a valid formula to add that formula to the selected cell. For example, setting data to "=SUM(A1:A5)" * will total the values in the specified range. However, when you set a formula on the bound cell, after doing so, you can't read the added * formula (or any pre-existing formula) from the bound cell. If you call the Document.getSelectedDataAsync method on the selected cell to * read its data, the method can return only the data displayed in the cell (the formula's result). * * - An array of arrays ("matrix"): Tabular data without headers will be inserted. For example, to write data to three rows in two columns, * you can pass an array like this: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]. To write a single column of three rows, pass an * array like this: [["R1C1"], ["R2C1"], ["R3C1"]] * * In Excel, you can also specify data as an array of arrays that contains valid formulas to add them to the selected cells. For example if no * other data will be overwritten, setting data to [["=SUM(A1:A5)","=AVERAGE(A1:A5)"]] will add those two formulas to the selection. Just as * when setting a formula on a single cell as "text", you can't read the added formulas (or any pre-existing formulas) after they have been * set - you can only read the formulas' results. * * - A TableData object: A table with headers will be inserted. * In Excel, if you specify formulas in the TableData object you pass for the data parameter, you might not get the results you expect due to * the "calculated columns" feature of Excel, which automatically duplicates formulas within a column. To work around this when you want to * write `data` that contains formulas to a selected table, try specifying the data as an array of arrays (instead of a TableData object), and * specify the coercionType as Microsoft.Office.Matrix or "matrix". However, this technique will block the "calculated columns" feature only * when one of the following conditions is met: (1) you are writing to all the cells of the column, or (2) there are already at least two * different formulas in the column. * * @param options Provides options for how to insert data to the selection. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The AsyncResult.value property always returns `undefined` because there is no object or data to retrieve. */ setSelectedDataAsync(data: string | TableData | any[][], options?: SetSelectedDataOptions, callback?: (result: AsyncResult) => void): void; /** * Writes the specified data into the current selection. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion} (when using `Office.CoercionType.Image`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) * * **Application-specific behaviors** * * The following application-specific actions apply when writing data to a selection. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ApplicationConditionBehavior
WordIf there's no selection and the insertion point is at a valid location, the specified data is inserted at the insertion pointIf data is a string, the specified text is inserted.
If data is an array of arrays ("matrix") or a TableData object, a new Word table is inserted.
If data is HTML, the specified HTML is inserted. (**Important**: If any of the HTML you insert is invalid, Word won't raise an error. Word will insert as much of the HTML as it can and omits any invalid data).
If data is Office Open XML, the specified XML is inserted.
If data is a Base64-encoded image stream, the specified image is inserted.
If there's a selectionIt will be replaced with the specified data following the same rules as above.
Insert imagesInserted images are placed inline. The imageLeft and imageTop parameters are ignored. The image aspect ratio is always locked. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
ExcelIf a single cell is selectedIf data is a string, the specified text is inserted as the value of the current cell.
If data is an array of arrays ("matrix"), the specified set of rows and columns are inserted, if no other data in surrounding cells will be overwritten.
If data is a TableData object, a new Excel table with the specified set of rows and headers is inserted, if no other data in surrounding cells will be overwritten.
If multiple cells are selectedIf the shape doesn't match the shape of data, an error is returned.
If the shape of the selection exactly matches the shape of data, the values of the selected cells are updated based on the values in data.
Insert imagesInserted images are floating. The position imageLeft and imageTop parameters are relative to currently selected cells. Negative imageLeft and imageTop values are allowed and possibly readjusted by Excel to position the image inside a worksheet. Image aspect ratio is locked unless both imageWidth and imageHeight parameters are provided. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
All other casesAn error is returned.
Excel on the webIn addition to the behaviors described for Excel above, these limits apply when writing data in Excel on the webThe total number of cells you can write to a worksheet with the data parameter can't exceed 20,000 in a single call to this method.
The number of formatting groups passed to the cellFormat parameter can't exceed 100. A single formatting group consists of a set of formatting applied to a specified range of cells.
PowerPointInsert imageInserted images are floating. The position imageLeft and imageTop parameters are optional but if provided, both should be present. If a single value is provided, it will be ignored. Negative imageLeft and imageTop values are allowed and can position an image outside of a slide. If no optional parameter is given and slide has a placeholder, the image will replace the placeholder in the slide. Image aspect ratio will be locked unless both imageWidth and imageHeight parameters are provided. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
* * **Applications** * * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
CoercionTypeSupported applications
Office.CoercionType.Html
  • Word
Office.CoercionType.Matrix (array of arrays)
  • Excel
  • Word
Office.CoercionType.Ooxml (Office Open XML)
  • Word
Office.CoercionType.SlideRange
  • PowerPoint on the web and on Windows
Office.CoercionType.Table (TableData object)
  • Excel
  • Word
Office.CoercionType.Text (string)
  • Excel
  • PowerPoint
  • Project
  • Word
Office.CoercionType.XmlSvg
  • Excel on Windows and on Mac
  • PowerPoint on the web, on Windows, and on Mac
  • Word on Windows and on Mac
* * @param data The data to be set. Either a string or {@link Office.CoercionType} value, 2D array or TableData object. * * If the value passed for `data` is: * * - A string: Plain text or anything that can be coerced to a string will be inserted. * In Excel, you can also specify data as a valid formula to add that formula to the selected cell. For example, setting data to "=SUM(A1:A5)" * will total the values in the specified range. However, when you set a formula on the bound cell, after doing so, you can't read the added * formula (or any pre-existing formula) from the bound cell. If you call the Document.getSelectedDataAsync method on the selected cell to * read its data, the method can return only the data displayed in the cell (the formula's result). * * - An array of arrays ("matrix"): Tabular data without headers will be inserted. For example, to write data to three rows in two columns, * you can pass an array like this: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]. To write a single column of three rows, pass an * array like this: [["R1C1"], ["R2C1"], ["R3C1"]] * * In Excel, you can also specify data as an array of arrays that contains valid formulas to add them to the selected cells. For example if no * other data will be overwritten, setting data to [["=SUM(A1:A5)","=AVERAGE(A1:A5)"]] will add those two formulas to the selection. Just as * when setting a formula on a single cell as "text", you can't read the added formulas (or any pre-existing formulas) after they have been * set - you can only read the formulas' results. * * - A TableData object: A table with headers will be inserted. * In Excel, if you specify formulas in the TableData object you pass for the data parameter, you might not get the results you expect due to * the "calculated columns" feature of Excel, which automatically duplicates formulas within a column. To work around this when you want to * write `data` that contains formulas to a selected table, try specifying the data as an array of arrays (instead of a TableData object), and * specify the coercionType as Microsoft.Office.Matrix or "matrix". However, this technique will block the "calculated columns" feature only * when one of the following conditions is met: (1) you are writing to all the cells of the column, or (2) there are already at least two * different formulas in the column. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The AsyncResult.value property always returns `undefined` because there is no object or data to retrieve. */ setSelectedDataAsync(data: string | TableData | any[][], callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get Project field (e.g., ProjectWebAccessURL). * @param fieldId Project level fields. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the `fieldValue` property, which represents the value of the specified field. */ getProjectFieldAsync(fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get Project field (e.g., ProjectWebAccessURL). * @param fieldId Project level fields. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the `fieldValue` property, which represents the value of the specified field. * */ getProjectFieldAsync(fieldId: number, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get resource field for provided resource ID. (e.g., ResourceName) * @param resourceId Either a string or value of the Resource ID. * @param fieldId Resource Fields. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getResourceFieldAsync(resourceId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get resource field for provided resource ID. (e.g., ResourceName) * @param resourceId Either a string or value of the resource ID. * @param fieldId Resource Fields. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getResourceFieldAsync(resourceId: string, fieldId: number, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected Resource's ID. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getSelectedResourceAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected Resource's ID. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getSelectedResourceAsync(callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected Task's ID. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getSelectedTaskAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected Task's ID. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getSelectedTaskAsync(callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected View Type (e.g., Gantt) and View Name. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the following properties: * `viewName` - The name of the view, as a ProjectViewTypes constant. * `viewType` - The type of view, as the integer value of a ProjectViewTypes constant. * */ getSelectedViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected View Type (e.g., Gantt) and View Name. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the following properties: * `viewName` - The name of the view, as a ProjectViewTypes constant. * `viewType` - The type of view, as the integer value of a ProjectViewTypes constant. * */ getSelectedViewAsync(callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the Task Name, WSS Task ID, and ResourceNames for given taskId. * @param taskId Either a string or value of the Task ID. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the following properties: * `taskName` - The name of the task. * `wssTaskId` - The ID of the task in the synchronized SharePoint task list. If the project isn't synchronized with a SharePoint task list, the value is 0. * `resourceNames` - The comma-separated list of the names of resources that are assigned to the task. * */ getTaskAsync(taskId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the Task Name, WSS Task ID, and ResourceNames for given taskId. * @param taskId Either a string or value of the Task ID. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the following properties: * `taskName` - The name of the task. * `wssTaskId` - The ID of the task in the synchronized SharePoint task list. If the project is not synchronized with a SharePoint task list, the value is 0. * `resourceNames` - The comma-separated list of the names of resources that are assigned to the task. * */ getTaskAsync(taskId: string, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get task field for provided task ID. (e.g., StartDate). * @param taskId Either a string or value of the Task ID. * @param fieldId Task Fields. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the `fieldValue` property, which represents the value of the specified field. * */ getTaskFieldAsync(taskId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get task field for provided task ID. (e.g., StartDate). * @param taskId Either a string or value of the Task ID. * @param fieldId Task Fields. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the `fieldValue` property, which represents the value of the specified field. * */ getTaskFieldAsync(taskId: string, fieldId: number, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the WSS URL and list name for the Tasks List, the MPP is synced too. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the following properties: * `listName` - the name of the synchronized SharePoint task list. * `serverUrl` - the URL of the synchronized SharePoint task list. * */ getWSSUrlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the WSS Url and list name for the Tasks List, the MPP is synced too. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result contains the following properties: * `listName` - the name of the synchronized SharePoint task list. * `serverUrl` - the URL of the synchronized SharePoint task list. * */ getWSSUrlAsync(callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the maximum index of the collection of resources in the current project. * * **Important**: This API works only in Project on Windows desktop. * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the highest index number in the current project's resource collection. * */ getMaxResourceIndexAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the maximum index of the collection of resources in the current project. * * **Important**: This API works only in Project on Windows desktop. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the highest index number in the current project's resource collection. * */ getMaxResourceIndexAsync(callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the maximum index of the collection of tasks in the current project. * * **Important**: This API works only in Project on Windows desktop. * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the highest index number in the current project's task collection. * */ getMaxTaskIndexAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the maximum index of the collection of tasks in the current project. * * **Important**: This API works only in Project on Windows desktop. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the highest index number in the current project's task collection. * */ getMaxTaskIndexAsync(callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the GUID of the resource that has the specified index in the resource collection. * * **Important**: This API works only in Project on Windows desktop. * * @param resourceIndex The index of the resource in the collection of resources for the project. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getResourceByIndexAsync(resourceIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the GUID of the resource that has the specified index in the resource collection. * * **Important**: This API works only in Project on Windows desktop. * * @param resourceIndex The index of the resource in the collection of resources for the project. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the resource as a string. * */ getResourceByIndexAsync(resourceIndex: number, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the GUID of the task that has the specified index in the task collection. * * **Important**: This API works only in Project on Windows desktop. * * @param taskIndex The index of the task in the collection of tasks for the project. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the task as a string. * */ getTaskByIndexAsync(taskIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the GUID of the task that has the specified index in the task collection. * * **Important**: This API works only in Project on Windows desktop. * * @param taskIndex The index of the task in the collection of tasks for the project. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the GUID of the task as a string. * */ getTaskByIndexAsync(taskIndex: number, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Set resource field for specified resource ID. * * **Important**: This API works only in Project on Windows desktop. * * @param resourceId Either a string or value of the Resource ID. * @param fieldId Resource Fields. * @param fieldValue Value of the target field. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * */ setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Set resource field for specified resource ID. * * **Important**: This API works only in Project on Windows desktop. * * @param resourceId Either a string or value of the Resource Id. * @param fieldId Resource Fields. * @param fieldValue Value of the target field. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * */ setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Set task field for specified task ID. * * **Important**: This API works only in Project on Windows desktop. * * @param taskId Either a string or value of the Task ID. * @param fieldId Task Fields. * @param fieldValue Value of the target field. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * */ setTaskFieldAsync(taskId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Set task field for specified task ID. * * **Important**: This API works only in Project on Windows desktop. * * @param taskId Either a string or value of the Task ID. * @param fieldId Task Fields. * @param fieldValue Value of the target field. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * */ setTaskFieldAsync(taskId: string, fieldId: number, fieldValue: string | number | boolean | object, callback?: (result: AsyncResult) => void): void; } /** * Provides information about the document that raised the SelectionChanged event. */ interface DocumentSelectionChangedEventArgs { /** * Gets an {@link Office.Document} object that represents the document that raised the SelectionChanged event. */ document: Document; /** * Get an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. */ type: EventType; } /** * Provides specific information about an error that occurred during an asynchronous data operation. * * @remarks * * The Error object is accessed from the AsyncResult object that is returned in the function passed as the callback argument of an asynchronous * data operation, such as the `setSelectedDataAsync` method of the Document object. */ interface Error { /** * Gets the numeric code of the error. For a list of error codes, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/javascript-api-for-office-error-codes | JavaScript API for Office error codes}. */ code: number; /** * Gets a detailed description of the error. */ message: string; /** * Gets the name of the error. */ name: string; } /** * Represents the document file associated with an Office Add-in. * * @remarks * * Access the File object with the AsyncResult.value property in the callback function passed to the Document.getFileAsync method. * */ interface File { /** * Gets the document file size in bytes. */ size: number; /** * Gets the number of slices into which the file is divided. */ sliceCount: number; /** * Closes the document file. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} * * No more than two documents are allowed to be in memory; otherwise the Document.getFileAsync operation will fail. Use the File.closeAsync * method to close the file when you are finished working with it. * * In the callback function passed to the closeAsync method, you can use the properties of the AsyncResult object to return the following * information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ closeAsync(callback?: (result: AsyncResult) => void): void; /** * Returns the specified slice. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} * * In the callback function passed to the getSliceAsync method, you can use the properties of the AsyncResult object to return the following * information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAccess the Slice object.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param sliceIndex Specifies the zero-based index of the slice to be retrieved. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is the {@link Office.Slice} object. */ getSliceAsync(sliceIndex: number, callback?: (result: AsyncResult) => void): void; } interface FileProperties { /** * File's URL */ url: string } /** * Provides options for how to get the data in a binding. * * @remarks * * If the rows option is used, the value must be "thisRow". */ interface GetBindingDataOptions { /** * The expected shape of the selection. Use {@link Office.CoercionType} or text value. Default: The original, uncoerced type of the binding. */ coercionType?: Office.CoercionType | string /** * Specifies whether values, such as numbers and dates, are returned with their formatting applied. Use Office.ValueFormat or text value. * Default: Unformatted data. */ valueFormat?: Office.ValueFormat | string /** * For table or matrix bindings, specifies the zero-based starting row for a subset of the data in the binding. Default is first row. */ startRow?: number /** * For table or matrix bindings, specifies the zero-based starting column for a subset of the data in the binding. Default is first column. */ startColumn?: number /** * For table or matrix bindings, specifies the number of rows offset from the startRow. Default is all subsequent rows. */ rowCount?: number /** * For table or matrix bindings, specifies the number of columns offset from the startColumn. Default is all subsequent columns. */ columnCount?: number /** * Specify whether to get only the visible (filtered in) data or all the data (default is all). Useful when filtering data. * Use Office.FilterType or text value. */ filterType?: Office.FilterType | string /** * Only for table bindings in content add-ins for Access. Specifies the pre-defined string "thisRow" to get data in the currently selected row. * * @deprecated Microsoft Access is no longer supported. */ rows?: string /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides options for setting the size of slices that the document will be divided into. */ interface GetFileOptions { /** * The size of the slices in bytes. The maximum (and the default) is 4194304 (4MB). */ sliceSize?: number /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides options for customizing what data is returned and how it is formatted. */ interface GetSelectedDataOptions { /** * Specify whether the data is formatted. Use Office.ValueFormat or string equivalent. */ valueFormat?: Office.ValueFormat | string /** * Specify whether to get only the visible (that is, filtered-in) data or all the data. Useful when filtering data. * Use {@link Office.FilterType} or string equivalent. This parameter is ignored in Word documents. */ filterType?: Office.FilterType | string /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides options for whether to select the location that is navigated to. * * @remarks * * The behavior caused by the {@link Office.SelectionMode | options.selectionMode} option varies by Office application: * * In Excel: `Office.SelectionMode.Selected` selects all content in the binding, or named item. `Office.SelectionMode.None` for text bindings, * selects the cell; for matrix bindings, table bindings, and named items, selects the first data cell (not first cell in header row for tables). * * In PowerPoint: `Office.SelectionMode.Selected` selects the slide title or first textbox on the slide. * `Office.SelectionMode.None` doesn't select anything. * * In Word: `Office.SelectionMode.Selected` selects all content in the binding. `Office.SelectionMode.None` for text bindings, moves the cursor to * the beginning of the text; for matrix bindings and table bindings, selects the first data cell (not first cell in header row for tables). */ interface GoToByIdOptions { /** * Specifies whether the location specified by the `id` parameter is selected (highlighted). * Use {@link Office.SelectionMode} or string equivalent. See the Remarks for more information. */ selectionMode?: Office.SelectionMode | string /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Represents a group of controls on a ribbon tab. * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} */ interface Group { /** * Identifier of the group as specified in the manifest. * */ id: string; /** * Specifies one or more of the controls in the group, such as menu items, buttons, etc. * * @remarks * * When the `Group` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, the `controls` properties of the various {@link Office.Group} objects specify which controls have their enabled status changed; the `controls` property of the `Group` object's parent `Tab` object is ignored. */ controls?: Control[]; } /** * Represents a binding in two dimensions of rows and columns. * * @remarks * * The MatrixBinding object inherits the `id` property, type property, getDataAsync method, and setDataAsync method from the Binding object. */ interface MatrixBinding extends Binding { /** * Gets the number of columns in the matrix data structure, as an integer value. */ columnCount: number; /** * Gets the number of rows in the matrix data structure, as an integer value. */ rowCount: number; } /** * Provides information about the deleted node that raised the nodeDeleted event. */ interface NodeDeletedEventArgs { /** * Gets whether the node was deleted as part of an Undo/Redo action by the user. */ isUndoRedo: boolean; /** * Gets the former next sibling of the node that was just deleted from the {@link Office.CustomXmlPart} object. */ oldNextSibling: CustomXmlNode; /** * Gets the node which was just deleted from the {@link Office.CustomXmlPart} object. * * Note that this node may have children, if a subtree is being removed from the document. Also, this node will be a "disconnected" node in * that you can query down from the node, but you cannot query up the tree - the node appears to exist alone. */ oldNode: CustomXmlNode; } /** * Provides information about the inserted node that raised the nodeInserted event. */ interface NodeInsertedEventArgs { /** * Gets whether the node was inserted as part of an Undo/Redo action by the user. */ isUndoRedo: boolean; /** * Gets the node that was just added to the CustomXMLPart object. * * Note that this node may have children, if a subtree was just added to the document. */ newNode: CustomXmlNode; } /** * Provides information about the replaced node that raised the nodeReplaced event. */ interface NodeReplacedEventArgs { /** * Gets whether the replaced node was inserted as part of an undo or redo operation by the user. */ isUndoRedo: boolean; /** * Gets the node that was just added to the CustomXMLPart object. * * Note that this node may have children, if a subtree was just added to the document. */ newNode: CustomXmlNode; /** * Gets the node which was just deleted (replaced) from the CustomXmlPart object. * * Note that this node may have children, if a subtree is being removed from the document. Also, this node will be a "disconnected" node in * that you can query down from the node, but you cannot query up the tree - the node appears to exist alone. */ oldNode: CustomXmlNode; } /** * Provides access to the properties for Office theme colors. * * Using Office theme colors lets you coordinate the color scheme of your add-in with the current Office theme selected by the user with **File** \> * **Office Account** \> **Office Theme UI**, which is applied across all Office applications. Using Office theme colors is appropriate for mail and * task pane add-ins. * * @remarks * * *Supported applications, by platform* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Office on the webOffice on WindowsOffice on MacOffice on iOSOffice on Android
ExcelNot availableSupportedSupportedSupportedNot available
OutlookNot availablePreviewNot availableNot availableNot available
PowerPointNot availableSupportedSupportedSupportedNot available
WordSupportedSupportedSupportedSupportedNot available
*/ interface OfficeTheme { /** * Gets the Office theme body background color as a hexadecimal color triplet (e.g., "#FFA500"). */ bodyBackgroundColor: string; /** * Gets the Office theme body foreground color as a hexadecimal color triplet (e.g., "#FFA500"). */ bodyForegroundColor: string; /** * Gets the Office theme control background color as a hexadecimal color triplet (e.g., "#FFA500"). */ controlBackgroundColor: string; /** * Gets the Office theme control foreground color as a hexadecimal color triplet (e.g., "#FFA500"). */ controlForegroundColor: string; } /** * Specifies a cell, or row, or column, by its zero-based row and/or column number. Example: `{row: 3, column: 4}` specifies the cell in the 3rd * (zero-based) row in the 4th (zero-based) column. */ interface RangeCoordinates { /** * The zero-based row of the range. If not specified, all cells, in the column specified by `column` are included. */ row?: number /** * The zero-based column of the range. If not specified, all cells, in the row specified by `row` are included. */ column?: number } /** * Specifies a range and its formatting. */ interface RangeFormatConfiguration { /** * Specifies the range. Example of using Office.Table enum: Office.Table.All. Example of using RangeCoordinates: `{row: 3, column: 4}` specifies * the cell in the 3rd (zero-based) row in the 4th (zero-based) column. */ cells: Office.Table | RangeCoordinates /** * Specifies the formatting as key-value pairs. Example: `{borderColor: "white", fontStyle: "bold"}` */ format: object } /** * Provides options to determine which event handler or handlers are removed. */ interface RemoveHandlerOptions { /** * The handler to be removed. If a particular handler is not specified, then all handlers for the specified event type are removed. */ handler?: (eventArgs?: Office.BindingDataChangedEventArgs | Office.BindingSelectionChangedEventArgs) => any /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides information about which Requirement Sets are supported in the current environment. */ interface RequirementSetSupport { /** * Check if the specified requirement set is supported by the Office application. * @param name - The requirement set name (e.g., "ExcelApi"). * @param minVersion - The minimum required version (e.g., "1.4"). */ isSetSupported(name: string, minVersion?: string): boolean; /** * Check if the specified requirement set is supported by the Office application. * * **Warning**: This overload of `isSetSupported` (where `minVersionNumber` is a number) has been deprecated. Use the string overload of `isSetSupported` instead. * * @deprecated Use the string overload of `isSetSupported` instead. * @param name - The requirement set name (e.g., "ExcelApi"). * @param minVersionNumber - The minimum required version (e.g., 1.4). */ isSetSupported(name: string, minVersionNumber?: number): boolean; } /** * An interface that contains all the functionality provided to manage the state of the Office ribbon. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} */ interface Ribbon { /** * Registers a custom contextual tab with Office and defines the tab's controls. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.2} * * This method only requests that the tab be registered. The actual registration is controlled by the Office application and may not be complete when the returned `Promise` object is resolved. * For more information and code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. * * @param tabDefinition - Specifies the tab's properties and child controls and their properties. This parameter isn't strongly typed because its shape is defined by a JSON schema that can be versioned. To create the parameter object, pass a JSON string that conforms to the Office {@link https://developer.microsoft.com/json-schemas/office-js/dynamic-ribbon.schema.json | dynamic-ribbon JSON schema} to `JSON.parse`, and then pass the returned object to this method. To get IntelliSense for the JSON in Visual Studio Code, see {@link https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings | Editing JSON with Visual Studio Code - JSON schemas and settings }. */ requestCreateControls(tabDefinition: Object): Promise; /** * Sends a request to Office to update the ribbon. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} * * Note that this API is only to request an update. The actual UI update to the ribbon is controlled by the Office application and hence the exact timing of the ribbon update (or refresh) cannot be determined by the completion of this API. * * For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. * * @param input - Represents the updates to be made to the ribbon. Note that only the changes specified in the input parameter are made. */ requestUpdate(input: RibbonUpdaterData): Promise; } /** * Specifies changes to the ribbon, such as the enabled or disabled status of a button. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} */ interface RibbonUpdaterData { /** * Collection of tabs whose state is set with the call of `requestUpdate`. */ tabs: Tab[]; } /** * Provides options for saving settings. */ interface SaveSettingsOptions { /** * **Warning**: This setting has been deprecated and should not be used. It has no effect on most platforms and will cause errors if set to `false` in Excel on the web. * * @deprecated `overwriteIfStale` is no longer supported. */ overwriteIfStale?: boolean /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides options for how to set the data in a binding. * * @remarks * * If the rows option is used, the value must be "thisRow". */ interface SetBindingDataOptions { /** * Use only with binding type table and when a TableData object is passed for the data parameter. An array of objects that specify a range of * columns, rows, or cells and specify, as key-value pairs, the cell formatting to apply to that range. * * Example: `[{cells: Office.Table.Data, format: {fontColor: "yellow"}}, {cells: {row: 3, column: 4}, format: {borderColor: "white", fontStyle: "bold"}}]` */ cellFormat?: RangeFormatConfiguration[] /** * Explicitly sets the shape of the data object. If not supplied is inferred from the data type. */ coercionType?: Office.CoercionType | string /** * Only for table bindings in content add-ins for Access. Array of strings. Specifies the column names. * * @deprecated Microsoft Access is no longer supported. */ columns?: string[] /** * Only for table bindings in content add-ins for Access. Specifies the pre-defined string "thisRow" to get data in the currently selected row. * * @deprecated Microsoft Access is no longer supported. */ rows?: string /** * Specifies the zero-based starting row for a subset of the data in the binding. Only for table or matrix bindings. If omitted, data is set * starting in the first row. */ startRow?: number /** * Specifies the zero-based starting column for a subset of the data. Only for table or matrix bindings. If omitted, data is set starting in * the first column. */ startColumn?: number /** * For an inserted table, a list of key-value pairs that specify table formatting options, such as header row, total row, and banded rows. * Example: `{bandedRows: true, filterButton: false}` */ tableOptions?: object /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Provides options for how to insert data to the selection. */ interface SetSelectedDataOptions { /** * Use only with binding type table and when a TableData object is passed for the data parameter. An array of objects that specify a range of * columns, rows, or cells and specify, as key-value pairs, the cell formatting to apply to that range. * * Example: `[{cells: Office.Table.Data, format: {fontColor: "yellow"}}, {cells: {row: 3, column: 4}, format: {borderColor: "white", fontStyle: "bold"}}]` */ cellFormat?: RangeFormatConfiguration[] /** * Explicitly sets the shape of the data object. If not supplied is inferred from the data type. */ coercionType?: Office.CoercionType | string /** * For an inserted table, a list of key-value pairs that specify table formatting options, such as header row, total row, and banded rows. * Example: `{bandedRows: true, filterButton: false}` */ tableOptions?: object /** * This option is applicable for inserting images. Indicates the insert location in relation to the top of the slide for PowerPoint, and its * relation to the currently selected cell in Excel. This value is ignored for Word. This value is in points. */ imageTop?: number /** * This option is applicable for inserting images. Indicates the image width. If this option is provided without the imageHeight, the image * will scale to match the value of the image width. If both image width and image height are provided, the image will be resized accordingly. * If neither the image height or width is provided, the default image size and aspect ratio will be used. This value is in points. */ imageWidth?: number /** * This option is applicable for inserting images. Indicates the insert location in relation to the left side of the slide for PowerPoint, and * its relation to the currently selected cell in Excel. This value is ignored for Word. This value is in points. */ imageLeft?: number /** * This option is applicable for inserting images. Indicates the image height. If this option is provided without the imageWidth, the image * will scale to match the value of the image height. If both image width and image height are provided, the image will be resized accordingly. * If neither the image height or width is provided, the default image size and aspect ratio will be used. This value is in points. */ imageHeight?: number /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ asyncContext?: any } /** * Represents custom settings for a task pane or content add-in that are stored in the host document as name/value pairs. * * @remarks * * **Applications**: Excel, PowerPoint, Word * * The settings created by using the methods of the Settings object are saved per add-in and per document. * That is, they are available only to the add-in that created them, and only from the document in which they are saved. * * The name of a setting is a string, while the value can be a string, number, boolean, null, object, or array. * * The Settings object is automatically loaded as part of the Document object, and is available by calling the settings property of that object * when the add-in is activated. * * The developer is responsible for calling the saveAsync method after adding or deleting settings to save the settings in the document. */ interface Settings { /** * Adds an event handler for the settingsChanged event. * * **Important**: Your add-in's code can register a handler for the settingsChanged event when the add-in is running with any Excel client, but * the event will fire only when the add-in is loaded with a spreadsheet that is opened in Excel on the web, and more than one user is editing the * spreadsheet (coauthoring). Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType Specifies the type of event to add. Required. * @param handler The event handler function to add, whose only parameter is of type {@link Office.SettingsChangedEventArgs}. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no data or object to retrieve when adding an event handler.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
*/ addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Adds an event handler for the settingsChanged event. * * **Important**: Your add-in's code can register a handler for the settingsChanged event when the add-in is running with any Excel client, but * the event will fire only when the add-in is loaded with a spreadsheet that is opened in Excel on the web, and more than one user is editing the * spreadsheet (coauthoring). Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * * @param eventType Specifies the type of event to add. Required. * @param handler The event handler function to add, whose only parameter is of type {@link Office.SettingsChangedEventArgs}. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no data or object to retrieve when adding an event handler.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
*/ addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; /** * Retrieves the specified setting. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} * * @param settingName The case-sensitive name of the setting to retrieve. * @returns An object that has property names mapped to JSON serialized values. */ get(name: string): any; /** * Reads all settings persisted in the document and refreshes the content or task pane add-in's copy of those settings held in memory. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * This method is useful in Excel, Word, and PowerPoint coauthoring scenarios when multiple instances of the same add-in are working against * the same document. Because each add-in is working against an in-memory copy of the settings loaded from the document at the time the user * opened it, the settings values used by each user can get out of sync. This can happen whenever an instance of the add-in calls the * Settings.saveAsync method to persist all of that user's settings to the document. Calling the refreshAsync method from the event handler * for the settingsChanged event of the add-in will refresh the settings values for all users. * * In the callback function passed to the refreshAsync method, you can use the properties of the AsyncResult object to return the following * information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAccess a Settings object with the refreshed values.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an {@link Office.Settings} object with the refreshed values. */ refreshAsync(callback?: (result: AsyncResult) => void): void; /** * Removes the specified setting. * * **Important**: Be aware that the Settings.remove method affects only the in-memory copy of the settings property bag. To persist the removal of * the specified setting in the document, at some point after calling the Settings.remove method and before the add-in is closed, you must * call the Settings.saveAsync method. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} * * null is a valid value for a setting. Therefore, assigning null to the setting will not remove it from the settings property bag. * * @param settingName The case-sensitive name of the setting to remove. */ remove(name: string): void; /** * Removes an event handler for the settingsChanged event. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * If the optional handler parameter is omitted when calling the removeHandlerAsync method, all event handlers for the specified eventType * will be removed. * * When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback * function's only parameter. * * In the callback function passed to the removeHandlerAsync method, you can use the properties of the AsyncResult object to return the * following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no data or object to retrieve when setting formats.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param eventType Specifies the type of event to remove. Required. * @param options Provides options to determine which event handler or handlers are removed. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; /** * Removes an event handler for the settingsChanged event. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * If the optional handler parameter is omitted when calling the removeHandlerAsync method, all event handlers for the specified eventType * will be removed. * * When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback * function's only parameter. * * In the callback function passed to the removeHandlerAsync method, you can use the properties of the AsyncResult object to return the * following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no data or object to retrieve when setting formats.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param eventType Specifies the type of event to remove. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ removeHandlerAsync(eventType: Office.EventType, callback?: (result: AsyncResult) => void): void; /** * Persists the in-memory copy of the settings property bag in the document. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} * * Any settings previously saved by an add-in are loaded when it is initialized, so during the lifetime of the session you can just use the * set and get methods to work with the in-memory copy of the settings property bag. When you want to persist the settings so that they are * available the next time the add-in is used, use the saveAsync method. * * **Note**: The saveAsync method persists the in-memory settings property bag into the document file. However, the changes to the document file * itself are saved only when the user (or AutoRecover setting) saves the document to the file system. The refreshAsync method is only useful * in coauthoring scenarios when other instances of the same add-in might change the settings and those changes should be made available to * all instances. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param options Provides options for saving settings. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ saveAsync(options?: SaveSettingsOptions, callback?: (result: AsyncResult) => void): void; /** * Persists the in-memory copy of the settings property bag in the document. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} * * Any settings previously saved by an add-in are loaded when it is initialized, so during the lifetime of the session you can just use the * set and get methods to work with the in-memory copy of the settings property bag. When you want to persist the settings so that they are * available the next time the add-in is used, use the saveAsync method. * * **Note**: The saveAsync method persists the in-memory settings property bag into the document file. However, the changes to the document file * itself are saved only when the user (or AutoRecover setting) saves the document to the file system. The refreshAsync method is only useful * in coauthoring scenarios when other instances of the same add-in might change the settings and those changes should be made available to * all instances. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ saveAsync(callback?: (result: AsyncResult) => void): void; /** * Sets or creates the specified setting. * * **Important**: Be aware that the Settings.set method affects only the in-memory copy of the settings property bag. * To make sure that additions or changes to settings will be available to your add-in the next time the document is opened, at some point * after calling the Settings.set method and before the add-in is closed, you must call the Settings.saveAsync method to persist settings in * the document. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} * * The set method creates a new setting of the specified name if it does not already exist, or sets an existing setting of the specified name * in the in-memory copy of the settings property bag. After you call the Settings.saveAsync method, the value is stored in the document as * the serialized JSON representation of its data type. * * @param settingName The case-sensitive name of the setting to set or create. * @param value Specifies the value to be stored. */ set(name: string, value: any): void; } /** * Provides information about the settings that raised the settingsChanged event. * * To add an event handler for the settingsChanged event, use the addHandlerAsync method of the * {@link Office.Settings} object. * * The settingsChanged event fires only when your add-in's script calls the Settings.saveAsync method to persist * the in-memory copy of the settings into the document file. The settingsChanged event is not triggered when the * Settings.set or Settings.remove methods are called. * * The settingsChanged event was designed to let you to handle potential conflicts when two or more users are * attempting to save settings at the same time when your add-in is used in a shared (coauthored) document. * * **Important**: Your add-in's code can register a handler for the settingsChanged event when the add-in * is running with any Excel client, but the event will fire only when the add-in is loaded with a spreadsheet * that is opened in Excel on the web, and more than one user is editing the spreadsheet (coauthoring). * Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. */ interface SettingsChangedEventArgs { /** * Gets an {@link Office.Settings} object that represents the settings that raised the settingsChanged event. */ settings: Settings; /** * Get an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. */ type: EventType; } /** * Represents a slice of a document file. The Slice object is accessed with the `File.getSliceAsync` method. */ interface Slice { /** * Gets the raw data of the file slice in `Office.FileType.Text` or `Office.FileType.Compressed` format as specified * by the `fileType` parameter of the call to the `Document.getFileAsync` method. * * @remarks * * Files in the "compressed" format will return a byte array that can be transformed to a base64-encoded string if required. */ data: any; /** * Gets the zero-based index of the file slice. */ index: number; /** * Gets the size of the slice in bytes. */ size: number; } /** * Represents an individual tab and the state it should have. For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} */ interface Tab { /** * Identifier of the tab as specified in the manifest. */ id: string; /** * Specifies one or more of the controls in the tab, such as menu items, buttons, etc. * * @remarks * * When the `Tab` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, this property specifies the IDs of the controls whose enabled status is to be changed. However, if there is a `groups` property on the tab, then this property is ignored and the `controls` properties of the specified groups must be used to change enabled status. */ controls?: Control[]; /** * Specifies whether the tab is visible on the ribbon. Used only with contextual tabs. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.2} */ visible?: boolean; /** * Specifies one or more of the control groups on the tab. * * @remarks * * When the `Tab` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, the `controls` properties of the various {@link Office.Group} objects specify which controls have their enabled status changed; the `controls` property of the `Tab` object is ignored. * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} */ groups?: Group[]; } /** * Represents a binding in two dimensions of rows and columns, optionally with headers. * * @remarks * * The TableBinding object inherits the `id` property, `type` property, `getDataAsync` method, and `setDataAsync` method from the * {@link Office.Binding} object. * * For Excel, note that after you establish a table binding, each new row a user adds to the table is automatically included in the binding and * rowCount increases. */ interface TableBinding extends Binding { /** * Gets the number of columns in the TableBinding, as an integer value. */ columnCount: number; /** * True, if the table has headers; otherwise false. */ hasHeaders: boolean; /** * Gets the number of rows in the TableBinding, as an integer value. * * @remarks * * When you insert an empty table by selecting a single row in Excel on desktop and Excel on the web (using Table on the Insert tab), both Office * applications create a single row of headers followed by a single blank row. However, if your add-in's script creates a binding for this * newly inserted table (for example, by using the {@link Office.Bindings}.addFromSelectionAsync method), and then checks the value of the * rowCount property, the value returned will differ depending whether the spreadsheet is open in Excel on desktop or Excel on the web. * * - In Excel on the desktop (i.e., Windows and Mac), rowCount will return 0 (the blank row following the headers isn't counted). * * - In Excel on the web, rowCount will return 1 (the blank row following the headers is counted). * * You can work around this difference in your script by checking if rowCount == 1, and if so, then checking if the row contains all empty * strings. */ rowCount: number; /** * Adds the specified data to the table as additional columns. * * @remarks * * To add one or more columns specifying the values of the data and headers, pass a TableData object as the data parameter. To add one or more * columns specifying only the data, pass an array of arrays ("matrix") as the data parameter. * * The success or failure of an addColumnsAsync operation is atomic. That is, the entire add columns operation must succeed, or it will be * completely rolled back (and the AsyncResult.status property returned to the callback will report failure): * * - Each row in the array you pass as the data argument must have the same number of rows as the table being updated. If not, the entire * operation will fail. * * - Each row and cell in the array must successfully add that row or cell to the table in the newly added columns. If any row or cell * fails to be set for any reason, the entire operation will fail. * * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. * * Additional remark for Excel on the web: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in * a single call to this method. * * @param tableData An array of arrays ("matrix") or a TableData object that contains one or more columns of data to add to the table. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addColumnsAsync(tableData: TableData | any[][], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Adds the specified data to the table as additional columns. * * @remarks * * To add one or more columns specifying the values of the data and headers, pass a TableData object as the data parameter. To add one or more * columns specifying only the data, pass an array of arrays ("matrix") as the data parameter. * * The success or failure of an addColumnsAsync operation is atomic. That is, the entire add columns operation must succeed, or it will be * completely rolled back (and the AsyncResult.status property returned to the callback will report failure): * * - Each row in the array you pass as the data argument must have the same number of rows as the table being updated. If not, the entire * operation will fail. * * - Each row and cell in the array must successfully add that row or cell to the table in the newly added columns. If any row or cell * fails to be set for any reason, the entire operation will fail. * * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. * * Additional remark for Excel on the web: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in * a single call to this method. * * @param tableData An array of arrays ("matrix") or a TableData object that contains one or more columns of data to add to the table. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addColumnsAsync(tableData: TableData | any[][], callback?: (result: AsyncResult) => void): void; /** * Adds the specified data to the table as additional rows. * * @remarks * * The success or failure of an addRowsAsync operation is atomic. That is, the entire add columns operation must succeed, or it will be * completely rolled back (and the AsyncResult.status property returned to the callback will report failure): * * - Each row in the array you pass as the data argument must have the same number of columns as the table being updated. If not, the entire * operation will fail. * * - Each column and cell in the array must successfully add that column or cell to the table in the newly added rows. If any column or * cell fails to be set for any reason, the entire operation will fail. * * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. * * Additional remark for Excel on the web: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in * a single call to this method. * * @param rows An array of arrays ("matrix") or a TableData object that contains one or more rows of data to add to the table. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addRowsAsync(rows: TableData | any[][], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Adds the specified data to the table as additional rows. * * @remarks * * The success or failure of an addRowsAsync operation is atomic. That is, the entire add columns operation must succeed, or it will be * completely rolled back (and the AsyncResult.status property returned to the callback will report failure): * * - Each row in the array you pass as the data argument must have the same number of columns as the table being updated. If not, the entire * operation will fail. * * - Each column and cell in the array must successfully add that column or cell to the table in the newly added rows. If any column or * cell fails to be set for any reason, the entire operation will fail. * * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. * * Additional remark for Excel on the web: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in * a single call to this method. * * @param rows An array of arrays ("matrix") or a TableData object that contains one or more rows of data to add to the table. Required. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ addRowsAsync(rows: TableData | any[][], callback?: (result: AsyncResult) => void): void; /** * Deletes all non-header rows and their values in the table, shifting appropriately for the Office application. * * @remarks * * In Excel, if the table has no header row, this method will delete the table itself. * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ deleteAllDataValuesAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Deletes all non-header rows and their values in the table, shifting appropriately for the Office application. * * @remarks * * In Excel, if the table has no header row, this method will delete the table itself. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ deleteAllDataValuesAsync(callback?: (result: AsyncResult) => void): void; /** * Clears formatting on the bound table. * * @remarks * * See {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ clearFormatsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Clears formatting on the bound table. * * @remarks * * See {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. * * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ clearFormatsAsync(callback?: (result: AsyncResult) => void): void; /** * Gets the formatting on specified items in the table. * * @remarks * * **Returned format structure** * * Each JavaScript object in the return value array has this form: `{cells:{ cell_range }, format:{ format_definition }}` * * The `cells:` property specifies the range you want format using one of the following values. * * **Supported ranges in cells property** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cells range settingsDescription
{row: n}Specifies the range that's the zero-based nth row of data in the table.
{column: n}Specifies the range that's the zero-based nth column of data in the table.
{row: i, column: j}Specifies the single cell that's the ith row and jth column of the table.
Office.Table.AllSpecifies the entire table, including column headers, data, and totals (if any).
Office.Table.DataSpecifies only the data in the table (no headers and totals).
Office.Table.HeadersSpecifies only the header row.
* * The `format:` property specifies values that correspond to a subset of the settings available in the Format Cells dialog box in Excel * (Right-click then select **Format Cells**, or **Home** \> **Format** \> **Format Cells**). * * @param cellReference An object literal containing name-value pairs that specify the range of cells to get formatting from. * @param formats An array specifying the format properties to get. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array containing one or more JavaScript objects specifying the formatting of their corresponding cells. */ getFormatsAsync(cellReference?: any, formats?: any[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult< Array<{ cells: any, format: any}>>) => void): void; /** * Gets the formatting on specified items in the table. * * @remarks * * **Returned format structure** * * Each JavaScript object in the return value array has this form: `{cells:{ cell_range }, format:{ format_definition }}` * * The `cells:` property specifies the range you want format using one of the following values. * * **Supported ranges in cells property** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cells range settingsDescription
{row: n}Specifies the range that's the zero-based nth row of data in the table.
{column: n}Specifies the range that's the zero-based nth column of data in the table.
{row: i, column: j}Specifies the single cell that's the ith row and jth column of the table.
Office.Table.AllSpecifies the entire table, including column headers, data, and totals (if any).
Office.Table.DataSpecifies only the data in the table (no headers and totals).
Office.Table.HeadersSpecifies only the header row.
* * The `format:` property specifies values that correspond to a subset of the settings available in the Format Cells dialog box in Excel * (Right-click then select **Format Cells**, or **Home** \> **Format** \> **Format Cells**). * * @param cellReference An object literal containing name-value pairs that specify the range of cells to get formatting from. * @param formats An array specifying the format properties to get. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * The `value` property of the result is an array containing one or more JavaScript objects specifying the formatting of their corresponding cells. */ getFormatsAsync(cellReference?: any, formats?: any[], callback?: (result: AsyncResult< Array<{ cells: any, format: any}>>) => void): void; /** * Sets formatting on specified items and data in the table. * * @remarks * * **Specifying the cellFormat parameter** * * Use the cellFormat parameter to set or change cell formatting values, such as width, height, font, background, alignment, and so on. * The value you pass as the cellFormat parameter is an array that contains a list of one or more JavaScript objects that specify which cells * to target (`cells:`) and the formats (`format:`) to apply to them. * * Each JavaScript object in the cellFormat array has this form: `{cells:{ cell_range }, format:{ format_definition }}` * * The `cells:` property specifies the range you want format using one of the following values. * * **Supported ranges in cells property** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cells range settingsDescription
{row: n}Specifies the range that's the zero-based nth row of data in the table.
{column: n}Specifies the range that's the zero-based nth column of data in the table.
{row: i, column: j}Specifies the single cell that's the ith row and jth column of the table.
Office.Table.AllSpecifies the entire table, including column headers, data, and totals (if any).
Office.Table.DataSpecifies only the data in the table (no headers and totals).
Office.Table.HeadersSpecifies only the header row.
* * The `format:` property specifies values that correspond to a subset of the settings available in the Format Cells dialog box in Excel * (Right-click then select **Format Cells**, or **Home** \> **Format** \> **Format Cells**). * * You specify the value of the `format:` property as a list of one or more property name - value pairs in a JavaScript object literal. The * property name specifies the name of the formatting property to set, and value specifies the property value. * You can specify multiple values for a given format, such as both a font's color and size. * * Here's three `format:` property value examples: * * `//Set cells: font color to green and size to 15 points.` * * `format: {fontColor : "green", fontSize : 15}` * * `//Set cells: border to dotted blue.` * * `format: {borderStyle: "dotted", borderColor: "blue"}` * * `//Set cells: background to red and alignment to centered.` * * `format: {backgroundColor: "red", alignHorizontal: "center"}` * * * You can specify number formats by specifying the number formatting "code" string in the `numberFormat:` property. * The number format strings you can specify correspond to those you can set in Excel using the Custom category on the Number tab of the Format Cells dialog box. * This example shows how to format a number as a percentage with two decimal places: * * `format: {numberFormat:"0.00%"}` * * For more detail, see how to {@link https://support.microsoft.com/office/78f2a361-936b-4c03-8772-09fab54be7f4 | Create a custom number format}. * * To set formatting on tables when writing data, use the tableOptions and cellFormat optional parameters of the * `Document.setSelectedDataAsync` or `TableBinding.setDataAsync` methods. * * Setting formatting with the optional parameters of the `Document.setSelectedDataAsync` and `TableBinding.setDataAsync` methods only works * to set formatting when writing data the first time. * To make formatting changes after writing data, use the following methods. * * - To update cell formatting, such as font color and style, use the `TableBinding.setFormatsAsync` method (this method). * * - To update table options, such as banded rows and filter buttons, use the `TableBinding.setTableOptions` method. * * - To clear formatting, use the `TableBinding.clearFormats` method. * * For more details and examples, see * {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | How to format tables in add-ins for Excel}. * * @param cellFormat An array that contains one or more JavaScript objects that specify which cells to target and the formatting to apply to them. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setFormatsAsync(cellFormat: any[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Sets formatting on specified items and data in the table. * * @remarks * * **Specifying the cellFormat parameter** * * Use the cellFormat parameter to set or change cell formatting values, such as width, height, font, background, alignment, and so on. * The value you pass as the cellFormat parameter is an array that contains a list of one or more JavaScript objects that specify which cells * to target (`cells:`) and the formats (`format:`) to apply to them. * * Each JavaScript object in the cellFormat array has this form: `{cells:{ cell_range }, format:{ format_definition }}` * * The `cells:` property specifies the range you want format using one of the following values. * * **Supported ranges in cells property** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cells range settingsDescription
{row: n}Specifies the range that's the zero-based nth row of data in the table.
{column: n}Specifies the range that's the zero-based nth column of data in the table.
{row: i, column: j}Specifies the single cell that's the ith row and jth column of the table.
Office.Table.AllSpecifies the entire table, including column headers, data, and totals (if any).
Office.Table.DataSpecifies only the data in the table (no headers and totals).
Office.Table.HeadersSpecifies only the header row.
* * The `format:` property specifies values that correspond to a subset of the settings available in the Format Cells dialog box in Excel * (Right-click then select **Format Cells**, or **Home** \> **Format** \> **Format Cells**). * * You specify the value of the `format:` property as a list of one or more property name - value pairs in a JavaScript object literal. The * property name specifies the name of the formatting property to set, and value specifies the property value. * You can specify multiple values for a given format, such as both a font's color and size. * * Here's three `format:` property value examples: * * `//Set cells: font color to green and size to 15 points.` * * `format: {fontColor : "green", fontSize : 15}` * * `//Set cells: border to dotted blue.` * * `format: {borderStyle: "dotted", borderColor: "blue"}` * * `//Set cells: background to red and alignment to centered.` * * `format: {backgroundColor: "red", alignHorizontal: "center"}` * * * You can specify number formats by specifying the number formatting "code" string in the `numberFormat:` property. * The number format strings you can specify correspond to those you can set in Excel using the Custom category on the Number tab of the Format Cells dialog box. * This example shows how to format a number as a percentage with two decimal places: * * `format: {numberFormat:"0.00%"}` * * For more detail, see how to {@link https://support.microsoft.com/office/78f2a361-936b-4c03-8772-09fab54be7f4 | Create a custom number format}. * * To set formatting on tables when writing data, use the tableOptions and cellFormat optional parameters of the * `Document.setSelectedDataAsync` or `TableBinding.setDataAsync` methods. * * Setting formatting with the optional parameters of the `Document.setSelectedDataAsync` and `TableBinding.setDataAsync` methods only works * to set formatting when writing data the first time. * To make formatting changes after writing data, use the following methods. * * - To update cell formatting, such as font color and style, use the `TableBinding.setFormatsAsync` method (this method). * * - To update table options, such as banded rows and filter buttons, use the `TableBinding.setTableOptions` method. * * - To clear formatting, use the `TableBinding.clearFormats` method. * * For more details and examples, see * {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | How to format tables in add-ins for Excel}. * * @param cellFormat An array that contains one or more JavaScript objects that specify which cells to target and the formatting to apply to them. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. */ setFormatsAsync(cellFormat: any[], callback?: (result: AsyncResult) => void): void; /** * Updates table formatting options on the bound table. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * In the callback function passed to the goToByIdAsync method, you can use the properties of the AsyncResult object to return the following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no data or object to retrieve when setting formats.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param tableOptions An object literal containing a list of property name-value pairs that define the table options to apply. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * */ setTableOptionsAsync(tableOptions: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Updates table formatting options on the bound table. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} * * In the callback function passed to the goToByIdAsync method, you can use the properties of the AsyncResult object to return the following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAlways returns undefined because there's no data or object to retrieve when setting formats.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextDefine an item of any type that's returned in the AsyncResult object without being altered.
* * @param tableOptions An object literal containing a list of property name-value pairs that define the table options to apply. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. * */ setTableOptionsAsync(tableOptions: any, callback?: (result: AsyncResult) => void): void; } /** * Represents the data in a table or an {@link Office.TableBinding}. */ class TableData { constructor(rows: any[][], headers: any[]); constructor(); /** * Gets or sets the headers of the table. * * @remarks * * To specify headers, you must specify an array of arrays that corresponds to the structure of the table. For example, to specify headers * for a two-column table you would set the header property to [['header1', 'header2']]. * * If you specify null for the headers property (or leaving the property empty when you construct a TableData object), the following results * occur when your code executes. * * - If you insert a new table, the default column headers for the table are created. * * - If you overwrite or update an existing table, the existing headers are not altered. */ headers: any[]; /** * Gets or sets the rows in the table. Returns an array of arrays that contains the data in the table. * Returns an empty array if there are no rows. * * @remarks * * To specify rows, you must specify an array of arrays that corresponds to the structure of the table. For example, to specify two rows of * string values in a two-column table you would set the rows property to [['a', 'b'], ['c', 'd']]. * * If you specify null for the rows property (or leave the property empty when you construct a TableData object), the following results occur * when your code executes. * * - If you insert a new table, a blank row will be inserted. * * - If you overwrite or update an existing table, the existing rows are not altered. */ rows: any[][]; } /** * Represents a bound text selection in the document. * * The TextBinding object inherits the `id` property, type property, getDataAsync method, and setDataAsync method from the {@link Office.Binding} * object. It does not implement any additional properties or methods of its own. */ interface TextBinding extends Binding { } /** * Provides objects and methods that you can use to create and manipulate UI components, such as dialog boxes, in your Office Add-ins. * * Visit "{@link https://learn.microsoft.com/office/dev/add-ins/develop/dialog-api-in-office-add-ins | Use the Dialog API in your Office Add-ins}" * for more information. */ interface UI { /** * Adds an event handler to the object using the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} * * You can add multiple event handlers for the specified event type as long as the name of each event handler function is unique. * * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`. * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the handler registration returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, options: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Adds an event handler to the object using the specified event type. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} * * You can add multiple event handlers for the specified event type as long as the name of each event handler function is unique. * * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`. * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}. * @param callback Optional. A function that is invoked when the handler registration returns, whose only parameter is of type {@link Office.AsyncResult}. */ addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, callback?: (result: AsyncResult) => void): void; /** * Displays a dialog to show or collect information from the user or to facilitate Web navigation. * * @remarks * * **Applications**: Excel, Outlook, PowerPoint, Word * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.4} * * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word add-ins, and in the Mailbox requirement set 1.4 * for Outlook. For more on how to specify a requirement set in your manifest, see * {@link https://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements}, if you're using the XML manifest. If you're using the Teams manifest (preview), see {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. * * The initial page must be on the same domain as the parent page (the startAddress parameter). After the initial page loads, you can go to * other domains. * * Any page calling `Office.context.ui.messageParent` must also be on the same domain as the parent page. * * **Design considerations**: * * The following design considerations apply to dialog boxes. * * - An Office Add-in task pane can have only one dialog box open at any time. Multiple dialogs can be open at the same time from Add-in * Commands (custom ribbon buttons or menu items). * * - Every dialog box can be moved and resized by the user. * * - Every dialog box is centered on the screen when opened. * * - Dialog boxes appear on top of the application and in the order in which they were created. * * Use a dialog box to: * * - Display authentication pages to collect user credentials. * * - Display an error/progress/input screen from a ShowTaskpane or ExecuteAction command. * * - Temporarily increase the surface area that a user has available to complete a task. * * Do not use a dialog box to interact with a document. Use a task pane instead. * * **displayDialogAsync Errors** * * * * * * * * * * * * * * * * * * * * * * *
Code numberMeaning
12004The domain of the URL passed to displayDialogAsync isn't trusted. The domain must be either the same domain as the host page (including protocol and port number), or it must be registered in the AppDomains section of the add-in manifest.
12005The URL passed to displayDialogAsync uses the HTTP protocol. HTTPS is required. (In some versions of Office, the error message returned with 12005 is the same one returned for 12004.)
12007A dialog box is already opened from the task pane. A task pane add-in can only have one dialog box open at a time.
12009The user chose to ignore the dialog box. This error can occur in online versions of Office, where users may choose not to allow an add-in to present a dialog.
* * In the callback function passed to the displayDialogAsync method, you can use the properties of the AsyncResult object to return the * following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAccess the Dialog object.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextAccess your user-defined object or value, if you passed one as the asyncContext parameter.
* * @param startAddress - Accepts the initial full HTTPS URL that opens in the dialog. Relative URLs mustn't be used. * @param options - Optional. Accepts an {@link Office.DialogOptions} object to define dialog display. * @param callback - Optional. Accepts a callback function to handle the dialog creation attempt. If successful, the AsyncResult.value is a Dialog object. */ displayDialogAsync(startAddress: string, options?: DialogOptions, callback?: (result: AsyncResult) => void): void; /** * Displays a dialog to show or collect information from the user or to facilitate Web navigation. * * @remarks * * **Applications**: Excel, Outlook, PowerPoint, Word * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.4} * * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word add-ins, and in the Mailbox requirement set 1.4 * for Outlook. For more on how to specify a requirement set in your manifest, see * {@link https://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements}, if you're using the XML manifest. If you're using the Teams manifest (preview), see {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. * * The initial page must be on the same domain as the parent page (the startAddress parameter). After the initial page loads, you can go to * other domains. * * Any page calling `Office.context.ui.messageParent` must also be on the same domain as the parent page. * * **Design considerations**: * * The following design considerations apply to dialog boxes. * * - An Office Add-in task pane can have only one dialog box open at any time. Multiple dialogs can be open at the same time from Add-in * Commands (custom ribbon buttons or menu items). * * - Every dialog box can be moved and resized by the user. * * - Every dialog box is centered on the screen when opened. * * - Dialog boxes appear on top of the application and in the order in which they were created. * * Use a dialog box to: * * - Display authentication pages to collect user credentials. * * - Display an error/progress/input screen from a ShowTaskpane or ExecuteAction command. * * - Temporarily increase the surface area that a user has available to complete a task. * * Do not use a dialog box to interact with a document. Use a task pane instead. * * **displayDialogAsync Errors** * * * * * * * * * * * * * * * * * * * * * * *
Code numberMeaning
12004The domain of the URL passed to displayDialogAsync isn't trusted. The domain must be either the same domain as the host page (including protocol and port number), or it must be registered in the AppDomains section of the add-in manifest.
12005The URL passed to displayDialogAsync uses the HTTP protocol. HTTPS is required. (In some versions of Office, the error message returned with 12005 is the same one returned for 12004.)
12007A dialog box is already opened from the task pane. A task pane add-in can only have one dialog box open at a time.
12009The user chose to ignore the dialog box. This error can occur in online versions of Office, where users may choose not to allow an add-in to present a dialog.
* * In the callback function passed to the displayDialogAsync method, you can use the properties of the AsyncResult object to return the * following information. * * * * * * * * * * * * * * * * * * * * * * *
PropertyUse
AsyncResult.valueAccess the Dialog object.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextAccess your user-defined object or value, if you passed one as the asyncContext parameter.
* * @param startAddress - Accepts the initial full HTTPS URL that opens in the dialog. Relative URLs mustn't be used. * @param callback - Optional. Accepts a callback function to handle the dialog creation attempt. If successful, the AsyncResult.value is a Dialog object. */ displayDialogAsync(startAddress: string, callback?: (result: AsyncResult) => void): void; /** * Delivers a message from the dialog box to its parent/opener page. * * @remarks * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} * * - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required. * * @param message Accepts a message from the dialog to deliver to the add-in. Anything that can serialized to a string including JSON and XML can be sent. * @param messageOptions Optional. Provides options for how to send the message. */ messageParent(message: string, messageOptions?: DialogMessageOptions): void; /** * Closes the UI container where the JavaScript is executing. * * @remarks * * **Applications**: Excel, Outlook (Minimum requirement set: Mailbox 1.5), PowerPoint, Word * * **Requirement sets**: * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} * * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.5} * * The behavior of this method is specified by the following: * * - Called from a UI-less command button: No effect. Any dialog opened by displayDialogAsync will remain open. * * - Called from a task pane: The task pane will close. Any dialog opened by displayDialogAsync will also close. * If the task pane supports pinning and was pinned by the user, it will be un-pinned. * * - Called from a module extension: No effect. */ closeContainer(): void; /** * Opens a browser window and loads the specified URL. * * @remarks * * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/open-browser-window-api-requirement-sets | OpenBrowserWindowApi 1.1} * * @param url The full URL to be opened including protocol (e.g., https), and port number, if any. */ openBrowserWindow(url: string): void; } /** * Message used in the `onVisibilityModeChanged` invocation. */ interface VisibilityModeChangedMessage { /** * Visibility changed state. */ visibilityMode: Office.VisibilityMode; } } //////////////////////////////////////////////////////////////// ///////////////////// End Office namespace ///////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// ////////////////////// Begin Exchange APIs ///////////////////// //////////////////////////////////////////////////////////////// declare namespace Office { namespace MailboxEnums { /** * Specifies the type of custom action in a notification message. * * @remarks * [Api set: Mailbox 1.10] */ enum ActionType { /** * The `showTaskPane` action. */ ShowTaskPane = "showTaskPane" } /** * Specifies the formatting that applies to an attachment's content. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum AttachmentContentFormat { /** * The content of the attachment is returned as a base64-encoded string. */ Base64 = "base64", /** * The content of the attachment is returned as a string representing a URL. */ Url = "url", /** * The content of the attachment is returned as a string representing an .eml formatted file. */ Eml = "eml", /** * The content of the attachment is returned as a string representing an .icalendar formatted file. */ ICalendar = "iCalendar" } /** * Specifies whether an attachment was added to or removed from an item. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum AttachmentStatus { /** * An attachment was added to the item. */ Added = "added", /** * An attachment was removed from the item. */ Removed = "removed" } /** * Specifies an attachment's type. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum AttachmentType { /** * The attachment is a file. */ File = "file", /** * The attachment is an Exchange item. */ Item = "item", /** * The attachment is stored in a cloud location, such as OneDrive. * * **Important**: In Read mode, the `id` property of the attachment's {@link Office.AttachmentDetails | details} object * contains a URL to the file. * From requirement set 1.8, the `url` property included in the attachment's * {@link https://learn.microsoft.com/javascript/api/outlook/office.attachmentdetailscompose?view=outlook-js-1.8 | details} object * contains a URL to the file in Compose mode. */ Cloud = "cloud" } /** * Specifies the category color. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: The actual color depends on how the Outlook client renders it. * In this case, the colors noted on each preset apply to Outlook on the web, on Windows, * and on Mac (starting in Version 16.78). * * Earlier versions of Outlook on Mac had a bug that displayed incorrect preset colors. * This has now been fixed starting in Version 16.78. If you've recently updated your * Outlook client, you need to adjust the category colors in your add-in to match the * updated preset values. */ enum CategoryColor { /** * Default color or no color mapped. */ None, /** * Red */ Preset0, /** * Orange */ Preset1, /** * Brown */ Preset2, /** * Yellow */ Preset3, /** * Green */ Preset4, /** * Teal */ Preset5, /** * Olive */ Preset6, /** * Blue */ Preset7, /** * Purple */ Preset8, /** * Cranberry */ Preset9, /** * Steel */ Preset10, /** * DarkSteel */ Preset11, /** * Gray */ Preset12, /** * DarkGray */ Preset13, /** * Black */ Preset14, /** * DarkRed */ Preset15, /** * DarkOrange */ Preset16, /** * DarkBrown */ Preset17, /** * DarkYellow */ Preset18, /** * DarkGreen */ Preset19, /** * DarkTeal */ Preset20, /** * DarkOlive */ Preset21, /** * DarkBlue */ Preset22, /** * DarkPurple */ Preset23, /** * DarkCranberry */ Preset24 } /** * Specifies a message's compose type. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ enum ComposeType { /** * Reply. */ Reply = "reply", /** * New mail. */ NewMail = "newMail", /** * Forward. */ Forward = "forward" } /** * Specifies the day of week or type of day. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum Days { /** * Monday */ Mon = "mon", /** * Tuesday */ Tue = "tue", /** * Wednesday */ Wed = "wed", /** * Thursday */ Thu = "thu", /** * Friday */ Fri = "fri", /** * Saturday */ Sat = "sat", /** * Sunday */ Sun = "sun", /** * Week day (excludes weekend days): 'Mon', 'Tue', 'Wed', 'Thu', and 'Fri'. */ Weekday = "weekday", /** * Weekend day: 'Sat' and 'Sun'. */ WeekendDay = "weekendDay", /** * Day of week. */ Day = "day" } /** * This bitmask represents a delegate's permissions on a shared folder. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum DelegatePermissions { /** * Delegate has permission to read items. */ Read = 1, /** * Delegate has permission to create and write items. */ Write = 2, /** * Delegate has permission to delete only the items they created. */ DeleteOwn = 4, /** * Delegate has permission to delete any items. */ DeleteAll = 8, /** * Delegate has permission to edit only they items they created. */ EditOwn = 16, /** * Delegate has permission to edit any items. */ EditAll = 32 } /** * Specifies an entity's type. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. The work to retire this feature will start in May and continue * until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * The following APIs will also be retired. * * - `Office.context.mailbox.item.getEntities` * - `Office.context.mailbox.item.getEntitiesByType` * - `Office.context.mailbox.item.getFilteredEntitiesByName` * - `Office.context.mailbox.item.getSelectedEntities` * * To help minimize potential disruptions, the following will still be supported after entity-based contextual add-ins are retired. * * - An alternative implementation of the **Join Meeting** button, which is activated by online meeting add-ins, is being developed. Once support for * entity-based contextual add-ins ends, online meeting add-ins will automatically transition to the alternative implementation to activate the * **Join Meeting** button. * * - Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * * For more information, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. */ enum EntityType { /** * Specifies that the entity is a meeting suggestion. */ MeetingSuggestion = "meetingSuggestion", /** * Specifies that the entity is a task suggestion. */ TaskSuggestion = "taskSuggestion", /** * Specifies that the entity is a postal address. */ Address = "address", /** * Specifies that the entity is an SMTP email address. */ EmailAddress = "emailAddress", /** * Specifies that the entity is an Internet URL. */ Url = "url", /** * Specifies that the entity is a US phone number. */ PhoneNumber = "phoneNumber", /** * Specifies that the entity is a contact. */ Contact = "contact" } /** * Action types supported by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. * * @remarks * [Api set: Mailbox 1.10] */ enum InfobarActionType { /** * Dismiss action was selected. * * @remarks * [Api set: Mailbox 1.10] */ Dismiss = 1 } /** * Type of notification allowed by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. * * @remarks * [Api set: Mailbox 1.10] */ enum InfobarType { /** * Notification displays an informational message. * * @remarks * [Api set: Mailbox 1.10] */ Informational = 0, /** * Notification displays a progress indicator. * * @remarks * [Api set: Mailbox 1.10] */ ProgressIndicator = 1, /** * Notification displays an error message. * * @remarks * [Api set: Mailbox 1.10] */ Error = 2, /** * Notification displays an informational message with actions. * * @remarks * [Api set: Mailbox 1.10] */ Insight = 3 } /** * Specifies the notification message type for an appointment or message. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum ItemNotificationMessageType { /** * The notification message is a progress indicator. */ ProgressIndicator = "progressIndicator", /** * The notification message is an informational message. */ InformationalMessage = "informationalMessage", /** * The notification message is an error message. * * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. */ ErrorMessage = "errorMessage", /** * The notification message is an informational message with actions. * * @remarks * [Api set: Mailbox 1.10] */ InsightMessage = "insightMessage" } /** * Specifies an item's type. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum ItemType { /** * An email, meeting request, meeting response, or meeting cancellation. */ Message = "message", /** * An appointment item. */ Appointment = "appointment" } /** * Specifies an appointment location's type. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum LocationType { /** * A custom location. Custom locations don't have an SMTP address. * * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} * added as appointment locations aren't returned by the * {@link https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocation#outlook-office-enhancedlocation-getasync-member(1) | EnhancedLocation.getAsync} method. */ Custom = "custom", /** * A conference room or similar resource that has an SMTP address. */ Room = "room" } /** * Specifies the month. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum Month { /** * January */ Jan = "jan", /** * February */ Feb = "feb", /** * March */ Mar = "mar", /** * April */ Apr = "apr", /** * May */ May = "may", /** * June */ Jun = "jun", /** * July */ Jul = "jul", /** * August */ Aug = "aug", /** * September */ Sep = "sep", /** * October */ Oct = "oct", /** * November */ Nov = "nov", /** * December */ Dec = "dec" } /** * Represents the current view of Outlook on the web. */ enum OWAView { /** * Narrow one-column view. Displayed when the screen width is less than 436 pixels. * For example, Outlook on the web uses this view on the entire screen of older smartphones. */ OneColumnNarrow = "OneColumnNarrow", /** * One-column view. Displayed when the screen width is greater than or equal to 436 pixels, * but less than 536 pixels. For example, Outlook on the web uses this view on the entire screen of newer smartphones. */ OneColumn = "OneColumn", /** * Two-column view. Displayed when the screen width is greater than or equal to 536 pixels, * but less than 780 pixels. For example, Outlook on the web uses this view on most tablets. */ TwoColumns = "TwoColumns", /** * Three-column view. Displayed when the screen width is greater than or equal to 780 pixels. * For example, Outlook on the web uses this view in a full screen window on a desktop computer. */ ThreeColumns = "ThreeColumns" } /** * Specifies the type of recipient of a message or appointment. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: A `recipientType` property value isn't returned by the * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-1.7#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-1.7#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. * The email sender or appointment organizer is always a user whose email address is on the Exchange server. */ enum RecipientType { /** * Specifies the recipient is a distribution list containing a list of email addresses. */ DistributionList = "distributionList", /** * Specifies the recipient is an SMTP email address on the Exchange server. */ User = "user", /** * Specifies the recipient is an SMTP email address that isn't on the Exchange server. It also refers to a recipient added from a personal Outlook address book. * * **Important**: In Outlook on the web, on Windows (starting with Version 2210 (Build 15813.20002)), and on Mac, Global Address Book (GAL) recipients saved to a personal address book return * the `ExternalUser` value, even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly * added or resolved against the GAL. */ ExternalUser = "externalUser", /** * Specifies the recipient isn't one of the other recipient types. It also refers to a recipient that isn't resolved against the Exchange address book, * and is therefore treated as an external SMTP address. * * **Important**: In Outlook on Android and on iOS, Global Address Book (GAL) recipients saved to a personal address book return * the `Other` value, even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly * added or resolved against the GAL. */ Other = "other" } /** * Specifies the time zone applied to the recurrence. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum RecurrenceTimeZone { /** * Afghanistan Standard Time */ AfghanistanStandardTime = "Afghanistan Standard Time", /** * Alaskan Standard Time */ AlaskanStandardTime = "Alaskan Standard Time", /** * Aleutian Standard Time */ AleutianStandardTime = "Aleutian Standard Time", /** * Altai Standard Time */ AltaiStandardTime = "Altai Standard Time", /** * Arab Standard Time */ ArabStandardTime = "Arab Standard Time", /** * Arabian Standard Time */ ArabianStandardTime = "Arabian Standard Time", /** * Arabic Standard Time */ ArabicStandardTime = "Arabic Standard Time", /** * Argentina Standard Time */ ArgentinaStandardTime = "Argentina Standard Time", /** * Astrakhan Standard Time */ AstrakhanStandardTime = "Astrakhan Standard Time", /** * Atlantic Standard Time */ AtlanticStandardTime = "Atlantic Standard Time", /** * Australia Central Standard Time */ AUSCentralStandardTime = "AUS Central Standard Time", /** * Australia Central West Standard Time */ AusCentralW_StandardTime = "Aus Central W. Standard Time", /** * AUS Eastern Standard Time */ AUSEasternStandardTime = "AUS Eastern Standard Time", /** * Azerbaijan Standard Time */ AzerbaijanStandardTime = "Azerbaijan Standard Time", /** * Azores Standard Time */ AzoresStandardTime = "Azores Standard Time", /** * Bahia Standard Time */ BahiaStandardTime = "Bahia Standard Time", /** * Bangladesh Standard Time */ BangladeshStandardTime = "Bangladesh Standard Time", /** * Belarus Standard Time */ BelarusStandardTime = "Belarus Standard Time", /** * Bougainville Standard Time */ BougainvilleStandardTime = "Bougainville Standard Time", /** * Canada Central Standard Time */ CanadaCentralStandardTime = "Canada Central Standard Time", /** * Cape Verde Standard Time */ CapeVerdeStandardTime = "Cape Verde Standard Time", /** * Caucasus Standard Time */ CaucasusStandardTime = "Caucasus Standard Time", /** * Central Australia Standard Time */ CenAustraliaStandardTime = "Cen. Australia Standard Time", /** * Central America Standard Time */ CentralAmericaStandardTime = "Central America Standard Time", /** * Central Asia Standard Time */ CentralAsiaStandardTime = "Central Asia Standard Time", /** * Central Brazilian Standard Time */ CentralBrazilianStandardTime = "Central Brazilian Standard Time", /** * Central Europe Standard Time */ CentralEuropeStandardTime = "Central Europe Standard Time", /** * Central European Standard Time */ CentralEuropeanStandardTime = "Central European Standard Time", /** * Central Pacific Standard Time */ CentralPacificStandardTime = "Central Pacific Standard Time", /** * Central Standard Time */ CentralStandardTime = "Central Standard Time", /** * Central Standard Time (Mexico) */ CentralStandardTime_Mexico = "Central Standard Time (Mexico)", /** * Chatham Islands Standard Time */ ChathamIslandsStandardTime = "Chatham Islands Standard Time", /** * China Standard Time */ ChinaStandardTime = "China Standard Time", /** * Cuba Standard Time */ CubaStandardTime = "Cuba Standard Time", /** * Dateline Standard Time */ DatelineStandardTime = "Dateline Standard Time", /** * East Africa Standard Time */ E_AfricaStandardTime = "E. Africa Standard Time", /** * East Australia Standard Time */ E_AustraliaStandardTime = "E. Australia Standard Time", /** * East Europe Standard Time */ E_EuropeStandardTime = "E. Europe Standard Time", /** * East South America Standard Time */ E_SouthAmericaStandardTime = "E. South America Standard Time", /** * Easter Island Standard Time */ EasterIslandStandardTime = "Easter Island Standard Time", /** * Eastern Standard Time */ EasternStandardTime = "Eastern Standard Time", /** * Eastern Standard Time (Mexico) */ EasternStandardTime_Mexico = "Eastern Standard Time (Mexico)", /** * Egypt Standard Time */ EgyptStandardTime = "Egypt Standard Time", /** * Ekaterinburg Standard Time */ EkaterinburgStandardTime = "Ekaterinburg Standard Time", /** * Fiji Standard Time */ FijiStandardTime = "Fiji Standard Time", /** * FLE Standard Time */ FLEStandardTime = "FLE Standard Time", /** * Georgian Standard Time */ GeorgianStandardTime = "Georgian Standard Time", /** * GMT Standard Time */ GMTStandardTime = "GMT Standard Time", /** * Greenland Standard Time */ GreenlandStandardTime = "Greenland Standard Time", /** * Greenwich Standard Time */ GreenwichStandardTime = "Greenwich Standard Time", /** * GTB Standard Time */ GTBStandardTime = "GTB Standard Time", /** * Haiti Standard Time */ HaitiStandardTime = "Haiti Standard Time", /** * Hawaiian Standard Time */ HawaiianStandardTime = "Hawaiian Standard Time", /** * India Standard Time */ IndiaStandardTime = "India Standard Time", /** * Iran Standard Time */ IranStandardTime = "Iran Standard Time", /** * Israel Standard Time */ IsraelStandardTime = "Israel Standard Time", /** * Jordan Standard Time */ JordanStandardTime = "Jordan Standard Time", /** * Kaliningrad Standard Time */ KaliningradStandardTime = "Kaliningrad Standard Time", /** * Kamchatka Standard Time */ KamchatkaStandardTime = "Kamchatka Standard Time", /** * Korea Standard Time */ KoreaStandardTime = "Korea Standard Time", /** * Libya Standard Time */ LibyaStandardTime = "Libya Standard Time", /** * Line Islands Standard Time */ LineIslandsStandardTime = "Line Islands Standard Time", /** * Lord Howe Standard Time */ LordHoweStandardTime = "Lord Howe Standard Time", /** * Magadan Standard Time */ MagadanStandardTime = "Magadan Standard Time", /** * Magallanes Standard Time */ MagallanesStandardTime = "Magallanes Standard Time", /** * Marquesas Standard Time */ MarquesasStandardTime = "Marquesas Standard Time", /** * Mauritius Standard Time */ MauritiusStandardTime = "Mauritius Standard Time", /** * Mid-Atlantic Standard Time */ MidAtlanticStandardTime = "Mid-Atlantic Standard Time", /** * Middle East Standard Time */ MiddleEastStandardTime = "Middle East Standard Time", /** * Montevideo Standard Time */ MontevideoStandardTime = "Montevideo Standard Time", /** * Morocco Standard Time */ MoroccoStandardTime = "Morocco Standard Time", /** * Mountain Standard Time */ MountainStandardTime = "Mountain Standard Time", /** * Mountain Standard Time (Mexico) */ MountainStandardTime_Mexico = "Mountain Standard Time (Mexico)", /** * Myanmar Standard Time */ MyanmarStandardTime = "Myanmar Standard Time", /** * North Central Asia Standard Time */ N_CentralAsiaStandardTime = "N. Central Asia Standard Time", /** * Namibia Standard Time */ NamibiaStandardTime = "Namibia Standard Time", /** * Nepal Standard Time */ NepalStandardTime = "Nepal Standard Time", /** * New Zealand Standard Time */ NewZealandStandardTime = "New Zealand Standard Time", /** * Newfoundland Standard Time */ NewfoundlandStandardTime = "Newfoundland Standard Time", /** * Norfolk Standard Time */ NorfolkStandardTime = "Norfolk Standard Time", /** * North Asia East Standard Time */ NorthAsiaEastStandardTime = "North Asia East Standard Time", /** * North Asia Standard Time */ NorthAsiaStandardTime = "North Asia Standard Time", /** * North Korea Standard Time */ NorthKoreaStandardTime = "North Korea Standard Time", /** * Omsk Standard Time */ OmskStandardTime = "Omsk Standard Time", /** * Pacific SA Standard Time */ PacificSAStandardTime = "Pacific SA Standard Time", /** * Pacific Standard Time */ PacificStandardTime = "Pacific Standard Time", /** * Pacific Standard Time (Mexico) */ PacificStandardTimeMexico = "Pacific Standard Time (Mexico)", /** * Pakistan Standard Time */ PakistanStandardTime = "Pakistan Standard Time", /** * Paraguay Standard Time */ ParaguayStandardTime = "Paraguay Standard Time", /** * Romance Standard Time */ RomanceStandardTime = "Romance Standard Time", /** * Russia Time Zone 10 */ RussiaTimeZone10 = "Russia Time Zone 10", /** * Russia Time Zone 11 */ RussiaTimeZone11 = "Russia Time Zone 11", /** * Russia Time Zone 3 */ RussiaTimeZone3 = "Russia Time Zone 3", /** * Russian Standard Time */ RussianStandardTime = "Russian Standard Time", /** * SA Eastern Standard Time */ SAEasternStandardTime = "SA Eastern Standard Time", /** * SA Pacific Standard Time */ SAPacificStandardTime = "SA Pacific Standard Time", /** * SA Western Standard Time */ SAWesternStandardTime = "SA Western Standard Time", /** * Saint Pierre Standard Time */ SaintPierreStandardTime = "Saint Pierre Standard Time", /** * Sakhalin Standard Time */ SakhalinStandardTime = "Sakhalin Standard Time", /** * Samoa Standard Time */ SamoaStandardTime = "Samoa Standard Time", /** * Saratov Standard Time */ SaratovStandardTime = "Saratov Standard Time", /** * Southeast Asia Standard Time */ SEAsiaStandardTime = "SE Asia Standard Time", /** * Singapore Standard Time */ SingaporeStandardTime = "Singapore Standard Time", /** * South Africa Standard Time */ SouthAfricaStandardTime = "South Africa Standard Time", /** * Sri Lanka Standard Time */ SriLankaStandardTime = "Sri Lanka Standard Time", /** * Sudan Standard Time */ SudanStandardTime = "Sudan Standard Time", /** * Syria Standard Time */ SyriaStandardTime = "Syria Standard Time", /** * Taipei Standard Time */ TaipeiStandardTime = "Taipei Standard Time", /** * Tasmania Standard Time */ TasmaniaStandardTime = "Tasmania Standard Time", /** * Tocantins Standard Time */ TocantinsStandardTime = "Tocantins Standard Time", /** * Tokyo Standard Time */ TokyoStandardTime = "Tokyo Standard Time", /** * Tomsk Standard Time */ TomskStandardTime = "Tomsk Standard Time", /** * Tonga Standard Time */ TongaStandardTime = "Tonga Standard Time", /** * Transbaikal Standard Time */ TransbaikalStandardTime = "Transbaikal Standard Time", /** * Turkey Standard Time */ TurkeyStandardTime = "Turkey Standard Time", /** * Turks And Caicos Standard Time */ TurksAndCaicosStandardTime = "Turks And Caicos Standard Time", /** * Ulaanbaatar Standard Time */ UlaanbaatarStandardTime = "Ulaanbaatar Standard Time", /** * United States Eastern Standard Time */ USEasternStandardTime = "US Eastern Standard Time", /** * United States Mountain Standard Time */ USMountainStandardTime = "US Mountain Standard Time", /** * Coordinated Universal Time (UTC) */ UTC = "UTC", /** * Coordinated Universal Time (UTC) + 12 hours */ UTCPLUS12 = "UTC+12", /** * Coordinated Universal Time (UTC) + 13 hours */ UTCPLUS13 = "UTC+13", /** * Coordinated Universal Time (UTC) - 2 hours */ UTCMINUS02 = "UTC-02", /** * Coordinated Universal Time (UTC) - 8 hours */ UTCMINUS08 = "UTC-08", /** * Coordinated Universal Time (UTC) - 9 hours */ UTCMINUS09 = "UTC-09", /** * Coordinated Universal Time (UTC) - 11 hours */ UTCMINUS11 = "UTC-11", /** * Venezuela Standard Time */ VenezuelaStandardTime = "Venezuela Standard Time", /** * Vladivostok Standard Time */ VladivostokStandardTime = "Vladivostok Standard Time", /** * West Australia Standard Time */ W_AustraliaStandardTime = "W. Australia Standard Time", /** * West Central Africa Standard Time */ W_CentralAfricaStandardTime = "W. Central Africa Standard Time", /** * West Europe Standard Time */ W_EuropeStandardTime = "W. Europe Standard Time", /** * West Mongolia Standard Time */ W_MongoliaStandardTime = "W. Mongolia Standard Time", /** * West Asia Standard Time */ WestAsiaStandardTime = "West Asia Standard Time", /** * West Bank Standard Time */ WestBankStandardTime = "West Bank Standard Time", /** * West Pacific Standard Time */ WestPacificStandardTime = "West Pacific Standard Time", /** * Yakutsk Standard Time */ YakutskStandardTime = "Yakutsk Standard Time" } /** * Specifies the type of recurrence. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum RecurrenceType { /** * Daily. */ Daily = "daily", /** * Weekday. */ Weekday = "weekday", /** * Weekly. */ Weekly = "weekly", /** * Monthly. */ Monthly = "monthly", /** * Yearly. */ Yearly = "yearly" } /** * Specifies the type of response to a meeting invitation. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum ResponseType { /** * There has been no response from the attendee. */ None = "none", /** * The attendee is the meeting organizer. */ Organizer = "organizer", /** * The meeting request was tentatively accepted by the attendee. */ Tentative = "tentative", /** * The meeting request was accepted by the attendee. */ Accepted = "accepted", /** * The meeting request was declined by the attendee. */ Declined = "declined" } /** * Specifies the version of the REST API that corresponds to a REST-formatted item ID. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum RestVersion { /** * Version 1.0. */ v1_0 = "v1.0", /** * Version 2.0. */ v2_0 = "v2.0", /** * Beta. */ Beta = "beta" } /** * Specifies the source of the selected data in an item (see `Office.mailbox.item.getSelectedDataAsync` for details). * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ enum SourceProperty { /** * The source of the data is from the body of the item. */ Body = "body", /** * The source of the data is from the subject of the item. */ Subject = "subject" } /** * Specifies the week of the month. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ enum WeekNumber { /** * First week of the month. */ First = "first", /** * Second week of the month. */ Second = "second", /** * Third week of the month. */ Third = "third", /** * Fourth week of the month. */ Fourth = "fourth", /** * Last week of the month. */ Last = "last" } } /** * Provides an option for the data format. */ interface CoercionTypeOptions { /** * The desired data format. */ coercionType?: Office.CoercionType | string; } /** * The subclass of {@link Office.Item | Item} dealing with appointments. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Child interfaces: * * - {@link Office.AppointmentCompose | AppointmentCompose} * * - {@link Office.AppointmentRead | AppointmentRead} */ interface Appointment extends Item { } /** * The appointment organizer mode of {@link Office.Item | Office.context.mailbox.item}. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Parent interfaces: * * - {@link Office.ItemCompose | ItemCompose} * * - {@link Office.Appointment | Appointment} */ interface AppointmentCompose extends Appointment, ItemCompose { /** * Gets an object that provides methods for manipulating the body of an item. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ body: Body; /** * Gets an object that provides methods for managing the item's categories. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ categories: Categories; /** * Gets or sets the date and time that the appointment is to end. * * The `end` property is a {@link Office.Time | Time} object expressed as a Coordinated Universal Time (UTC) date and time value. * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. * * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on * the client to UTC for the server. * * **Important**: In the Windows client, you can't use this property to update the end of a recurrence. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ end: Time; /** * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} * object that provides methods to get, remove, or add locations on an item. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ enhancedLocation: EnhancedLocation; /** * Gets the type of item that an instance represents. * * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the `item` object instance is a message or an appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ itemType: MailboxEnums.ItemType | string; /** * Gets or sets the location of an appointment. The `location` property returns a {@link Office.Location | Location} object that provides methods that are * used to get and set the location of the appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ location: Location; /** * Gets the notification messages for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ notificationMessages: NotificationMessages; /** * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. * * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ optionalAttendees: Recipients; /** * Gets the organizer for the specified meeting. * * The `organizer` property returns an {@link Office.Organizer | Organizer} object that provides a method to get the organizer value. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ organizer: Organizer; /** * Gets or sets the recurrence pattern of an appointment. * * The `recurrence` property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance * in a series. `null` is returned for single appointments and meeting requests of single appointments. * * **Note**: Meeting requests have an `itemClass` value of `IPM.Schedule.Meeting.Request`. * * **Note**: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single * appointment and NOT a part of a series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ recurrence: Recurrence; /** * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. * * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ requiredAttendees: Recipients; /** * Gets the ID of the series that an instance belongs to. * * In Outlook on the web and on desktop clients, the `seriesId` property returns the Exchange Web Services (EWS) ID of the parent (series) item * that this item belongs to. However, on iOS and Android, the seriesId returns the REST ID of the parent item. * * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. * * The `seriesId` property returns `null` for items that do not have parent items such as single appointments, series items, or meeting requests * and returns `undefined` for any other items that are not meeting requests. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ seriesId: string; /** * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. * * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ sessionData: SessionData; /** * Gets or sets the date and time that the appointment is to begin. * * The `start` property is a {@link Office.Time | Time} object expressed as a Coordinated Universal Time (UTC) date and time value. * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. * * When you use the `Time.setAsync` method to set the start time, you should use the `convertToUtcClientTime` method to convert the local time on * the client to UTC for the server. * * **Important**: In the Windows client, you can't use this property to update the start of a recurrence. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ start: Time; /** * Gets or sets the description that appears in the subject field of an item. * * The `subject` property gets or sets the entire subject of the item, as sent by the email server. * * The `subject` property returns a `Subject` object that provides methods to get and set the subject. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ subject: Subject; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API * introduced with requirement set 1.8. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `isInline`: If true, indicates that the attachment will be shown inline in the message body, * and should not be displayed in the attachment list. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain * an `Error` object that provides a description of the error. */ addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API * introduced with requirement set 1.8. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain * an `Error` object that provides a description of the error. */ addFileAttachmentAsync(uri: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. * This method returns the attachment identifier in the `asyncResult.value` object. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. * * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `isInline`: If true, indicates that the attachment will be shown inline in the message body * and should not be displayed in the attachment list. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain * an `Error` object that provides a description of the error. */ addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. * This method returns the attachment identifier in the `asyncResult.value` object. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. * * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain * an `Error` object that provides a description of the error. */ addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an Exchange item, such as a message, as an attachment to the message or appointment. * * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or * a code that indicates any error that occurred while attaching the item. * You can use the `options` parameter to pass state information to the callback function, if needed. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * If your Office Add-in is running in Outlook on the web, the `addItemAttachmentAsync` method can attach items to items other than the item that * you are editing; however, this is not supported and is not recommended. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of * type `Office.AsyncResult`. * On success, the attachment identifier will be provided in the `asyncResult.value` property. * If adding the attachment fails, the `asyncResult` object will contain * an `Error` object that provides a description of the error. */ addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an Exchange item, such as a message, as an attachment to the message or appointment. * * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or * a code that indicates any error that occurred while attaching the item. * You can use the `options` parameter to pass state information to the callback function, if needed. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * If your Office Add-in is running in Outlook on the web, the `addItemAttachmentAsync` method can attach items to items other than the item that * you are editing; however, this is not supported and is not recommended. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of * type `Office.AsyncResult`. * On success, the attachment identifier will be provided in the `asyncResult.value` property. * If adding the attachment fails, the `asyncResult` object will contain * an `Error` object that provides a description of the error. */ addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Closes the current item that is being composed. * * The behavior of the `close` method depends on the current state of the item being composed. * If the item has unsaved changes, the client prompts the user to save, discard, or close the action. * * In the Outlook desktop client, the `close` method has no effect on a reply in the Reading Pane. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Important**: In Outlook on the web, if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save, * discard, or cancel even if no changes have occurred since the item was last saved. */ close(): void; /** * Disables the Outlook client signature. * * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections * for the sending account to "(none)", effectively disabling the signature. * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. * If the signature is selected, this API call should disable it. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Disables the Outlook client signature. * * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections * for the sending account to "(none)", effectively disabling the signature. * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. * If the signature is selected, this API call should disable it. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. * In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. * In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the item's attachments as an array. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for * the failure. */ getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the item's attachments as an array. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for * the failure. */ getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously gets the ID of a saved item. * * When invoked, this method returns the item ID via the callback function. * * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API), * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. * Until the item is synced, the `itemId` is not recognized and using it returns an error. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously gets the ID of a saved item. * * When invoked, this method returns the item ID via the callback function. * * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API), * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. * Until the item is synced, the `itemId` is not recognized and using it returns an error. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously returns selected data from the subject or body of a message. * * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. * * To access the selected data from the callback function, call `asyncResult.value.data`. * To access the `source` property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. * * @returns * The selected data as a string with format determined by `coercionType`. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. * If `HTML`, the method returns the selected text, whether it is plaintext or HTML. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ getSelectedDataAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously returns selected data from the subject or body of a message. * * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. * * To access the selected data from the callback function, call `asyncResult.value.data`. * To access the `source` property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. * * @returns * The selected data as a string with format determined by `coercionType`. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. * If `HTML`, the method returns the selected text, whether it is plaintext or HTML. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ getSelectedDataAsync(coercionType: Office.CoercionType | string, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets if the client signature is enabled. * * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set * to a template for the sending Outlook account. * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the web, the API call should return `false`. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets if the client signature is enabled. * * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set * to a template for the sending Outlook account. * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the web, the API call should return `false`. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously loads custom properties for this add-in on the selected item. * * Custom properties are stored as key-value pairs on a per-app, per-item basis. * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. * * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. * This object can be used to get, set, save, and remove custom properties from the mail item. * * @remarks * [Api set: Mailbox 1.1] * * To learn more about custom properties, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. */ loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Removes an attachment from a message or appointment. * * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` * is 200 characters in Outlook on the web and on Windows. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. * If removing the attachment fails, the `asyncResult.error` property will contain an error code with the reason for the failure. */ removeAttachmentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes an attachment from a message or appointment. * * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` * is 200 characters in Outlook on the web and on Windows. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. * If removing the attachment fails, the `asyncResult.error` property will contain an error code with the reason for the failure. */ removeAttachmentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param eventType - The event that should revoke the handler. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * @param eventType - The event that should revoke the handler. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously saves an item. * * Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is saved as a normal * appointment on the user's calendar. For new appointments that haven't been saved before, no invitation is sent. * For existing appointments, an update is sent to added or removed attendees. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Important**: * * - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. * * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. * * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. * Until the item is synced, using the item ID will return an error. * * - In Outlook on Mac, only Build 16.35.308 or later supports saving a meeting. * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The appointment ID is returned in the `asyncResult.value` property. */ saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously saves an item. * * Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is saved as a normal * appointment on the user's calendar. For new appointments that haven't been saved before, no invitation is sent. * For existing appointments, an update is sent to added or removed attendees. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Important**: * * - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. * * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. * * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. * Until the item is synced, using the item ID will return an error. * * - In Outlook on Mac, only Build 16.35.308 or later supports saving a meeting. * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The appointment ID is returned in the `asyncResult.value` property. */ saveAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously inserts data into the body or subject of a message. * * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. * After insertion, the cursor is placed at the end of the inserted content. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `coercionType`: If text, the current style is applied in Outlook on the web and on Windows. * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook on the web and the * default style is applied in Outlook on desktop clients. * If the field is a text field, an `InvalidDataFormat` error is returned. * If `coercionType` is not set, the result depends on the field: if the field is HTML then HTML is used; * if the field is text, then plain text is used. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously inserts data into the body or subject of a message. * * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. * After insertion, the cursor is placed at the end of the inserted content. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * The `AppointmentForm` object is used to access the currently selected appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface AppointmentForm { /** * Gets an object that provides methods for manipulating the body of an item. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ body: Body | string; /** * Gets or sets the date and time that the appointment is to end. * * The `end` property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the `convertToLocalClientTime` method to * convert the `end` property value to the client's local date and time. * * *Read mode* * * The `end` property returns a `Date` object. * * *Compose mode* * * The `end` property returns a `Time` object. * * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on * the client to UTC for the server. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ end: Time | Date; /** * Gets or sets the location of an appointment. * * *Read mode* * * The `location` property returns a string that contains the location of the appointment. * * *Compose mode* * * The `location` property returns a `Location` object that provides methods that are used to get and set the location of the appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ location: Location | string; /** * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. * * *Read mode* * * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for * each optional attendee to the meeting. Collection size limits: * * - Web browser, new Mac UI, Android: No limit * * - Windows: 500 members * * - Classic Mac UI: 100 members * * *Compose mode* * * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ optionalAttendees: Recipients[] | EmailAddressDetails[]; /** * Provides access to the resources of an event. Returns an array of strings containing the resources required for the appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ resources: string[]; /** * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. * * *Read mode* * * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for * each required attendee to the meeting. Collection size limits: * * - Web browser, new Mac UI, Android: No limit * * - Windows: 500 members * * - Classic Mac UI: 100 members * * *Compose mode* * * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ requiredAttendees: Recipients[] | EmailAddressDetails[]; /** * Gets or sets the date and time that the appointment is to begin. * * The `start` property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the `convertToLocalClientTime` method * to convert the value to the client's local date and time. * * *Read mode* * * The `start` property returns a `Date` object. * * *Compose mode* * * The `start` property returns a `Time` object. * * When you use the `Time.setAsync` method to set the start time, you should use the `convertToUtcClientTime` method to convert the local time on * the client to UTC for the server. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ start: Time | Date; /** * Gets or sets the description that appears in the subject field of an item. * * The `subject` property gets or sets the entire subject of the item, as sent by the email server. * * *Read mode* * * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. * * *Compose mode* * * The `subject` property returns a `Subject` object that provides methods to get and set the subject. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ subject: Subject | string; } /** * The appointment attendee mode of {@link Office.Item | Office.context.mailbox.item}. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Parent interfaces: * * - {@link Office.ItemRead | ItemRead} * * - {@link Office.Appointment | Appointment} */ interface AppointmentRead extends Appointment, ItemRead { /** * Gets the item's attachments as an array. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. For more information, see * {@link https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. * */ attachments: AttachmentDetails[]; /** * Gets an object that provides methods for manipulating the body of an item. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ body: Body; /** * Gets an object that provides methods for managing the item's categories. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ categories: Categories; /** * Gets the date and time that an item was created. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ dateTimeCreated: Date; /** * Gets the date and time that an item was last modified. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. */ dateTimeModified: Date; /** * Gets the date and time that the appointment is to end. * * The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. * * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on * the client to UTC for the server. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ end: Date; /** * Gets the locations of an appointment. * * The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} object that allows you to get the set of locations * (each represented by a {@link Office.LocationDetails | LocationDetails} object) associated with the appointment. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ enhancedLocation: EnhancedLocation; /** * Gets the Exchange Web Services item class of the selected appointment. * * Returns `IPM.Appointment` for non-recurring appointments and `IPM.Appointment.Occurrence` for recurring appointments. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: You can create custom classes that extend a default item class. For example, `IPM.Appointment.Contoso`. */ itemClass: string; /** * Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier} * for the current item. * * The `itemId` property is not available in compose mode. * If an item identifier is required, the `saveAsync` method can be used to save the item to the store, which will return the item identifier * in the `asyncResult.value` parameter in the callback function. * * **Note**: The identifier returned by the `itemId` property is the same as the * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}. * The `itemId` property is not identical to the Outlook Entry ID or the ID used by the Outlook REST API. * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ itemId: string; /** * Gets the type of item that an instance represents. * * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or an appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ itemType: MailboxEnums.ItemType | string; /** * Gets the location of an appointment. * * The `location` property returns a string that contains the location of the appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ location: string; /** * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). * * The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by email programs. * To get the subject of the item with the prefixes intact, use the `subject` property. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ normalizedSubject: string; /** * Gets the notification messages for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ notificationMessages: NotificationMessages; /** * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. * * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for * each optional attendee to the meeting. The maximum number of attendees returned varies per Outlook client. * * - Windows: 500 attendees * * - Android, classic Mac UI, iOS: 100 attendees * * - New Mac UI, web browser: No limit * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ optionalAttendees: EmailAddressDetails[]; /** * Gets the meeting organizer's email properties. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ organizer: EmailAddressDetails; /** * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. * * The `recurrence` property returns a {@link Office.Recurrence | Recurrence} object for recurring appointments or meetings requests * if an item is a series or an instance in a series. `null` is returned for single appointments and meeting requests of single appointments. * * **Note**: Meeting requests have an `itemClass` value of `IPM.Schedule.Meeting.Request`. * * **Note**: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single * appointment and NOT a part of a series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ recurrence: Recurrence; /** * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. * * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for * each required attendee to the meeting. The maximum number of attendees returned varies per Outlook client. * * - Windows: 500 attendees * * - Android, classic Mac UI, iOS: 100 attendees * * - New Mac UI, web browser: No limit * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ requiredAttendees: EmailAddressDetails[]; /** * Gets the date and time that the appointment is to begin. * * The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ start: Date; /** * Gets the ID of the series that an instance belongs to. * * In Outlook on the web and on desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item * that this item belongs to. However, on iOS and Android, the seriesId returns the REST ID of the parent item. * * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls using this value, it * should be converted using `Office.context.mailbox.convertToRestId`. * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. * * The `seriesId` property returns `null` for items that do not have parent items such as single appointments, series items, or meeting requests * and returns `undefined` for any other items that are not meeting requests. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ seriesId: string; /** * Gets the description that appears in the subject field of an item. * * The `subject` property gets or sets the entire subject of the item, as sent by the email server. * * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee */ subject: string; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the * selected appointment. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. * * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. */ displayReplyAllForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the * selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the * selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. * * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. */ displayReplyForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier * to retrieve the attachment. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier * to retrieve the attachment. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the entities found in the selected item's body. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getEntities` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. */ getEntities(): Entities; /** * Gets an array of all the entities of the specified entity type found in the selected item's body. * * @returns * If the value passed in `entityType` is not a valid member of the `EntityType` enumeration, the method returns null. * If no entities of the specified type are present in the item's body, the method returns an empty array. * Otherwise, the type of the objects in the returned array depends on the type of entity requested in the `entityType` parameter. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getEntitiesByType` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param entityType - One of the `EntityType` enumeration values. * * While the minimum permission level to use this method is **restricted**, some entity types require **read item** to access, as specified in the following table. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Value of entityTypeType of objects in returned arrayRequired permission level
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
*/ getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array; /** * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file. * * @returns * The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the * manifest XML file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getFilteredEntitiesByName` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. */ getFilteredEntitiesByName(name: string): Array; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. * * @returns * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule * or the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property * of the item that's specified by that rule. The `PropertyName` simple type defines the supported properties. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. Once retired, contextual add-ins will no longer be able to detect * entities in mail items to perform tasks on them. Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. * Instead, use the `Body.getAsync` method to retrieve the entire body. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. */ getRegExMatches(): any; /** * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. * * @returns * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, * with the specified `RegExName` element value. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. Once retired, contextual add-ins will no longer be able to detect * entities in mail items to perform tasks on them. Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. * Instead, use the `Body.getAsync` method to retrieve the entire body. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. */ getRegExMatchesByName(name: string): string[]; /** * Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins. * * @remarks * [Api set: Mailbox 1.6] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getSelectedEntities` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. */ getSelectedEntities(): Entities; /** * Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file. * Highlighted matches apply to contextual add-ins. * * @returns * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule or * the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur * in the property of the item that is specified by that rule. The `PropertyName` simple type defines the supported properties. * * @remarks * [Api set: Mailbox 1.6] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. Once retired, contextual add-ins will no longer be able to detect * entities in mail items to perform tasks on them. Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body * and shouldn't attempt to return the entire body of the item. Using a regular expression such as .* to obtain the entire body of an item doesn't always return the * expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. */ getSelectedRegExMatches(): any; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously loads custom properties for this add-in on the selected item. * * Custom properties are stored as key-value pairs on a per-app, per-item basis. * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. * * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. * This object can be used to get, set, save, and remove custom properties from the mail item. * * @remarks * [Api set: Mailbox 1.1] * * To learn more about custom properties, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. */ loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param eventType - The event that should revoke the handler. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * @param eventType - The event that should revoke the handler. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Provides the current dates and times of the appointment that raised the `Office.EventType.AppointmentTimeChanged` event. * * @remarks * [Api set: Mailbox 1.7] */ export interface AppointmentTimeChangedEventArgs { /** * Gets the appointment end date and time. * * @remarks * [Api set: Mailbox 1.7] */ end: Date; /** * Gets the appointment start date and time. * * @remarks * [Api set: Mailbox 1.7] */ start: Date; /** * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. * * @remarks * [Api set: Mailbox 1.7] */ type: "olkAppointmentTimeChanged"; } /** * Represents the content of an attachment on a message or appointment item. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface AttachmentContent { /** * The content of an attachment as a string. */ content: string; /** * The string format to use for an attachment's content. * * For file attachments, the formatting is a base64-encoded string. * * For item attachments that represent messages and were attached by drag-and-drop or "Attach Item", * the formatting is a string representing an .eml formatted file. * **Important**: If a message item was attached by drag-and-drop in Outlook on the web, then `getAttachmentContentAsync` throws an error. * * For item attachments that represent calendar items and were attached by drag-and-drop or "Attach Item", * the formatting is a string representing an .icalendar file. * **Important**: If a calendar item was attached by drag-and-drop in Outlook on the web, then `getAttachmentContentAsync` throws an error. * * For cloud attachments, the formatting is a URL string. */ format: MailboxEnums.AttachmentContentFormat | string; } /** * Represents an attachment on an item. Compose mode only. * * An array of `AttachmentDetailsCompose` objects is returned as the attachments property of an appointment or message item. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface AttachmentDetailsCompose { /** * Gets a value that indicates the type of an attachment. */ attachmentType: MailboxEnums.AttachmentType | string; /** * Gets the index of the attachment. */ id: string; /** * Gets a value that indicates whether the attachment should be displayed in the body of the item. */ isInline: boolean; /** * Gets the name of the attachment. * * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. */ name: string; /** * Gets the size of the attachment in bytes. */ size: number; /** * Gets the url of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`. */ url?: string; } /** * Represents an attachment on an item from the server. Read mode only. * * An array of `AttachmentDetails` objects is returned as the attachments property of an appointment or message item. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read */ interface AttachmentDetails { /** * Gets a value that indicates the type of an attachment. */ attachmentType: MailboxEnums.AttachmentType | string; /** * Gets the MIME content type of the attachment. * * **Warning**: While the `contentType` value is a direct lookup of the attachment's extension, the internal mapping isn't actively maintained * so this property has been deprecated. If you require specific types, grab the attachment's extension and process accordingly. For details, * refer to the {@link https://devblogs.microsoft.com/microsoft365dev/outlook-javascript-api-deprecation-for-attachmentdetails-contenttype-property/ | related blog post }. * * @deprecated If you require specific content types, grab the attachment's extension and process accordingly. */ contentType: string; /** * Gets the Exchange attachment ID of the attachment. * However, if the attachment type is `MailboxEnums.AttachmentType.Cloud`, then a URL for the file is returned. */ id: string; /** * Gets a value that indicates whether the attachment should be displayed in the body of the item. */ isInline: boolean; /** * Gets the name of the attachment. * * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. */ name: string; /** * Gets the size of the attachment in bytes. */ size: number; } /** * Provides information about an attachment on a mail item that raised the * `Office.EventType.AttachmentsChanged` event. * * @remarks * [Api set: Mailbox 1.8] */ export interface AttachmentsChangedEventArgs { /** * Gets the object that represents the attachment that was added or removed from * a mail item. The object contains the `id`, `name`, `size`, and `attachmentType` properties * of the attachment. * * @remarks * [Api set: Mailbox 1.8] */ attachmentDetails: object; /** * Specifies whether the attachment was added or removed from a mail item. For details, see * {@link Office.MailboxEnums.AttachmentStatus | MailboxEnums.AttachmentStatus}. * * @remarks * [Api set: Mailbox 1.8] */ attachmentStatus: MailboxEnums.AttachmentStatus | string; /** * Gets the type of event that was raised. For details, see * {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. * * @remarks * [Api set: Mailbox 1.8] */ type: "olkAttachmentsChanged"; } /** * The body object provides methods for adding and updating the content of the message or appointment. * It is returned in the body property of the selected item. * * @remarks * [Api set: Mailbox 1.1] * * **Known issue with HTML table border colors** * * Outlook on Windows: If you're setting various cell borders to different colors in an HTML table in Compose mode, a cell's borders may not reflect * the expected color. For the known behavior, visit {@link https://github.com/OfficeDev/office-js/issues/1818 | OfficeDev/office-js issue #1818}. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface Body { /** * Appends on send the specified content to the end of the item body, after any signature. * * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more * about append-on-send and its configuration, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. * * **Important**: If the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=windows | on-send feature} * is implemented with append-on-send, the following apply. * * - If the user is running add-ins that implement the on-send feature using `ItemSend` in the manifest, append-on-send runs before on-send functionality. * * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, * the `appendOnSendAsync` call returns an error as this scenario isn't supported. * * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. * * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. * * @param data - The string to be added to the end of the body. The string is limited to 5,000 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `coercionType`: The desired format for the data to be appended. The string in the `data` parameter will be converted to this format. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ appendOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Appends on send the specified content to the end of the item body, after any signature. * * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more * about append-on-send and its configuration, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. * * **Important**: If the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=windows | on-send feature} * is implemented with append-on-send, the following apply. * * - If the user is running add-ins that implement the on-send feature using `ItemSend` in the manifest, append-on-send runs before on-send functionality. * * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, * the `appendOnSendAsync` call returns an error as this scenario isn't supported. * * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. * * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. * * @param data - The string to be added to the end of the body. The string is limited to 5,000 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ appendOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Returns the current body in a specified format. * * This method returns the entire current body in the format specified by `coercionType`. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it * render efficiently with its rendering engine. * * @param coercionType - The format for the returned body. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property. */ getAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Returns the current body in a specified format. * * This method returns the entire current body in the format specified by `coercionType`. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it * render efficiently with its rendering engine. * * @param coercionType - The format for the returned body. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property. */ getAsync(coercionType: Office.CoercionType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets a value that indicates whether the content is in HTML or text format. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * The content type is returned as one of the `CoercionType` values in the `asyncResult.value` property. */ getTypeAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets a value that indicates whether the content is in HTML or text format. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * The content type is returned as one of the `CoercionType` values in the `asyncResult.value` property. */ getTypeAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds the specified content to the beginning of the item body. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on the web and on Windows, the cursor * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. * * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. * * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" * (see the **Examples** section for a sample). * * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. * * **Errors**: * * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. * * @param data - The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `coercionType`: The desired format for the body. The string in the `data` parameter will be converted to this format. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ prependAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds the specified content to the beginning of the item body. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on the web and on Windows, the cursor * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. * * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. * * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" * (see the **Examples** section for a sample). * * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. * * **Errors**: * * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. * * @param data - The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ prependAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. * * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. * * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. * * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts add-in}, * the prepend-on-send feature runs first. * * - A new line is added after the prepended content. * * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. * The content of the last run add-in appears above previously prepended content. * * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. * * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Any object that can be accessed in the callback function. * `coercionType`: The desired format for the body. The string in the `data` parameter is converted to this format. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ prependOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. * * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. * * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. * * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts add-in}, * the prepend-on-send feature runs first. * * - A new line is added after the prepended content. * * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. * The content of the last run add-in appears above previously prepended content. * * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. * * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ prependOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Replaces the entire body with the specified text. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows, * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item. * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects * something in the body of the mail item. * * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it * render efficiently with its rendering engine. * * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" * (see the **Examples** section for a sample). * * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command. * * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. * * **Errors**: * * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. * * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `coercionType`: The desired format for the body. The string in the `data` parameter will be converted to this format. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property. */ setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Replaces the entire body with the specified text. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows, * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item. * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects * something in the body of the mail item. * * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it * render efficiently with its rendering engine. * * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" * (see the **Examples** section for a sample). * * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command. * * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. * * **Errors**: * * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. * * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property. */ setAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Replaces the selection in the body with the specified text. * * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the body of the item, or, if text is selected in * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. * * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" * (see the **Examples** section for a sample). * * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter is longer than 1,000,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. * * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `coercionType`: The desired format for the body. The string in the `data` parameter will be converted to this format. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Replaces the selection in the body with the specified text. * * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the body of the item, or, if text is selected in * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. * * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" * (see the **Examples** section for a sample). * * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter is longer than 1,000,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. * * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. */ setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a signature to the item body if it doesn't have an existing signature. If there's already a signature in the body, replaces that signature. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - In Outlook on the web, `setSignatureAsync` only works on messages. * * - This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. For a sample scenario, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. * To learn more about APIs supported in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using LaunchEvent in the manifest}. * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means * if the user closes the form without making other edits, they won't be prompted to save changes. * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. * * @param data - The string that represents the signature to be set in the body of the mail. This string is limited to 30,000 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `coercionType`: The format the signature should be set to. If Text, the method sets the signature to plain text, * removing any HTML tags present. If Html, the method sets the signature to HTML. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ setSignatureAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a signature to the item body if it doesn't have an existing signature. If there's already a signature in the body, replaces that signature. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - In Outlook on the web, `setSignatureAsync` only works on messages. * * - This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. For a sample scenario, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. * To learn more about APIs supported in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using LaunchEvent in the manifest}. * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means * if the user closes the form without making other edits, they won't be prompted to save changes. * * **Errors**: * * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,000 characters. * * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. * * @param data - The string that represents the signature to be set in the body of the mail. This string is limited to 30,000 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ setSignatureAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents the categories on an item. * * In Outlook, a user can tag messages and appointments by using a category to color-code them. * The user defines {@link Office.MasterCategories | categories in a master list} on their mailbox. * They can then apply one or more categories to an item. * * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface Categories { /** * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name * but multiple categories can use the same color. * * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message or appointment item in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Errors**: * * - `InvalidCategory`: Invalid categories were provided. * * @param categories - The categories to be added to the item. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ addAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name * but multiple categories can use the same color. * * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message or appointment item in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Errors**: * * - `InvalidCategory`: Invalid categories were provided. * * @param categories - The categories to be added to the item. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ addAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an item's categories. * * **Important**: * * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version * so make sure to handle both cases. * * - In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will contain an error code. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an item's categories. * * **Important**: * * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version * so make sure to handle both cases. * * - In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will contain an error code. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Removes categories from an item. * * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param categories - The categories to be removed from the item. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. */ removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes categories from an item. * * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param categories - The categories to be removed from the item. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. */ removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents a category's details like name and associated color. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface CategoryDetails { /** * The name of the category. Maximum length is 255 characters. */ displayName: string; /** * The color of the category. */ color: MailboxEnums.CategoryColor | string; } /** * Represents the details about a contact (similar to what's on a physical contact or business card) extracted from the item's body. Read mode only. * * The list of contacts extracted from the body of an email message or appointment is returned in the `contacts` property of the * {@link Office.Entities | Entities} object returned by the `getEntities` or `getEntitiesByType` method of the current item. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * **Important**: Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. The work to retire this feature will start in May and continue * until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * The following APIs will also be retired. * * - `Office.context.mailbox.item.getEntities` * - `Office.context.mailbox.item.getEntitiesByType` * - `Office.context.mailbox.item.getFilteredEntitiesByName` * - `Office.context.mailbox.item.getSelectedEntities` * * To help minimize potential disruptions, the following will still be supported after entity-based contextual add-ins are retired. * * - An alternative implementation of the **Join Meeting** button, which is activated by online meeting add-ins, is being developed. Once support for * entity-based contextual add-ins ends, online meeting add-ins will automatically transition to the alternative implementation to activate the * **Join Meeting** button. * * - Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * * For more information, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. */ interface Contact { /** * An array of strings containing the mailing and street addresses associated with the contact. Nullable. */ addresses: string[]; /** * A string containing the name of the business associated with the contact. Nullable. */ businessName: string; /** * An array of strings containing the SMTP email addresses associated with the contact. Nullable. */ emailAddresses: string[]; /** * A string containing the name of the person associated with the contact. Nullable. */ personName: string; /** * An array containing a `PhoneNumber` object for each phone number associated with the contact. Nullable. */ phoneNumbers: PhoneNumber[]; /** * An array of strings containing the Internet URLs associated with the contact. Nullable. */ urls: string[]; } /** * The `CustomProperties` object represents custom properties that are specific to a particular mail item and specific to an Outlook add-in. * For example, there might be a need for an add-in to save some data that's specific to the current message that activated the add-in. * If the user revisits the same message in the future and activates the add-in again, the add-in will be able to retrieve the data that had * been saved as custom properties. * * To learn more about `CustomProperties`, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.1] * * When using custom properties in your add-in, keep in mind that: * * - Custom properties saved while in compose mode aren't transmitted to recipients of the mail item. When a message or appointment with custom * properties is sent, its properties can be accessed from the item in the Sent Items folder. * If you want to make custom data accessible to recipients, consider using * {@link https://learn.microsoft.com/javascript/api/outlook/office.internetheaders | InternetHeaders} instead. * * - The maximum length of a `CustomProperties` JSON object is 2500 characters. * * - Outlook on Mac doesn't cache custom properties. If the user's network goes down, mail add-ins can't access their custom properties. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface CustomProperties { /** * Returns the value of the specified custom property. * * @returns The value of the specified custom property. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param name - The name of the custom property to be returned. */ get(name: string): any; /** * Returns an object with all custom properties in a collection of name/value pairs. The following are equivalent. * * `customProps.get("name")` * * `var dictionary = customProps.getAll(); dictionary["name"]` * * You can iterate through the dictionary object to discover all `names` and `values`. * * @returns An object with all custom properties in a collection of name/value pairs. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ getAll(): any; /** * Removes the specified property from the custom property collection. * * To make the removal of the property permanent, you must call the `saveAsync` method of the `CustomProperties` object. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param name - The `name` of the property to be removed. */ remove(name: string): void; /** * Saves custom properties to a message or appointment. * * You must call the `saveAsync` method to persist any changes made with the `set` method or the `remove` method of the `CustomProperties` object. * The saving action is asynchronous. * * It's a good practice to have your callback function check for and handle errors from `saveAsync`. * In particular, a read add-in can be activated while the user is in a connected state in a read form, and subsequently the user becomes * disconnected. * If the add-in calls `saveAsync` while in the disconnected state, `saveAsync` would return an error. * Your callback function should handle this error accordingly. * * @remarks * [Api set: Mailbox 1.1] * * **Important**: In Outlook on Windows, custom properties saved while in compose mode only persist after the item being composed is closed or * after `Office.context.mailbox.item.saveAsync` is called. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. * @param asyncContext - Optional. Any state data that is passed to the callback function. */ saveAsync(callback: (asyncResult: Office.AsyncResult) => void, asyncContext?: any): void; /** * Saves custom properties to a message or appointment. * * You must call the `saveAsync` method to persist any changes made with the `set` method or the `remove` method of the `CustomProperties` object. * The saving action is asynchronous. * * It's a good practice to have your callback function check for and handle errors from `saveAsync`. * In particular, a read add-in can be activated while the user is in a connected state in a read form, and subsequently the user becomes * disconnected. * If the add-in calls `saveAsync` while in the disconnected state, `saveAsync` would return an error. * Your callback function should handle this error accordingly. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param asyncContext - Optional. Any state data that is passed to the callback function. */ saveAsync(asyncContext?: any): void; /** * Sets the specified property to the specified value. * * The `set` method sets the specified property to the specified value. To ensure that the set property and value persist on the mail item, * you must call the `saveAsync` method. * * The `set` method creates a new property if the specified property does not already exist; * otherwise, the existing value is replaced with the new value. * The `value` parameter can be of any type; however, it is always passed to the server as a string. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param name - The name of the property to be set. * @param value - The value of the property to be set. */ set(name: string, value: string): void; } /** * The `DelayDeliveryTime` object enables you to manage the delayed delivery date and time of a message. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface DelayDeliveryTime { /** * Gets the delivery date and time of a message. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a message is returned in the * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. */ getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the delivery date and time of a message. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a message is returned in the * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. */ getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the delivery date and time of a message. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: When `item.delayDeliveryTime.setAsync` is used to schedule the delivery of a message, the delay is processed on the server. * This allows the message to be sent even if the Outlook client isn't running. However, because of this, the message doesn't appear in the * **Outbox** folder, so you won't be able to edit the message or cancel its delivery after selecting **Send**. You'll only be able to review * the mesasge from the **Sent Items** folder once the message is sent. To learn more, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delay-delivery | Manage the delivery date and time of a message}. * * **Errors**: * * - `InvalidFormatError` - The format of the specified data object is not valid. * * @param datetime - The future date and time when the message should be sent. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. */ setAsync(datetime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the delivery date and time of a message. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: When `item.delayDeliveryTime.setAsync` is used to schedule the delivery of a message, the delay is processed on the server. * This allows the message to be sent even if the Outlook client isn't running. However, because of this, the message doesn't appear in the * **Outbox** folder, so you won't be able to edit the message or cancel its delivery after selecting **Send**. You'll only be able to review * the mesasge from the **Sent Items** folder once the message is sent. To learn more, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delay-delivery | Manage the delivery date and time of a message}. * * **Errors**: * * - `InvalidFormatError` - The format of the specified data object is not valid. * * @param datetime - The future date and time when the message should be sent. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. */ setAsync(datetime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Provides diagnostic information to an Outlook add-in. * * @remarks * * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * Starting with Mailbox requirement set 1.5, you can also use the * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-1.5&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} * property to get similar information. */ interface Diagnostics { /** * Gets a string that represents the type of Outlook client. * * The string can be one of the following values: `Outlook`, `newOutlookWindows`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. * * @remarks * * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: The `Outlook` value is returned for Outlook desktop clients on Windows and on Mac. `newOutlookWindows` is returned for the * {@link https://insider.microsoft365.com/blog/new-outlook-for-windows-available-to-all-office-insiders | new Outlook on Windows desktop client} * currently in preview. */ hostName: string; /** * Gets a string that represents the version of either the Outlook client or the Exchange Server (for example, "15.0.468.0"). * * If the mail add-in is running in Outlook on a desktop or mobile client, the `hostVersion` property returns the version of the * Outlook client. In Outlook on the web, the property returns the version of the Exchange Server. * * @remarks * * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ hostVersion: string; /** * Gets a string that represents the current view of Outlook on the web. * * The returned string can be one of the following values: `OneColumn`, `TwoColumns`, or `ThreeColumns`. * * If the application is not Outlook on the web, then accessing this property results in undefined. * * Outlook on the web has three views that correspond to the width of the screen and the window, and the number of columns that can be displayed: * * - `OneColumn`, which is displayed when the screen is narrow. Outlook on the web uses this single-column layout on the entire screen of a * smartphone. * * - `TwoColumns`, which is displayed when the screen is wider. Outlook on the web uses this view on most tablets. * * - `ThreeColumns`, which is displayed when the screen is wide. For example, Outlook on the web uses this view in a full screen window on a * desktop computer. * * @remarks * * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ OWAView: MailboxEnums.OWAView | "OneColumn" | "TwoColumns" | "ThreeColumns"; } /** * Provides the email properties of the sender or specified recipients of an email message or appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface EmailAddressDetails { /** * Gets the SMTP email address. */ emailAddress: string; /** * Gets the display name associated with an email address. */ displayName: string; /** * Gets the response that an attendee returned for an appointment. * This property applies to only an attendee of an appointment, as represented by the `optionalAttendees` or `requiredAttendees` property. * This property returns undefined in other scenarios. */ appointmentResponse: MailboxEnums.ResponseType | string; /** * Gets the email address type of a recipient. * * @remarks * **Important**: A `recipientType` property value isn't returned by the * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-1.7#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-1.7#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. * The email sender or appointment organizer is always a user whose email address is on the Exchange server. */ recipientType: MailboxEnums.RecipientType | string; } /** * Represents an email account on an Exchange Server. * * `EmailUser` objects are primarily received in {@link Office.MeetingSuggestion | MeetingSuggestion} and * {@link Office.TaskSuggestion | TaskSuggestion} entities extracted from an Outlook item. To learn more about this scenario, refer to * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/extract-entity-strings-from-an-item | Extract entity strings from an Outlook item}. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read */ interface EmailUser { /** * Gets the display name associated with an email address. */ displayName: string; /** * Gets the SMTP email address. */ emailAddress: string; } /** * Represents the set of locations on an appointment. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ export interface EnhancedLocation { /** * Adds to the set of locations associated with the appointment. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `InvalidFormatError`: The format of the specified data object is not valid. * * @param locationIdentifiers The locations to be added to the current list of locations. * @param options An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. */ addAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds to the set of locations associated with the appointment. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `InvalidFormatError`: The format of the specified data object is not valid. * * @param locationIdentifiers The locations to be added to the current list of locations. * @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. */ addAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the set of locations associated with the appointment. * * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} * added as appointment locations aren't returned by this method. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param options An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the set of locations associated with the appointment. * * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} * added as appointment locations aren't returned by this method. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the set of locations associated with the appointment. * * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param locationIdentifiers The locations to be removed from the current list of locations. * @param options An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. */ removeAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the set of locations associated with the appointment. * * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param locationIdentifiers The locations to be removed from the current list of locations. * @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. */ removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Provides the current enhanced locations when the `Office.EventType.EnhancedLocationsChanged` event is raised. * * @remarks * [Api set: Mailbox 1.8] */ export interface EnhancedLocationsChangedEventArgs { /** * Gets the set of enhanced locations. * * @remarks * [Api set: Mailbox 1.8] */ enhancedLocations: LocationDetails[]; /** * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. * * @remarks * [Api set: Mailbox 1.8] */ type: "olkEnhancedLocationsChanged"; } /** * Represents a collection of entities found in an email message or appointment. Read mode only. * * The `Entities` object is a container for the entity arrays returned by the `getEntities` and `getEntitiesByType` methods when the item * (either an email message or an appointment) contains one or more entities that have been found by the server. * You can use these entities in your code to provide additional context information to the viewer, such as a map to an address found in the item, * or to open a dialer for a phone number found in the item. * * If no entities of the type specified in the property are present in the item, the property associated with that entity is null. * For example, if a message contains a street address and a phone number, the addresses property and phoneNumbers property would contain * information, and the other properties would be null. * * To be recognized as an address, the string must contain a United States postal address that has at least a subset of the elements of a street * number, street name, city, state, and zip code. * * To be recognized as a phone number, the string must contain a North American phone number format. * * Entity recognition relies on natural language recognition that is based on machine learning of large amounts of data. * The recognition of an entity is non-deterministic and success sometimes relies on the particular context in the item. * * When the property arrays are returned by the `getEntitiesByType` method, only the property for the specified entity contains data; * all other properties are null. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * **Important**: Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. The work to retire this feature will start in May and continue * until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * The following APIs will also be retired. * * - `Office.context.mailbox.item.getEntities` * - `Office.context.mailbox.item.getEntitiesByType` * - `Office.context.mailbox.item.getFilteredEntitiesByName` * - `Office.context.mailbox.item.getSelectedEntities` * * To help minimize potential disruptions, the following will still be supported after entity-based contextual add-ins are retired. * * - An alternative implementation of the **Join Meeting** button, which is activated by online meeting add-ins, is being developed. Once support for * entity-based contextual add-ins ends, online meeting add-ins will automatically transition to the alternative implementation to activate the * **Join Meeting** button. * * - Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * * For more information, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. */ interface Entities { /** * Gets the physical addresses (street or mailing addresses) found in an email message or appointment. */ addresses: string[]; /** * Gets the contacts found in an email address or appointment. */ contacts: Contact[]; /** * Gets the email addresses found in an email message or appointment. */ emailAddresses: string[]; /** * Gets the meeting suggestions found in an email message. */ meetingSuggestions: MeetingSuggestion[]; /** * Gets the phone numbers found in an email message or appointment. */ phoneNumbers: PhoneNumber[]; /** * Gets the task suggestions found in an email message or appointment. */ taskSuggestions: string[]; /** * Gets the Internet URLs present in an email message or appointment. */ urls: string[]; } /** * Provides a method to get the from value of a message in an Outlook add-in. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: This interface is supported in Outlook on Android and on iOS. For a sample scenario, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. */ interface From { /** * Gets the from value of a message. * * The `getAsync` method starts an asynchronous call to the Exchange server to get the from value of a message. * * The from value of the item is provided as an {@link Office.EmailAddressDetails | EmailAddressDetails} in the `asyncResult.value` property. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. * To learn more about APIs supported in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - A `recipientType` property value isn't returned by the `getAsync` method. * The email sender is always a user whose email address is on the Exchange server. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. * The `value` property of the result is the item's from value, as an `EmailAddressDetails` object. */ getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the from value of a message. * * The `getAsync` method starts an asynchronous call to the Exchange server to get the from value of a message. * * The from value of the item is provided as an {@link Office.EmailAddressDetails | EmailAddressDetails} in the `asyncResult.value` property. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. * To learn more about APIs supported in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - A `recipientType` property value isn't returned by the `getAsync` method. * The email sender is always a user whose email address is on the Exchange server. * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. * The `value` property of the result is the item's from value, as an `EmailAddressDetails` object. */ getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Provides basic details about the notification message that raised the `Office.EventType.InfobarClicked` event. * * @remarks * [Api set: Mailbox 1.10] */ interface InfobarClickedEventArgs { /** * Gets additional details about the notification message. * * @remarks * [Api set: Mailbox 1.10] */ infobarDetails: InfobarDetails; /** * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. * * @remarks * [Api set: Mailbox 1.10] */ type: "olkInfobarClicked"; } /** * Provides additional details about the notification message that raised the `Office.EventType.InfobarClicked` event. * * @remarks * [Api set: Mailbox 1.10] */ interface InfobarDetails { /** * The action type. Currently, "Dismiss" is the only supported action. * * @remarks * [Api set: Mailbox 1.10] */ actionType: MailboxEnums.InfobarActionType; /** * The notification type. * * @remarks * [Api set: Mailbox 1.10] */ infobarType: MailboxEnums.InfobarType; } /** * The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange * and is converted to a MIME message. * * Internet headers are stored as string key-value pairs on a per-item basis. * * **Note**: This object is intended for you to set and get your custom headers on a message item. To learn more, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8] * * **Recommended practices** * * Currently, internet headers are a finite resource on a user's mailbox. When the quota is exhausted, you can't create any more internet headers * on that mailbox, which can result in unexpected behavior from clients that rely on this to function. * * Apply the following guidelines when you create internet headers in your add-in. * * - Create the minimum number of headers required. The header quota is based on the total size of headers applied to a message. In Exchange Online, * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. * For further information on header limits, see * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. * * - Name headers so that you can reuse and update their values later. As such, avoid naming headers in a variable manner * (for example, based on user input, timestamp, etc.). * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface InternetHeaders { /** * Given an array of internet header names, this method returns a record containing those internet headers and their values. * If the add-in requests a header that isn't available, that header won't be returned in the results. * * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param names - The names of the internet headers to be returned. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. */ getAsync(names: string[], options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult>) => void): void; /** * Given an array of internet header names, this method returns a record containing those internet headers and their values. * If the add-in requests a header that isn't available, that header won't be returned in the results. * * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param names - The names of the internet headers to be returned. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. */ getAsync(names: string[], callback: (asyncResult: Office.AsyncResult>) => void): void; /** * Given an array of internet header names, this method removes the specified headers from the internet header collection. * * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param names - The names of the internet headers to be removed. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. */ removeAsync(names: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Given an array of internet header names, this method removes the specified headers from the internet header collection. * * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param names - The names of the internet headers to be removed. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. */ removeAsync(names: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the specified internet headers to the specified values. * * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with * the new value. * * **Note**: This method is intended to set the values of your custom headers. * * **Important**: The header quota is based on the total size of headers applied to a message. In Exchange Online, * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. * For further information on header limits, see * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names * and values being the corresponding header value strings. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. */ setAsync(headers: Record, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the specified internet headers to the specified values. * * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with * the new value. * * **Note**: This method is intended to set the values of your custom headers. * * **Important**: The header quota is based on the total size of headers applied to a message. In Exchange Online, * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. * For further information on header limits, see * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names * and values being the corresponding header value strings. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. */ setAsync(headers: Record, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * The item namespace is used to access the currently selected message, meeting request, or appointment. * You can determine the type of the item by using the `itemType` property. * * To see the full member list, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: * * - {@link Office.AppointmentCompose | AppointmentCompose} * * - {@link Office.AppointmentRead | AppointmentRead} * * - {@link Office.MessageCompose | MessageCompose} * * - {@link Office.MessageRead | MessageRead} * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer, Appointment Attendee, Message Compose, Message Read */ interface Item { } /** * The compose mode of {@link Office.Item | Office.context.mailbox.item}. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Child interfaces: * * - {@link Office.AppointmentCompose | AppointmentCompose} * * - {@link Office.MessageCompose | MessageCompose} */ interface ItemCompose extends Item { } /** * The read mode of {@link Office.Item | Office.context.mailbox.item}. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Child interfaces: * * - {@link Office.AppointmentRead | AppointmentRead} * * - {@link Office.MessageRead | MessageRead} */ interface ItemRead extends Item { } /** * Represents a date and time in the local client's time zone. Read mode only. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read */ interface LocalClientTime { /** * Integer value representing the month, beginning with 0 for January to 11 for December. */ month: number; /** * Integer value representing the day of the month. */ date: number; /** * Integer value representing the year. */ year: number; /** * Integer value representing the hour on a 24-hour clock. */ hours: number; /** * Integer value representing the minutes. */ minutes: number; /** * Integer value representing the seconds. */ seconds: number; /** * Integer value representing the milliseconds. */ milliseconds: number; /** * Integer value representing the number of minutes difference between the local time zone and UTC. */ timezoneOffset: number; } /** * Provides methods to get and set the location of a meeting in an Outlook add-in. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface Location { /** * Gets the location of an appointment. * * The `getAsync` method starts an asynchronous call to the Exchange server to get the location of an appointment. * The location of the appointment is provided as a string in the `asyncResult.value` property. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the location of an appointment. * * The `getAsync` method starts an asynchronous call to the Exchange server to get the location of an appointment. * The location of the appointment is provided as a string in the `asyncResult.value` property. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the location of an appointment. * * The `setAsync` method starts an asynchronous call to the Exchange server to set the location of an appointment. * Setting the location of an appointment overwrites the current location. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. * * @param location - The location of the appointment. The string is limited to 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If setting the location fails, the `asyncResult.error` property will contain an error code. */ setAsync(location: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the location of an appointment. * * The `setAsync` method starts an asynchronous call to the Exchange server to set the location of an appointment. * Setting the location of an appointment overwrites the current location. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. * * @param location - The location of the appointment. The string is limited to 255 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If setting the location fails, the `asyncResult.error` property will contain an error code. */ setAsync(location: string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents a location. Read-only. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ export interface LocationDetails { /** * The `LocationIdentifier` of the location. */ locationIdentifier: LocationIdentifier; /** * The location's display name. */ displayName: string; /** * The email address associated with the location. Only locations of type `Room` have an email address. */ emailAddress: string; } /** * Represents the ID of a location. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface LocationIdentifier { /** * The location's unique ID. * * For `Room` type, it's the room's email address. * * For `Custom` type, it's the `displayName`. */ id: string; /** * The location's type. */ type: MailboxEnums.LocationType | string; } /** * Provides access to the Microsoft Outlook add-in object model. * * Key properties: * * - `diagnostics`: Provides diagnostic information to an Outlook add-in. * * - `item`: Provides methods and properties for accessing a message or appointment in an Outlook add-in. * * - `userProfile`: Provides information about the user in an Outlook add-in. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface Mailbox { /** * Provides diagnostic information to an Outlook add-in. * * Contains the following members. * * - `hostName` (string): A string that represents the name of the Office application. * It should be one of the following values: `Outlook`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. * **Note**: The "Outlook" value is returned for Outlook on desktop clients (i.e., Windows and Mac). * * - `hostVersion` (string): A string that represents the version of either the Office application or the Exchange Server (e.g., "15.0.468.0"). * If the mail add-in is running in Outlook on desktop or on mobile clients, the `hostVersion` property returns the version of the * application, Outlook. In Outlook on the web, the property returns the version of the Exchange Server. * * - `OWAView` (`MailboxEnums.OWAView` or string): An enum (or string literal) that represents the current view of Outlook on the web. * If the application is not Outlook on the web, then accessing this property results in undefined. * Outlook on the web has three views (`OneColumn` - displayed when the screen is narrow, `TwoColumns` - displayed when the screen is wider, * and `ThreeColumns` - displayed when the screen is wide) that correspond to the width of the screen and the window, and the number of columns * that can be displayed. * * More information is under {@link Office.Diagnostics}. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * Starting with Mailbox requirement set 1.5, you can also use the * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-1.5&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} * property to get similar information. */ diagnostics: Diagnostics; /** * Gets the URL of the Exchange Web Services (EWS) endpoint for this email account. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - Your app must have the **read item** permission specified in its manifest to call the `ewsUrl` member in read mode. * * - In compose mode, you must call the `saveAsync` method before you can use the `ewsUrl` member. * Your app must have **read/write item** permissions to call the `saveAsync` method. * * - This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - The `ewsUrl` value can be used by a remote service to make EWS calls to the user's mailbox. * For example, you can create a remote service to {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. */ ewsUrl: string; /** * The mailbox item. Depending on the context in which the add-in opened, the item type may vary. * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: * * {@link Office.MessageCompose | MessageCompose}, {@link Office.MessageRead | MessageRead}, * {@link Office.AppointmentCompose | AppointmentCompose}, {@link Office.AppointmentRead | AppointmentRead} * * **Important**: `item` can be null if your add-in supports pinning the task pane. For details on how to handle, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/pinnable-taskpane#implement-the-event-handler | Implement a pinnable task pane in Outlook}. */ item?: Item & ItemCompose & ItemRead & Message & MessageCompose & MessageRead & Appointment & AppointmentCompose & AppointmentRead; /** * Gets an object that provides methods to manage the categories master list associated with a mailbox. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ masterCategories: MasterCategories; /** * Gets the URL of the REST endpoint for this email account. * * Your app must have the **read item** permission specified in its manifest to call the `restUrl` member in read mode. * * In compose mode you must call the `saveAsync` method before you can use the `restUrl` member. * Your app must have **read/write item** permissions to call the `saveAsync` method. * * However, in delegate or shared scenarios, you should instead use the `targetRestUrl` property of the * {@link https://learn.microsoft.com/javascript/api/outlook/office.sharedproperties?view=outlook-js-1.8 | SharedProperties} object * (introduced in requirement set 1.8). For more information, see the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | delegate access} article. * * @remarks * [Api set: Mailbox 1.5] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * The `restUrl` value can be used to make {@link https://learn.microsoft.com/outlook/rest/ | REST API} calls to the user's mailbox. */ restUrl: string; /** * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. * * More information is under {@link Office.UserProfile} */ userProfile: UserProfile; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param options - Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Converts a supported ID into the Exchange Web Services (EWS) format. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - Item IDs retrieved via a REST API (such as the Outlook Mail API or the Microsoft Graph) use a different format than the format used by EWS. * The `convertToEwsId` method converts a REST-formatted ID into the proper format for EWS. * * @param id - The ID to be converted into EWS format. This string can be an item ID formatted for the Outlook REST APIs or a conversation ID retrieved from * `Office.context.mailbox.item.conversationId`. * @param restVersion - A value indicating the version of the Outlook REST API used to retrieve the item ID. */ convertToEwsId(id: string, restVersion: MailboxEnums.RestVersion | string): string; /** * Gets a dictionary containing time information in local client time. * * The dates and times used by a mail app for Outlook on the web or on desktop clients can use different time zones. * Outlook uses the client computer time zone; Outlook on the web uses the time zone set on the Exchange Admin Center (EAC). * You should handle date and time values so that the values you display on the user interface are always consistent with the time zone that * the user expects. * * If the mail app is running in Outlook on desktop clients, the `convertToLocalClientTime` method will return a dictionary object * with the values set to the client computer time zone. * If the mail app is running in Outlook on the web, the `convertToLocalClientTime` method will return a dictionary object * with the values set to the time zone specified in the EAC. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param timeValue - A `Date` object. */ convertToLocalClientTime(timeValue: Date): LocalClientTime; /** * Converts a supported ID into REST format. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - Item IDs retrieved via Exchange Web Services (EWS) or via the `itemId` property use a different format than the format used by REST APIs (such as the * {@link https://learn.microsoft.com/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations | Outlook Mail API} * or the {@link https://graph.microsoft.io/ | Microsoft Graph}). * The `convertToRestId` method converts an EWS-formatted ID into the proper format for REST. * * @param id - The ID to be converted into REST format. This string can be an item ID formatted for EWS that's usually retrieved from * `Office.context.mailbox.item.itemId`, a conversation ID retrieved from `Office.context.mailbox.item.conversationId`, or a * series ID retrieved from `Office.context.mailbox.item.seriesId`. * @param restVersion - A value indicating the version of the Outlook REST API used with the converted ID. */ convertToRestId(id: string, restVersion: MailboxEnums.RestVersion | string): string; /** * Gets a `Date` object from a dictionary containing time information. * * The `convertToUtcClientTime` method converts a dictionary containing a local date and time to a `Date` object with the correct values for the * local date and time. * * @returns A Date object with the time expressed in UTC. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param input - The local time value to convert. */ convertToUtcClientTime(input: LocalClientTime): Date; /** * Displays an existing calendar appointment. * * The `displayAppointmentForm` method opens an existing calendar appointment in a new window on the desktop. * * In Outlook on Mac, you can use this method to display a single appointment that isn't part of a recurring series, or the master appointment * of a recurring series. However, you can't display an instance of the series because you can't access the properties * (including the item ID) of instances of a recurring series. * * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. * * If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and * no error message is returned. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. */ displayAppointmentForm(itemId: string): void; /** * Displays an existing calendar appointment. * * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on * mobile devices. * * In Outlook on Mac, you can use this method to display a single appointment that is not part of a recurring series, or the master appointment * of a recurring series. However, you can't display an instance of the series because you can't access the properties * (including the item ID) of instances of a recurring series. * * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. * * If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and * no error message is returned. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayAppointmentFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays an existing calendar appointment. * * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on * mobile devices. * * In Outlook on Mac, you can use this method to display a single appointment that is not part of a recurring series, or the master appointment * of a recurring series. However, you can't display an instance of the series because you can't access the properties * (including the item ID) of instances of a recurring series. * * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. * * If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and * no error message is returned. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayAppointmentFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays an existing message. * * The `displayMessageForm` method opens an existing message in a new window on the desktop. * * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. * * If the specified item identifier doesn't identify an existing message, no message will be displayed on the client computer, and * no error message is returned. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - Don't use the `displayMessageForm` with an itemId that represents an appointment. Use the `displayAppointmentForm` method to display * an existing appointment, and `displayNewAppointmentForm` to display a form to create a new appointment. * * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. */ displayMessageForm(itemId: string): void; /** * Displays an existing message. * * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. * * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. * * If the specified item identifier does not identify an existing message, no message will be displayed on the client computer, and * no error message is returned. * * Don't use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayMessageFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays an existing message. * * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. * * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. * * If the specified item identifier does not identify an existing message, no message will be displayed on the client computer, and * no error message is returned. * * Don't use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayMessageFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a form for creating a new calendar appointment. * * The `displayNewAppointmentForm` method opens a form that enables the user to create a new appointment or meeting. * If parameters are specified, the appointment form fields are automatically populated with the contents of the parameters. * * In Outlook on the web, this method always displays a form with an attendees field. * If you don't specify any attendees as input arguments, the method displays a form with a **Save** button. * If you have specified attendees, the form would include the attendees and a **Send** button. * * In the Outlook rich client and Outlook RT, if you specify any attendees or resources in the `requiredAttendees`, `optionalAttendees`, or * `resources` parameter, this method displays a meeting form with a **Send** button. * If you don't specify any recipients, this method displays an appointment form with a **Save & Close** button. * * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. */ displayNewAppointmentForm(parameters: AppointmentForm): void; /** * Displays a form for creating a new calendar appointment. * * The `displayNewAppointmentFormAsync` method opens a form that enables the user to create a new appointment or meeting. * If parameters are specified, the appointment form fields are automatically populated with the contents of the parameters. * * In Outlook on the web, this method always displays a form with an attendees field. * If you do not specify any attendees as input arguments, the method displays a form with a **Save** button. * If you have specified attendees, the form would include the attendees and a **Send** button. * * In the Outlook rich client and Outlook RT, if you specify any attendees or resources in the `requiredAttendees`, `optionalAttendees`, or * `resources` parameter, this method displays a meeting form with a **Send** button. * If you don't specify any recipients, this method displays an appointment form with a **Save & Close** button. * * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayNewAppointmentFormAsync(parameters: AppointmentForm, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a form for creating a new calendar appointment. * * The `displayNewAppointmentFormAsync` method opens a form that enables the user to create a new appointment or meeting. * If parameters are specified, the appointment form fields are automatically populated with the contents of the parameters. * * In Outlook on the web, this method always displays a form with an attendees field. * If you do not specify any attendees as input arguments, the method displays a form with a **Save** button. * If you have specified attendees, the form would include the attendees and a **Send** button. * * In the Outlook rich client and Outlook RT, if you specify any attendees or resources in the `requiredAttendees`, `optionalAttendees`, or * `resources` parameter, this method displays a meeting form with a **Send** button. * If you don't specify any recipients, this method displays an appointment form with a **Save & Close** button. * * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayNewAppointmentFormAsync(parameters: AppointmentForm, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a form for creating a new message. * * The `displayNewMessageForm` method opens a form that enables the user to create a new message. If parameters are specified, the message form * fields are automatically populated with the contents of the parameters. * * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. * * @remarks * [Api set: Mailbox 1.6] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * @param parameters - A dictionary containing all values to be filled in for the user in the new form. All parameters are optional. * * `toRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **To** line. The array is limited to a maximum of 100 entries. * * `ccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **Cc** line. The array is limited to a maximum of 100 entries. * * `bccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **Bcc** line. The array is limited to a maximum of 100 entries. * * `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 characters. * * `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. * * `attachments`: An array of JSON objects that are either file or item attachments. * * `attachments.type`: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. * * `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length. * * `attachments.url`: Only used if type is set to file. The URI of the location for the file. **Important**: This link must be * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can * be accessible on a private network as long as it doesn't need further authentication. * * `attachments.isInline`: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the * message body, and should not be displayed in the attachment list. * * `attachments.itemId`: Only used if type is set to item. The EWS item ID of the existing e-mail you want to attach to the new message. * This is a string up to 100 characters. */ displayNewMessageForm(parameters: any): void; /** * Displays a form for creating a new message. * * The `displayNewMessageFormAsync` method opens a form that enables the user to create a new message. * If parameters are specified, the message form fields are automatically populated with the contents of the parameters. * * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * @param parameters - A dictionary containing all values to be filled in for the user in the new form. All parameters are optional. * * `toRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **To** line. The array is limited to a maximum of 100 entries. * * `ccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **Cc** line. The array is limited to a maximum of 100 entries. * * `bccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **Bcc** line. The array is limited to a maximum of 100 entries. * * `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 characters. * * `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. * * `attachments`: An array of JSON objects that are either file or item attachments. * * `attachments.type`: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. * * `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length. * * `attachments.url`: Only used if type is set to file. The URI of the location for the file. **Important**: This link must be * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can * be accessible on a private network as long as it doesn't need further authentication. * * `attachments.isInline`: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the * message body, and should not be displayed in the attachment list. * * `attachments.itemId`: Only used if type is set to item. The EWS item ID of the existing e-mail you want to attach to the new message. * This is a string up to 100 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayNewMessageFormAsync(parameters: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a form for creating a new message. * * The `displayNewMessageFormAsync` method opens a form that enables the user to create a new message. * If parameters are specified, the message form fields are automatically populated with the contents of the parameters. * * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * @param parameters - A dictionary containing all values to be filled in for the user in the new form. All parameters are optional. * * `toRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **To** line. The array is limited to a maximum of 100 entries. * * `ccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **Cc** line. The array is limited to a maximum of 100 entries. * * `bccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object * for each of the recipients on the **Bcc** line. The array is limited to a maximum of 100 entries. * * `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 characters. * * `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. * * `attachments`: An array of JSON objects that are either file or item attachments. * * `attachments.type`: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. * * `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length. * * `attachments.url`: Only used if type is set to file. The URI of the location for the file. **Important**: This link must be * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can * be accessible on a private network as long as it doesn't need further authentication. * * `attachments.isInline`: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the * message body, and should not be displayed in the attachment list. * * `attachments.itemId`: Only used if type is set to item. The EWS item ID of the existing e-mail you want to attach to the new message. * This is a string up to 100 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayNewMessageFormAsync(parameters: any, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets a string that contains a token used to call REST APIs or Exchange Web Services (EWS). * * The `getCallbackTokenAsync` method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. * The lifetime of the callback token is 5 minutes. * * The token is returned as a string in the `asyncResult.value` property. * * @remarks * [Api set: Mailbox 1.5] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - In October 2024, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. * Nested app authentication is the recommended approach for tokens going forward. For more information, see our {@link https://aka.ms/NAApreviewblog | blog post} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/faq-nested-app-auth-outlook-legacy-tokens | FAQ page}. * * - This method is only supported in read mode in Outlook on Android and on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - EWS operations aren't supported in add-ins running in Outlook on iOS and on Android. A REST token is always returned in Outlook * mobile clients even if `options.isRest` is set to `false`. * * - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. * * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. * The `saveAsync` method requires a minimum permission level of **read/write item**. * * - For guidance on delegate or shared scenarios, see the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. * * *REST Tokens* * * When a REST token is requested (`options.isRest` = `true`), the resulting token won't work to authenticate EWS calls. * The token will be limited in scope to read-only access to the current item and its attachments, unless the add-in has specified the * **read/write mailbox** permission in its manifest. * If the **read/write mailbox** permission is specified, the resulting token will grant read/write access to mail, calendar, and contacts, * including the ability to send mail. * * The add-in should use the `restUrl` property to determine the correct URL to use when making REST API calls. * * This API works for the following scopes. * * - `Mail.ReadWrite` * * - `Mail.Send` * * - `Calendars.ReadWrite` * * - `Contacts.ReadWrite` * * *EWS Tokens* * * When an EWS token is requested (`options.isRest` = `false`), the resulting token won't work to authenticate REST API calls. * The token will be limited in scope to accessing the current item. * * The add-in should use the `ewsUrl` property to determine the correct URL to use when making EWS calls. * * You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses * the token as a bearer authorization token to call the Exchange Web Services (EWS) * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} operation or * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an * attachment or item. For example, you can create a remote service to * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. * * **Errors**: * * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. * * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. * * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. * * @param options - An object literal that contains one or more of the following properties:- * `isRest`: Determines if the token provided will be used for the Outlook REST APIs or Exchange Web Services. Default value is `false`. * `asyncContext`: Any state data that is passed to the asynchronous method. * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of * type `Office.AsyncResult`. The token is returned as a string in the `asyncResult.value` property. * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. */ getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets a string that contains a token used to get an attachment or item from an Exchange Server. * * The `getCallbackTokenAsync` method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. * The lifetime of the callback token is 5 minutes. * * The token is returned as a string in the `asyncResult.value` property. * * @remarks * [Api set: All support Read mode; Mailbox 1.3 introduced Compose mode support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - In October 2024, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. * Nested app authentication is the recommended approach for tokens going forward. For more information, see our {@link https://aka.ms/NAApreviewblog | blog post} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/faq-nested-app-auth-outlook-legacy-tokens | FAQ page}. * * - You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses * the token as a bearer authorization token to call the Exchange Web Services (EWS) * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} or * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an * attachment or item. For example, you can create a remote service to * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. * * - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. * * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. * The `saveAsync` method requires a minimum permission level of **read/write item**. * * - This method isn't supported in Outlook on Android or on iOS. EWS operations aren't supported in add-ins running in Outlook on mobile clients. * For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - For guidance on delegate or shared scenarios, see the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. * * **Errors**: * * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. * * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. * * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. * * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of * type `Office.AsyncResult`. The token is returned as a string in the `asyncResult.value` property. * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getCallbackTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. * To learn more about item multi-select, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read * * **Important**: This method only applies to messages. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages, such as the item ID and subject, are returned as an array of * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which * messages were selected. */ getSelectedItemsAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. * To learn more about item multi-select, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read * * **Important**: This method only applies to messages. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages, such as the item ID and subject, are returned as an array of * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which * messages were selected. */ getSelectedItemsAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets a token identifying the user and the Office Add-in. * * The token is returned as a string in the `asyncResult.value` property. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - In October 2024, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. * Nested app authentication is the recommended approach for tokens going forward. For more information, see our {@link https://aka.ms/NAApreviewblog | blog post} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/faq-nested-app-auth-outlook-legacy-tokens | FAQ page}. * * - The `getUserIdentityTokenAsync` method returns a token that you can use to identify and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication | authenticate the add-in and user with an external system}. * * **Errors**: * * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. * * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. * * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. * * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of * type `Office.AsyncResult`. * The token is returned as a string in the `asyncResult.value` property. * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * * The `makeEwsRequestAsync` method sends an EWS request on behalf of the add-in to Exchange. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - In October 2024, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. * Nested app authentication is the recommended approach for tokens going forward. For more information, see our {@link https://aka.ms/NAApreviewblog | blog post} and * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/faq-nested-app-auth-outlook-legacy-tokens | FAQ page}. * * - To enable the `makeEwsRequestAsync` method to make EWS requests, the server administrator must set `OAuthAuthentication` to `true` on the * Client Access Server EWS directory . * * - Your add-in must have the **read/write mailbox** permission to use the `makeEwsRequestAsync` method. * For information about using the **read/write mailbox** permission and the EWS operations that you can call with the `makeEwsRequestAsync` method, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Specify permissions for mail add-in access to the user's mailbox}. * * - If your add-in needs to access Folder Associated Items or its XML request must specify UTF-8 encoding (`\`), * it must use Microsoft Graph or REST APIs to access the user's mailbox instead. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - This method isn't supported when the add-in is loaded in a Gmail mailbox. * * - When you use the `makeEwsRequestAsync` method in add-ins that run in Outlook versions earlier than Version 15.0.4535.1004, you must set * the encoding value to ISO-8859-1 (``). To determine the version of an Outlook client, use the * `mailbox.diagnostics.hostVersion` property. You don't need to set the encoding value when your add-in is running in Outlook on the web. * To determine the Outlook client in which your add-in is running, use the `mailbox.diagnostics.hostName` property. * * @param data - The EWS request. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. The XML response of the EWS request is provided as a string * in the `asyncResult.value` property. In Outlook on the web, on Windows (starting in Version 2303 (Build 16225.10000)), * and on Mac (starting in Version 16.73 (23042601)), if the response exceeds 5 MB in size, an error message is returned * in the `asyncResult.error` property. In earlier versions of the Outlook desktop client, an error message is returned if * the response exceeds 1 MB in size. * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ makeEwsRequestAsync(data: any, callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param eventType - The event that should revoke the handler. * @param options - Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param eventType - The event that should revoke the handler. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * The `MailboxEvent` object is passed as an argument to the event handler of an add-in that implements * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}, including * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts}. * It allows the add-in to signify to the Outlook client that it has completed processing an event. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface MailboxEvent { /** * Indicates that the event-based add-in has completed processing an event. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param options - Optional. An object that specifies the behavior of an event-based add-in when it completes processing an event. */ completed(options?: SmartAlertsEventCompletedOptions): void; } /** * Represents the categories master list on the mailbox. * * In Outlook, a user can tag messages and appointments by using a category to color-code them. * The user defines categories in a master list on their mailbox. They can then apply one or more categories to an item. * * **Important**: In delegate or shared scenarios, the delegate can get the categories in the master list but can't add or remove categories. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface MasterCategories { /** * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Errors**: * * - `DuplicateCategory`: One of the categories provided is already in the master category list. * * - `PermissionDenied`: The user does not have permission to perform this action. * * @param categories - The categories to be added to the master list on the mailbox. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ addAsync(categories: CategoryDetails[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Errors**: * * - `DuplicateCategory`: One of the categories provided is already in the master category list. * * - `PermissionDenied`: The user does not have permission to perform this action. * * @param categories - The categories to be added to the master list on the mailbox. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ addAsync(categories: CategoryDetails[], callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the master list of categories on a mailbox. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If adding categories fails, the `asyncResult.error` property will contain an error code. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the master list of categories on a mailbox. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Removes categories from the master list on a mailbox. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Errors**: * * - `PermissionDenied`: The user does not have permission to perform this action. * * @param categories - The categories to be removed from the master list on the mailbox. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. */ removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes categories from the master list on a mailbox. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Errors**: * * - `PermissionDenied`: The user does not have permission to perform this action. * * @param categories - The categories to be removed from the master list on the mailbox. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. */ removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents a suggested meeting found in an item. Read mode only. * * The list of meetings suggested in an email message is returned in the `meetingSuggestions` property of the `Entities` object that is returned when * the `getEntities` or `getEntitiesByType` method is called on the active item. * * The start and end values are string representations of a `Date` object that contains the date and time at which the suggested meeting is to * begin and end. The values are in the default time zone specified for the current user. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * **Important**: Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. The work to retire this feature will start in May and continue * until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * The following APIs will also be retired. * * - `Office.context.mailbox.item.getEntities` * - `Office.context.mailbox.item.getEntitiesByType` * - `Office.context.mailbox.item.getFilteredEntitiesByName` * - `Office.context.mailbox.item.getSelectedEntities` * * To help minimize potential disruptions, the following will still be supported after entity-based contextual add-ins are retired. * * - An alternative implementation of the **Join Meeting** button, which is activated by online meeting add-ins, is being developed. Once support for * entity-based contextual add-ins ends, online meeting add-ins will automatically transition to the alternative implementation to activate the * **Join Meeting** button. * * - Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * * For more information, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. */ interface MeetingSuggestion { /** * Gets the attendees for a suggested meeting. */ attendees: EmailUser[]; /** * Gets the date and time that a suggested meeting is to end. */ end: string; /** * Gets the location of a suggested meeting. */ location: string; /** * Gets a string that was identified as a meeting suggestion. */ meetingString: string; /** * Gets the date and time that a suggested meeting is to begin. */ start: string; /** * Gets the subject of a suggested meeting. */ subject: string; } /** * A subclass of {@link Office.Item | Item} for messages. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Child interfaces: * * - {@link Office.MessageCompose | MessageCompose} * * - {@link Office.MessageRead | MessageRead} */ interface Message extends Item { } /** * The message compose mode of {@link Office.Item | Office.context.mailbox.item}. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Parent interfaces: * * - {@link Office.ItemCompose | ItemCompose} * * - {@link Office.Message | Message} */ interface MessageCompose extends Message, ItemCompose { /** * Gets an object that provides methods to get or update the recipients on the **Bcc** (blind carbon copy) line of a message. * * Depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients you can get or update. * See the {@link Office.Recipients | Recipients} object for more details. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ bcc: Recipients; /** * Gets an object that provides methods for manipulating the body of an item. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ body: Body; /** * Gets an object that provides methods for managing the item's categories. * * **Important**: In Outlook on the web, you can't use the API to manage categories on a message in Compose mode. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ categories: Categories; /** * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the * current item. * * The `cc` property returns a `Recipients` object that provides methods to get or update the recipients on the * **Cc** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ cc: Recipients; /** * Gets an identifier for the email conversation that contains a particular message. * * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change * and that value you obtained earlier will no longer apply. * * You get null for this property for a new item in a compose form. * If the user sets a subject and saves the item, the `conversationId` property will return a value. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ conversationId: string; /** * Gets or sets the delayed delivery date and time of a message. * * The `delayDeliveryTime` property returns a `DelayDeliveryTime` object that provides methods to manage the delivery date and time of the message. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ delayDeliveryTime: DelayDeliveryTime; /** * Gets the email address of the sender of a message. * * The `from` property returns a `From` object that provides a method to get the from value. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: This property is supported in Outlook on Android and on iOS. For a sample scenario, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. */ from: From; /** * Gets or sets the custom internet headers of a message. * * The `internetHeaders` property returns an `InternetHeaders` object that provides methods to manage the internet headers on the message. * * To learn more, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ internetHeaders: InternetHeaders; /** * Gets the type of item that an instance represents. * * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or * an appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ itemType: MailboxEnums.ItemType | string; /** * Gets the notification messages for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ notificationMessages: NotificationMessages; /** * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of a message. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. */ sensitivityLabel: SensitivityLabel; /** * Gets the ID of the series that an instance belongs to. * * In Outlook on the web and on desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item * that this item belongs to. However, on iOS and Android, the seriesId returns the REST ID of the parent item. * * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. * * The `seriesId` property returns `null` for items that do not have parent items such as single appointments, series items, or meeting requests * and returns `undefined` for any other items that are not meeting requests. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ seriesId: string; /** * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. * * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ sessionData: SessionData; /** * Gets or sets the description that appears in the subject field of an item. * * The `subject` property gets or sets the entire subject of the item, as sent by the email server. * * The `subject` property returns a `Subject` object that provides methods to get and set the subject. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ subject: Subject; /** * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the * current item. * * The `to` property returns a `Recipients` object that provides methods to get or update the recipients on the * **To** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ to: Recipients; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API * introduced with requirement set 1.8. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `isInline`: If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the * attachment list. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of * the error. */ addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API * introduced with requirement set 1.8. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of * the error. */ addFileAttachmentAsync(uri: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. * This method returns the attachment identifier in the `asyncResult.value` object. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: * * - Adding an inline Base64 file to a message in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. * * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `isInline`: If true, indicates that the attachment will be shown inline in the message body and should not be displayed in the attachment list. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type Office.AsyncResult. On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of the error. */ addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a file to a message or appointment as an attachment. * * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. * This method returns the attachment identifier in the `asyncResult.value` object. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: * * - Adding an inline Base64 file to a message in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. * * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. * * **Errors**: * * - `AttachmentSizeExceeded`: The attachment is larger than allowed. * * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type Office.AsyncResult. On success, the attachment identifier will be provided in the `asyncResult.value` property. * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of the error. */ addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an Exchange item, such as a message, as an attachment to the message or appointment. * * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the * callback function, if needed. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * If your Office Add-in is running in Outlook on the web, the `addItemAttachmentAsync` method can attach items to items other than the item that * you are editing; however, this is not supported and is not recommended. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. * If adding the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of * the error. */ addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an Exchange item, such as a message, as an attachment to the message or appointment. * * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the * callback function, if needed. * * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. * * If your Office Add-in is running in Outlook on the web, the `addItemAttachmentAsync` method can attach items to items other than the item that * you are editing; however, this is not supported and is not recommended. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. * * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. * If adding the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of * the error. */ addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Closes the current item that is being composed. * * The behavior of the `close` method depends on the current state of the item being composed. * If the item has unsaved changes, the client prompts the user to save, discard, or close the action. * * In the Outlook desktop client, the `close` method has no effect on a reply in the Reading Pane. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: In Outlook on the web, if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save, * discard, or cancel even if no changes have occurred since the item was last saved. */ close(): void; /** * Disables the Outlook client signature. * * The behavior of this method depends on which client the add-in is running. * * - In Outlook on the web, the signature option for new mails, replies, and forwards is disabled. * A signature that's selected is also disabled by the method. * * - In Outlook on Windows and on Mac, the signature under the **New messages** and **Replies/forwards** sections * of the sending account is set to **(none)**. * * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. * For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Disables the Outlook client signature. * * The behavior of this method depends on which client the add-in is running. * * - In Outlook on the web, the signature option for new mails, replies, and forwards is disabled. * A signature that's selected is also disabled by the method. * * - In Outlook on Windows and on Mac, the signature under the **New messages** and **Replies/forwards** sections * of the sending account is set to **(none)**. * * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. * For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. * In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. * In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the item's attachments as an array. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for * the failure. */ getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the item's attachments as an array. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for * the failure. */ getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. * The coercion type can be HTML or plain text. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: This method is supported in Outlook on Android and on iOS starting in Version 4.2352.0. * For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type * and coercion type. * * @returns * An object with `ComposeType` and `CoercionType` enum values for the message item. */ getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. * The coercion type can be HTML or plain text. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: This method is supported in Outlook on Android and on iOS starting in Version 4.2352.0. * For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type * and coercion type. * * @returns * An object with `ComposeType` and `CoercionType` enum values for the message item. */ getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously gets the ID of a saved item. * * When invoked, this method returns the item ID via the callback function. * * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API), * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. * Until the item is synced, the `itemId` is not recognized and using it returns an error. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously gets the ID of a saved item. * * When invoked, this method returns the item ID via the callback function. * * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API), * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. * Until the item is synced, the `itemId` is not recognized and using it returns an error. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously returns selected data from the subject or body of a message. * * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. * * To access the selected data from the callback function, call `asyncResult.value.data`. * To access the source property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. * * @returns * The selected data as a string with format determined by `coercionType`. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. * If `Html`, the method returns the selected text, whether it is plaintext or HTML. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ getSelectedDataAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously returns selected data from the subject or body of a message. * * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. * * To access the selected data from the callback function, call `asyncResult.value.data`. * To access the source property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. * * @returns * The selected data as a string with format determined by `coercionType`. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. * If `Html`, the method returns the selected text, whether it is plaintext or HTML. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ getSelectedDataAsync(coercionType: Office.CoercionType | string, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows unless the following conditions are met. * * a. **Delegate access/Shared folders** * * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. * * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. * * 3. The delegate opens the draft from the shared folder then continues composing. * * b. **Shared mailbox (applies to Outlook on Windows only)** * * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. * * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. * * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. * * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. * After the message has been sent, it's usually found in the sender's **Sent Items** folder. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows unless the following conditions are met. * * a. **Delegate access/Shared folders** * * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. * * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. * * 3. The delegate opens the draft from the shared folder then continues composing. * * b. **Shared mailbox (applies to Outlook on Windows only)** * * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. * * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. * * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. * * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. * After the message has been sent, it's usually found in the sender's **Sent Items** folder. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets if the client signature is enabled. * * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set * to a template for the sending Outlook account. * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the web, the API call should return `false`. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets if the client signature is enabled. * * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set * to a template for the sending Outlook account. * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the web, the API call should return `false`. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously loads custom properties for this add-in on the selected item. * * Custom properties are stored as key-value pairs on a per-app, per-item basis. * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. * * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. * This object can be used to get, set, save, and remove custom properties from the mail item. * * @remarks * [Api set: Mailbox 1.1] * * To learn more about custom properties, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. */ loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Removes an attachment from a message or appointment. * * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` * is 200 characters in Outlook on the web and on Windows. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` property will contain an error code * with the reason for the failure. */ removeAttachmentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes an attachment from a message or appointment. * * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` * is 200 characters in Outlook on the web and on Windows. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` property will contain an error code * with the reason for the failure. */ removeAttachmentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param eventType - The event that should revoke the handler. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * @param eventType - The event that should revoke the handler. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously saves the current message as a draft. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: * * - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. * * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. * * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. * Until the item is synced, using the item ID will return an error. * * - In Outlook on the web, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The message ID is returned in the `asyncResult.value` property. */ saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously saves the current message as a draft. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Important**: * * - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. * * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. * * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. * Until the item is synced, using the item ID will return an error. * * - In Outlook on the web, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The message ID is returned in the `asyncResult.value` property. */ saveAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously inserts data into the body or subject of a message. * * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. * After insertion, the cursor is placed at the end of the inserted content. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * `coercionType`: If text, the current style is applied in Outlook on the web and on desktop clients. * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook on the web and the default style is * applied in Outlook on desktop clients. If the field is a text field, an `InvalidDataFormat` error is returned. * If `coercionType` is not set, the result depends on the field: * if the field is HTML then HTML is used; if the field is text, then plain text is used. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously inserts data into the body or subject of a message. * * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. * After insertion, the cursor is placed at the end of the inserted content. * * @remarks * [Api set: Mailbox 1.2] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * * **Errors**: * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * The message read mode of {@link Office.Item | Office.context.mailbox.item}. * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item | Object Model} page. * * Parent interfaces: * * - {@link Office.ItemRead | ItemRead} * * - {@link Office.Message | Message} */ interface MessageRead extends Message, ItemRead { /** * Gets the item's attachments as an array. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. * For more information, see * {@link https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. * */ attachments: AttachmentDetails[]; /** * Gets an object that provides methods for manipulating the body of an item. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ body: Body; /** * Gets an object that provides methods for managing the item's categories. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ categories: Categories; /** * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the * current item. * * The `cc` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for * each recipient listed on the **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. * * - Windows: 500 recipients * * - Android, classic Mac UI, iOS: 100 recipients * * - Web browser: 20 recipients * * - New Mac UI: No limit * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ cc: EmailAddressDetails[]; /** * Gets an identifier for the email conversation that contains a particular message. * * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change * and that value you obtained earlier will no longer apply. * * You get null for this property for a new item in a compose form. * If the user sets a subject and saves the item, the `conversationId` property will return a value. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ conversationId: string; /** * Gets the date and time that an item was created. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ dateTimeCreated: Date; /** * Gets the date and time that an item was last modified. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. */ dateTimeModified: Date; /** * Gets the date and time that the appointment is to end. * * The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. * * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on * the client to UTC for the server. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ end: Date; /** * Gets the email address of the sender of a message. * * The `from` and `sender` properties represent the same person unless the message is sent by a delegate. * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. * * **Note**: The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined. * * The `from` property returns an `EmailAddressDetails` object. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ from: EmailAddressDetails; /** * Gets the internet message identifier for an email message. * * **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case, * consider using {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get this * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | property from the server}. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ internetMessageId: string; /** * Gets the Exchange Web Services item class of the selected message. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Important**: * * The following table lists the default item classes for messages. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Item classDescription
IPM.NoteNew messages and message replies
IPM.Schedule.Meeting.RequestMeeting requests
IPM.Schedule.Meeting.CanceledMeeting cancellations
IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
* * You can create custom classes that extend a default item class. For example, `IPM.Note.Contoso`. */ itemClass: string; /** * Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier} * for the current item. * * The `itemId` property is not available in compose mode. * If an item identifier is required, the `saveAsync` method can be used to save the item to the store, which will return the item identifier * in the `asyncResult.value` parameter in the callback function. * * **Note**: The identifier returned by the `itemId` property is the same as the * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}. * The `itemId` property is not identical to the Outlook Entry ID or the ID used by the Outlook REST API. * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ itemId: string; /** * Gets the type of item that an instance represents. * * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or * an appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ itemType: MailboxEnums.ItemType | string; /** * Gets the location of a meeting request. * * The `location` property returns a string that contains the location of the appointment. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ location: string; /** * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). * * The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by * email programs. To get the subject of the item with the prefixes intact, use the `subject` property. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ normalizedSubject: string; /** * Gets the notification messages for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ notificationMessages: NotificationMessages; /** * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. * Read and compose modes for appointment items. Read mode for meeting request items. * * The `recurrence` property returns a `Recurrence` object for recurring appointments or meetings requests if an item is a series or an instance * in a series. `null` is returned for single appointments and meeting requests of single appointments. * `undefined` is returned for messages that are not meeting requests. * * **Note**: Meeting requests have an itemClass value of `IPM.Schedule.Meeting.Request`. * * **Note**: If the `recurrence` object is null, this indicates that the object is a single appointment or a meeting request of a single appointment * and NOT a part of a series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ recurrence: Recurrence; /** * Gets the ID of the series that an instance belongs to. * * In Outlook on the web and on desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item * that this item belongs to. However, on iOS and Android, the `seriesId` returns the REST ID of the parent item. * * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. * * The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests * and returns `undefined` for any other items that aren't meeting requests. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ seriesId: string; /** * Gets the email address of the sender of an email message. * * The `from` and `sender` properties represent the same person unless the message is sent by a delegate. * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. * * **Note**: The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ sender: EmailAddressDetails; /** * Gets the date and time that the appointment is to begin. * * The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ start: Date; /** * Gets the description that appears in the subject field of an item. * * The `subject` property gets or sets the entire subject of the item, as sent by the email server. * * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ subject: string; /** * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the * current item. * * The `to` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for * each recipient listed on the **To** line of the message. The maximum number of recipients returned varies per Outlook client. * * - Windows: 500 recipients * * - Android, classic Mac UI, iOS: 100 recipients * * - Web browser: 20 recipients * * - New Mac UI: No limit * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read */ to: EmailAddressDetails[]; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the eventType `parameter` passed to `addHandlerAsync`. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param eventType - The event that should invoke the handler. * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. * The `type` property on the parameter will match the eventType `parameter` passed to `addHandlerAsync`. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the * selected appointment. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. * * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. */ displayReplyAllForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the * selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the * selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Important**: * * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. * * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. */ displayReplyForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. * * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. * * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.9] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets all the internet headers for the message as a string. * * To learn more, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. * On success, the internet headers data is provided in the `asyncResult.value` property as a string. * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. */ getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets all the internet headers for the message as a string. * * To learn more, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. * On success, the internet headers data is provided in the `asyncResult.value` property as a string. * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. */ getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier * to retrieve the attachment. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier * to retrieve the attachment. In Outlook on the web and on mobile devices, the attachment identifier is valid only within the same session. * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to * continue in a separate window. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Errors**: * * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, * or item attachment types other than email or calendar items (such as a contact or task item). * * - `InvalidAttachmentId`: The attachment identifier does not exist. * * @param attachmentId - The identifier of the attachment you want to get. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain * an error code with the reason for the failure. */ getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the entities found in the selected item's body. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getEntities` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. */ getEntities(): Entities; /** * Gets an array of all the entities of the specified entity type found in the selected item's body. * * @returns * If the value passed in `entityType` is not a valid member of the `EntityType` enumeration, the method returns `null`. * If no entities of the specified type are present in the item's body, the method returns an empty array. * Otherwise, the type of the objects in the returned array depends on the type of entity requested in the `entityType` parameter. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getEntitiesByType` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param entityType - One of the `EntityType` enumeration values. * * While the minimum permission level to use this method is **restricted**, some entity types require **read item** to access, as specified in the * following table. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Value of entityTypeType of objects in returned arrayRequired permission level
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
*/ getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array; /** * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file. * * @returns * The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the * manifest XML file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getFilteredEntitiesByName` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. */ getFilteredEntitiesByName(name: string): Array; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. * * @remarks * [Api set: Mailbox 1.8] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) * in the `asyncResult.value` property. */ getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. * * @returns * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule * or the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property * of the item that is specified by that rule. The `PropertyName` simple type defines the supported properties. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. Once retired, contextual add-ins will no longer be able to detect * entities in mail items to perform tasks on them. Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. * Instead, use the `Body.getAsync` method to retrieve the entire body. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. */ getRegExMatches(): any; /** * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. * * @returns * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, * with the specified `RegExName` element value. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee * * **Important**: * * - Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. Once retired, contextual add-ins will no longer be able to detect * entities in mail items to perform tasks on them. Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. * Instead, use the `Body.getAsync` method to retrieve the entire body. * * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. */ getRegExMatchesByName(name: string): string[]; /** * Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins. * * **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @remarks * [Api set: Mailbox 1.6] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Important**: * * - Entity-based contextual Outlook add-ins, including the `getSelectedEntities` method, will be retired in Q2 of 2024. The work to retire this method will * start in May and continue until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual Outlook add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. */ getSelectedEntities(): Entities; /** * Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file. * Highlighted matches apply to contextual add-ins. * * @returns * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule or * the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur * in the property of the item that is specified by that rule. The `PropertyName` simple type defines the supported properties. * * @remarks * [Api set: Mailbox 1.6] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Important**: * * - Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. Once retired, contextual add-ins will no longer be able to detect * entities in mail items to perform tasks on them. Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * To learn more about the retirement of entity-based contextual add-ins, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. * * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365 (preview)}. * * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body * and shouldn't attempt to return the entire body of the item. Using a regular expression such as .* to obtain the entire body of an item doesn't always return the * expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. */ getSelectedRegExMatches(): any; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the properties of an appointment or message in a shared folder or shared mailbox. * * For more information around using this API, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * **Note**: This method isn't supported in Outlook on iOS or on Android. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. */ getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously loads custom properties for this add-in on the selected item. * * Custom properties are stored as key-value pairs on a per-app, per-item basis. * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. * * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. * This object can be used to get, set, save, and remove custom properties from the mail item. * * @remarks * [Api set: Mailbox 1.1] * * To learn more about custom properties, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. */ loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param eventType - The event that should revoke the handler. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.13/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read * * @param eventType - The event that should revoke the handler. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * The definition of the action for a notification message. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: In modern Outlook on the web, the `NotificationMessageAction` object is available in Compose mode only. */ interface NotificationMessageAction { /** * The type of action to be performed. * `ActionType.ShowTaskPane` is the only supported action. */ actionType: string | MailboxEnums.ActionType; /** * The text of the action link. */ actionText: string; /** * The button defined in the manifest. */ commandId: string; /** * Any JSON data the action button needs to pass on to the add-in. * * @remarks * * **Important**: * * - In Outlook on Windows, the `any` type is supported starting in Version 2402 (Build 17308.20000). In earlier versions of Outlook on Windows, only the `string` * type is supported. * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. */ contextData: any; } /** * An array of `NotificationMessageDetails` objects are returned by the `NotificationMessages.getAllAsync` method. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface NotificationMessageDetails { /** * The identifier for the notification message. */ key?: string; /** * Specifies the `ItemNotificationMessageType` of message. * * If type is `ProgressIndicator` or `ErrorMessage`, an icon is automatically supplied * and the message is not persistent. Therefore the icon and persistent properties are not valid for these types of messages. * Including them will result in an `ArgumentException`. * * If type is `ProgressIndicator`, the developer should remove or replace the progress indicator when the action is complete. * * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. */ type: MailboxEnums.ItemNotificationMessageType | string; /** * A reference to an icon that is defined in the manifest. It appears in the infobar area. * It is applicable if the type is `InformationalMessage`, and is required if the type is `InsightMessage`. * Specifying this parameter for an unsupported type results in an exception. * * **Note**: At present, the custom icon is displayed in Outlook on Windows only and not on other clients (e.g., Mac, web browser). */ icon?: string; /** * The text of the notification message. Maximum length is 150 characters. * If the developer passes in a longer string, an `ArgumentOutOfRange` exception is thrown. */ message: string; /** * Specifies if the message should be persistent. Only applicable when type is `InformationalMessage`. * If true, the message remains until removed by this add-in or dismissed by the user. * If false, it is removed when the user navigates to a different item. * For error notifications, the message persists until the user sees it once. * Specifying this parameter for an unsupported type throws an exception. */ persistent?: Boolean; /** * Specifies actions for the message. Limit: 1 action. This limit doesn't count the "Dismiss" action which is included by default. * Only applicable when the type is `InsightMessage`. * Specifying this property for an unsupported type or including too many actions throws an error. * * **Important**: In modern Outlook on the web, the `actions` property is available in Compose mode only. * * @remarks * [Api set: Mailbox 1.10] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ actions?: NotificationMessageAction[]; } /** * The `NotificationMessages` object is returned as the `notificationMessages` property of an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface NotificationMessages { /** * Adds a notification to an item. * * There are a maximum of 5 notifications per message. Setting more will return a `NumberOfNotificationMessagesExceeded` error. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} * is allowed per add-in. Attempting to add more will throw an error. * * - In modern Outlook on the web, you can add an `InsightMessage` notification only in Compose mode. * * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. * * @param key - A developer-specified key used to reference this notification message. * Developers can use it to modify this message later. It can't be longer than 32 characters. * @param JSONmessage - A JSON object that contains the notification message to be added to the item. * It contains a `NotificationMessageDetails` object. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ addAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a notification to an item. * * There are a maximum of 5 notifications per message. Setting more will return a `NumberOfNotificationMessagesExceeded` error. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **Important**: * * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} * is allowed per add-in. Attempting to add more will throw an error. * * - In modern Outlook on the web, you can add an `InsightMessage` notification only in Compose mode. * * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. * * @param key - A developer-specified key used to reference this notification message. * Developers can use it to modify this message later. It can't be longer than 32 characters. * @param JSONmessage - A JSON object that contains the notification message to be added to the item. * It contains a `NotificationMessageDetails` object. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ addAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Returns all keys and messages for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. The `value` property of the result is an array of `NotificationMessageDetails` objects. */ getAllAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Returns all keys and messages for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. The `value` property of the result is an array of `NotificationMessageDetails` objects. */ getAllAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes a notification message for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param key - The key for the notification message to remove. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ removeAsync(key: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes a notification message for an item. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param key - The key for the notification message to remove. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ removeAsync(key: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Replaces a notification message that has a given key with another message. * * If a notification message with the specified key doesn't exist, `replaceAsync` will add the notification. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param key - The key for the notification message to replace. It can't be longer than 32 characters. * @param JSONmessage - A JSON object that contains the new notification message to replace the existing message. * It contains a `NotificationMessageDetails` object. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Replaces a notification message that has a given key with another message. * * If a notification message with the specified key doesn't exist, `replaceAsync` will add the notification. * * @remarks * [Api set: Mailbox 1.3] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param key - The key for the notification message to replace. It can't be longer than 32 characters. * @param JSONmessage - A JSON object that contains the new notification message to replace the existing message. * It contains a `NotificationMessageDetails` object. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ replaceAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents the appointment organizer, even if an alias or a delegate was used to create the appointment. * This object provides a method to get the organizer value of an appointment in an Outlook add-in. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface Organizer { /** * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object * in the `asyncResult.value` property. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: A `recipientType` property value isn't returned by the getAsync method. * The appointment organizer is always a user whose email address is on the Exchange server. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `AsyncResult` object. The `value` property of the result is the appointment's organizer value, * as an `EmailAddressDetails` object. */ getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object * in the `asyncResult.value` property. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: A `recipientType` property value isn't returned by the getAsync method. * The appointment organizer is always a user whose email address is on the Exchange server. * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `AsyncResult` object. The `value` property of the result is the appointment's organizer value, * as an `EmailAddressDetails` object. */ getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents a phone number identified in an item. Read mode only. * * An array of `PhoneNumber` objects containing the phone numbers found in an email message is returned in the `phoneNumbers` property of the * `Entities` object that is returned when you call the `getEntities` method on the selected item. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read * * **Important**: Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. The work to retire this feature will start in May and continue * until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. * The following APIs will also be retired. * * - `Office.context.mailbox.item.getEntities` * - `Office.context.mailbox.item.getEntitiesByType` * - `Office.context.mailbox.item.getFilteredEntitiesByName` * - `Office.context.mailbox.item.getSelectedEntities` * * To help minimize potential disruptions, the following will still be supported after entity-based contextual add-ins are retired. * * - An alternative implementation of the **Join Meeting** button, which is activated by online meeting add-ins, is being developed. Once support for * entity-based contextual add-ins ends, online meeting add-ins will automatically transition to the alternative implementation to activate the * **Join Meeting** button. * * - Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-regular-expressions-to-show-an-outlook-add-in | Use regular expression activation rules to show an Outlook add-in}. * * For more information, see * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. */ interface PhoneNumber { /** * Gets a string containing a phone number. This string contains only the digits of the telephone number and excludes characters * like parentheses and hyphens, if they exist in the original item. */ phoneString: string; /** * Gets the text that was identified in an item as a phone number. */ originalPhoneString: string; /** * Gets a string that identifies the type of phone number: Home, Work, Mobile, Unspecified. */ type: string; } /** * Represents recipients of an item. Compose mode only. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface Recipients { /** * Adds a recipient list to the existing recipients for an appointment or message. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on the web, on Windows, * on Mac (classic UI), on Android, and on iOS. However, take note of the following: * * - In Outlook on the web, on Windows, and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. * * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). * * **Errors**: * * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. * * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. If adding the recipients fails, the `asyncResult.error` property will contain an error code. */ addAsync(recipients: Array, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Adds a recipient list to the existing recipients for an appointment or message. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on the web, on Windows, * on Mac (classic UI), on Android, and on iOS. However, take note of the following: * * - In Outlook on the web, on Windows, and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. * * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). * * **Errors**: * * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. * * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. If adding the recipients fails, the `asyncResult.error` property will contain an error code. */ addAsync(recipients: Array, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets a recipient list for an appointment or message. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * The maximum number of recipients returned by this method varies per Outlook client. * * - Windows, web browser, Mac (classic UI): 500 recipients * * - Android, iOS: 100 recipients * * - Mac (new UI): No limit * * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. * * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. * * - A Teams meeting status icon appears before the recipient's name or email address. * * - A semicolon appears after the recipient's name or email address. * * - The recipient's name or email address is underlined or enclosed in a box. * * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from * the auto-complete list. * * In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. For more details, see * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets a recipient list for an appointment or message. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: * * The maximum number of recipients returned by this method varies per Outlook client. * * - Windows, web browser, Mac (classic UI): 500 recipients * * - Android, iOS: 100 recipients * * - Mac (new UI): No limit * * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. * * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. * * - A Teams meeting status icon appears before the recipient's name or email address. * * - A semicolon appears after the recipient's name or email address. * * - The recipient's name or email address is underlined or enclosed in a box. * * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from * the auto-complete list. * * In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. For more details, see * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Sets a recipient list for an appointment or message. * * The `setAsync` method overwrites the current recipient list. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on the web, on Windows, * on Mac (classic UI), on Android, and on iOS. However, take note of the following: * * - In Outlook on the web, on Windows, and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. * * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). * * **Errors**: * * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. * * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If setting the recipients fails the `asyncResult.error` property will contain a code that * indicates any error that occurred while adding the data. */ setAsync(recipients: Array, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Sets a recipient list for an appointment or message. * * The `setAsync` method overwrites the current recipient list. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on the web, on Windows, * on Mac (classic UI), on Android, and on iOS. However, take note of the following: * * - In Outlook on the web, on Windows, and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. * * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). * * **Errors**: * * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. * * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If setting the recipients fails the `asyncResult.error` property will contain a code that * indicates any error that occurred while adding the data. */ setAsync(recipients: Array, callback: (asyncResult: Office.AsyncResult) => void): void; } /** * Provides change status of recipients fields when the `Office.EventType.RecipientsChanged` event is raised. * * @remarks * [Api set: Mailbox 1.7] */ export interface RecipientsChangedEventArgs { /** * Gets an object that indicates change state of recipients fields. * * @remarks * [Api set: Mailbox 1.7] */ changedRecipientFields: RecipientsChangedFields; /** * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. * * @remarks * [Api set: Mailbox 1.7] */ type: "olkRecipientsChanged"; } /** * Represents `RecipientsChangedEventArgs.changedRecipientFields` object. * * @remarks * [Api set: Mailbox 1.7] */ interface RecipientsChangedFields { /** * Gets if recipients in the **bcc** field were changed. * * @remarks * [Api set: Mailbox 1.7] */ bcc: boolean /** * Gets if recipients in the **cc** field were changed. * * @remarks * [Api set: Mailbox 1.7] */ cc: boolean; /** * Gets if optional attendees were changed. * * @remarks * [Api set: Mailbox 1.7] */ optionalAttendees: boolean; /** * Gets if required attendees were changed. * * @remarks * [Api set: Mailbox 1.7] */ requiredAttendees: boolean; /** * Gets if resources were changed. * * @remarks * [Api set: Mailbox 1.7] */ resources: boolean; /** * Gets if recipients in the **to** field were changed. * * @remarks * [Api set: Mailbox 1.7] */ to: boolean; } /** * The `Recurrence` object provides methods to get and set the recurrence pattern of appointments but only get the recurrence pattern of * meeting requests. * It will have a dictionary with the following keys: `seriesTime`, `recurrenceType`, `recurrenceProperties`, and `recurrenceTimeZone` (optional). * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * **States** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
StateEditable?Viewable?
Appointment Organizer - Compose SeriesYes (setAsync)Yes (getAsync)
Appointment Organizer - Compose InstanceNo (setAsync returns error)Yes (getAsync)
Appointment Attendee - Read SeriesNo (setAsync not available)Yes (item.recurrence)
Appointment Attendee - Read InstanceNo (setAsync not available)Yes (item.recurrence)
Meeting Request - Read SeriesNo (setAsync not available)Yes (item.recurrence)
Meeting Request - Read InstanceNo (setAsync not available)Yes (item.recurrence)
*/ interface Recurrence { /** * Gets or sets the properties of the recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ recurrenceProperties?: RecurrenceProperties; /** * Gets or sets the properties of the recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ recurrenceTimeZone?: RecurrenceTimeZone; /** * Gets or sets the type of the recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ recurrenceType: MailboxEnums.RecurrenceType | string; /** * The {@link Office.SeriesTime | SeriesTime} object enables you to manage the start and end dates of the recurring appointment series and * the usual start and end times of instances. **This object is not in UTC time.** * Instead, it is set in the time zone specified by the `recurrenceTimeZone` value or defaulted to the item's time zone. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ seriesTime: SeriesTime; /** * Returns the current recurrence object of an appointment series. * * This method returns the entire `Recurrence` object for the appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the result is a `Recurrence` object. */ getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Returns the current recurrence object of an appointment series. * * This method returns the entire `Recurrence` object for the appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the result is a `Recurrence` object. */ getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the recurrence pattern of an appointment series. * * **Note**: `setAsync` should only be available for series items and not instance items. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `InvalidEndTime`: The appointment end time is before its start time. * * @param recurrencePattern - A recurrence object. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ setAsync(recurrencePattern: Recurrence, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the recurrence pattern of an appointment series. * * **Note**: `setAsync` should only be available for series items and not instance items. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `InvalidEndTime`: The appointment end time is before its start time. * * @param recurrencePattern - A recurrence object. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ setAsync(recurrencePattern: Recurrence, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Provides updated recurrence object that raised the `Office.EventType.RecurrenceChanged` event. * * @remarks * [Api set: Mailbox 1.7] */ export interface RecurrenceChangedEventArgs { /** * Gets the updated recurrence object. * * @remarks * [Api set: Mailbox 1.7] */ recurrence: Recurrence; /** * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. * * @remarks * [Api set: Mailbox 1.7] */ type: "olkRecurrenceChanged"; } /** * Represents the properties of the recurrence. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface RecurrenceProperties { /** * Represents the period between instances of the same recurring series. */ interval: number; /** * Represents the day of the month. */ dayOfMonth?: number; /** * Represents the day of the week or type of day, for example, weekend day vs weekday. */ dayOfWeek?: MailboxEnums.Days | string; /** * Represents the set of days for this recurrence. Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. */ days?: MailboxEnums.Days[] | string[]; /** * Represents the number of the week in the selected month e.g., 'first' for first week of the month. */ weekNumber?: MailboxEnums.WeekNumber | string; /** * Represents the month. */ month?: MailboxEnums.Month | string; /** * Represents your chosen first day of the week otherwise the default is the value in the current user's settings. * Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. */ firstDayOfWeek?: MailboxEnums.Days | string; } /** * Represents the time zone of the recurrence. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface RecurrenceTimeZone { /** * Represents the name of the recurrence time zone. */ name: MailboxEnums.RecurrenceTimeZone | string; /** * Integer value representing the difference in minutes between the local time zone and UTC at the date that the meeting series began. */ offset?: number; } /** * A file or item attachment. Used when displaying a reply form. */ interface ReplyFormAttachment { /** * Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. */ type: string; /** * A string that contains the name of the attachment, up to 255 characters in length. */ name: string; /** * Only used if type is set to file. The URI of the location for the file. * * **Important**: This link must be publicly accessible, without need for authentication by Exchange Online servers. However, with * on-premises Exchange, the link can be accessible on a private network as long as it doesn't need further authentication. */ url?: string; /** * Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be * displayed in the attachment list. */ inLine?: boolean; /** * Only used if type is set to item. The EWS item ID of the attachment. This is a string up to 100 characters. */ itemId?: string; } /** * A ReplyFormData object that contains body or attachment data and a callback function. Used when displaying a reply form. */ interface ReplyFormData { /** * A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. */ htmlBody?: string; /** * An array of {@link Office.ReplyFormAttachment | ReplyFormAttachment} that are either file or item attachments. */ attachments?: ReplyFormAttachment[]; /** * When the reply display call completes, the function passed in the callback parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ callback?: (asyncResult: Office.AsyncResult) => void; /** * An object literal that contains the following property:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. */ options?: Office.AsyncContextOptions; } /** * The settings created by using the methods of the `RoamingSettings` object are saved per add-in and per user. * That is, they are available only to the add-in that created them, and only from the user's mailbox in which they are saved. * * While the Outlook add-in API limits access to these settings to only the add-in that created them, these settings shouldn't be considered * secure storage. They can be accessed by Exchange Web Services or Extended MAPI. * They shouldn't be used to store sensitive information, such as user credentials or security tokens. * * The name of a setting is a String, while the value can be a String, Number, Boolean, null, Object, or Array. * * The `RoamingSettings` object is accessible via the `roamingSettings` property in the `Office.context` namespace. * * To learn more about `RoamingSettings`, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.1] * * **Important**: * * - The `RoamingSettings` object is initialized from the persisted storage only when the add-in is first loaded. * For task panes, this means that it's only initialized when the task pane first opens. * If the task pane navigates to another page or reloads the current page, the in-memory object is reset to its initial values, even if * your add-in has persisted changes. * The persisted changes will not be available until the task pane (or item in the case of UI-less add-ins) is closed and reopened. * * - When set and saved through Outlook on Windows or on Mac, these settings are reflected in Outlook on the web only after a browser refresh. * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ export interface RoamingSettings { /** * Retrieves the specified setting. * * @returns Type: String | Number | Boolean | Object | Array * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param name - The case-sensitive name of the setting to retrieve. */ get(name: string): any; /** * Removes the specified setting. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param name - The case-sensitive name of the setting to remove. */ remove(name: string): void; /** * Saves the settings. * * Any settings previously saved by an add-in are loaded when it's initialized, so during the lifetime of the session you can just use * the set and get methods to work with the in-memory copy of the settings property bag. * When you want to persist the settings so that they're available the next time the add-in is used, use the `saveAsync` method. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. */ saveAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets or creates the specified setting. * * The `set` method creates a new setting of the specified name if it doesn't already exist, or sets an existing setting of the specified name. * The value is stored in the document as the serialized JSON representation of its data type. * * A maximum of 32KB is available for the settings of each add-in. An error with code 9057 is thrown when that size limit is exceeded. * * Any changes made to settings using the `set` method will not be saved to the server until the `saveAsync` method is called. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * @param name - The case-sensitive name of the setting to set or create. * @param value - Specifies the value to be stored. */ set(name: string, value: any): void; } /** * Represents the properties of a message that's currently selected in Outlook. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read */ interface SelectedItemDetails { /** * The Exchange Web Services (EWS) item identifier of the message that's currently selected. */ itemId: string; /** * The Outlook mode (`Read` or `Compose`) of the message that's currently selected. */ itemMode: string; /** * The type of the item that's currently selected. `Message` is the only supported type at this time. */ itemType: MailboxEnums.ItemType | string; /** * The description that appears in the subject field of the message that's currently selected. */ subject: string; } /** * Provides methods to get or set the sensitivity label of a message or appointment. For more information on sensitivity labels, see * {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | Learn about sensitivity labels}. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. */ interface SensitivityLabel { /** * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The sensitivity label's GUID is returned in the * `asyncResult.value` property. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The sensitivity label's GUID is returned in the * `asyncResult.value` property. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Applies the specified sensitivity label to the message or appointment being composed. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. */ setAsync(sensitivityLabel: string | SensitivityLabelDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Applies the specified sensitivity label to the message or appointment being composed. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. */ setAsync(sensitivityLabel: string | SensitivityLabelDetails, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Provides the change status of the sensitivity label applied to a message or appointment in compose mode. This information is provided when the * `Office.EventType.SensitivityLabelChanged` event is raised. * * @remarks * [Api set: Mailbox 1.13] * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. */ export interface SensitivityLabelChangedEventArgs { /** * The type of event that was raised. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. * * @remarks * [Api set: Mailbox 1.13] */ type: "olkSensitivityLabelChanged"; } /** * Represents the properties of available sensitivity labels in Outlook. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. */ interface SensitivityLabelDetails { /** * The color of the sensitivity label. */ color: string; /** * The {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels#sublabels-grouping-labels | sublabels} of the sensitivity label. * Returns `null` if a label doesn't have any sublabels. */ children: SensitivityLabelDetails[]; /** * The unique identifier (GUID) of the sensitivity label. */ id: string; /** * The name of the sensitivity label. */ name: string; /** * The description of the sensitivity label. */ tooltip: string; } /** * Provides methods to check the status of the catalog of {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | sensitivity labels} * in Outlook and retrieve all available sensitivity labels if the catalog is enabled. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. */ export interface SensitivityLabelsCatalog { /** * Gets all the sensitivity labels that are enabled in Outlook. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The available sensitivity labels and their properties are returned in the * `asyncResult.value` property. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets all the sensitivity labels that are enabled in Outlook. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The available sensitivity labels and their properties are returned in the * `asyncResult.value` property. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Checks whether the catalog of sensitivity labels is enabled in Outlook. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. */ getIsEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Checks whether the catalog of sensitivity labels is enabled in Outlook. * * @remarks * [Api set: Mailbox 1.13] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. * * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. * * To learn more about how to manage sensitivity labels in your add-in, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. The status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. */ getIsEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void; } /** * The `SeriesTime` object provides methods to get and set the dates and times of appointments in a recurring series and get the dates and times * of meeting requests in a recurring series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface SeriesTime { /** * Gets the duration in minutes of a usual instance in a recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ getDuration(): number; /** * Gets the end date of a recurrence pattern in the following * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ getEndDate(): string; /** * Gets the end time of a usual appointment or meeting request instance of a recurrence pattern in whichever time zone that the user or * add-in set the recurrence pattern using the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} format: * "THH:mm:ss:mmm". * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ getEndTime(): string; /** * Gets the start date of a recurrence pattern in the following * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ getStartDate(): string; /** * Gets the start time of a usual appointment instance of a recurrence pattern in whichever time zone that the user/add-in set the * recurrence pattern using the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} format: "THH:mm:ss:mmm". * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ getStartTime(): string; /** * Sets the duration of all appointments in a recurrence pattern. This will also change the end time of the recurrence pattern. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param minutes - The length of the appointment in minutes. */ setDuration(minutes: number): void; /** * Sets the end date of a recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param year - The year value of the end date. * @param month - The month value of the end date. Valid range is 0-11 where 0 represents the 1st month and 11 represents the 12th month. * @param day - The day value of the end date. */ setEndDate(year: number, month: number, day: number): void; /** * Sets the end date of a recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param date - End date of the recurring appointment series represented in the * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". */ setEndDate(date: string): void; /** * Sets the start date of a recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param year - The year value of the start date. * @param month - The month value of the start date. Valid range is 0-11 where 0 represents the 1st month and 11 represents the 12th month. * @param day - The day value of the start date. */ setStartDate(year:number, month:number, day:number): void; /** * Sets the start date of a recurring appointment series. * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param date - Start date of the recurring appointment series represented in the * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". */ setStartDate(date:string): void; /** * Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence pattern is set * (the item's time zone is used by default). * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param hours - The hour value of the start time. Valid range: 0-24. * @param minutes - The minute value of the start time. Valid range: 0-59. */ setStartTime(hours: number, minutes: number): void; /** * Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence pattern is set * (the item's time zone is used by default). * * @remarks * [Api set: Mailbox 1.7] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param time - Start time of all instances represented by standard datetime string format: "THH:mm:ss:mmm". */ setStartTime(time: string): void; } /** * Provides methods to manage an item's session data. * * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface SessionData { /** * Clears all session data key-value pairs. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ clearAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Clears all session data key-value pairs. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ clearAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets all session data key-value pairs. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ getAllAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the session data value of the specified key. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param name - The session data key. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ getAsync(name: string, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Removes a session data key-value pair. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param name - The session data key. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeAsync(name: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Removes a session data key-value pair. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param name - The session data key. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. */ removeAsync(name: string, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets a session data key-value pair. * * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * @param name - The session data key. * @param value - The session data value as a string. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ setAsync(name: string, value: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets a session data key-value pair. * * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. * * @remarks * [Api set: Mailbox 1.11] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * @param name - The session data key. * @param value - The session data value as a string. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. */ setAsync(name: string, value: string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents the properties of an appointment or message in a shared folder or shared mailbox. * * For more information on how this object is used, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. * * @remarks * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface SharedProperties { /** * The email address of the owner of a shared item. */ owner: string; /** * The REST API's base URL (currently `https://outlook.office.com/api`). * * Use with `targetMailbox` to construct the REST operation's URL. * * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` */ targetRestUrl: string; /** * The location of the owner's mailbox for the delegate's access. This location may differ based on the Outlook client. * * Use with `targetRestUrl` to construct the REST operation's URL. * * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` */ targetMailbox: string; /** * The permissions that the delegate has on a shared folder, or the user has on a shared mailbox. */ delegatePermissions: MailboxEnums.DelegatePermissions; } /** * Specifies the behavior of a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts add-in} * when it completes processing an `OnMessageSend` or `OnAppointmentSend` event. */ interface SmartAlertsEventCompletedOptions { /** * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler, * this value indicates if the handled event should continue execution or be canceled. * For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set `allowEvent` to `false` to cancel the sending of an item. * For a complete sample, see the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. * * @remarks * * [Api set: Mailbox 1.12] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ allowEvent?: boolean; /** * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler and set its `allowEvent` property * to `false`, this property sets the error message that will be displayed to the user. For an example, see the * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. * * @remarks * * [Api set: Mailbox 1.12] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ errorMessage?: string; } /** * Provides methods to get and set the subject of an appointment or message in an Outlook add-in. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface Subject { /** * Gets the subject of an appointment or message. * * The `getAsync` method starts an asynchronous call to the Exchange server to get the subject of an appointment or message. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. The `value` property of the result is the subject of the item. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the subject of an appointment or message. * * The `getAsync` method starts an asynchronous call to the Exchange server to get the subject of an appointment or message. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. The `value` property of the result is the subject of the item. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the subject of an appointment or message. * * The `setAsync` method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * **Errors**: * * - `DataExceedsMaximumSize`: The subject parameter is longer than 255 characters. * * @param subject - The subject of the appointment or message. The string is limited to 255 characters. * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. If setting the subject fails, the `asyncResult.error` property will contain an error code. */ setAsync(subject: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the subject of an appointment or message. * * The `setAsync` method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is * supported. For more information on supported APIs in Outlook mobile, see * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. * * **Errors**: * * - `DataExceedsMaximumSize`: The subject parameter is longer than 255 characters. * * @param subject - The subject of the appointment or message. The string is limited to 255 characters. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. If setting the subject fails, the `asyncResult.error` property will contain an error code. */ setAsync(subject: string, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Represents a suggested task identified in an item. Read mode only. * * The list of tasks suggested in an email message is returned in the `taskSuggestions` property of the {@link Office.Entities | Entities} object * that is returned when the `getEntities` or `getEntitiesByType` method is called on the active item. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read */ interface TaskSuggestion { /** * Gets the users that should be assigned a suggested task. */ assignees: EmailUser[]; /** * Gets the text of an item that was identified as a task suggestion. */ taskString: string; } /** * The `Time` object is returned as the start or end property of an appointment in compose mode. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ interface Time { /** * Gets the start or end time of an appointment. * * The date and time is provided as a `Date` object in the `asyncResult.value` property. The value is in Coordinated Universal Time (UTC). * You can convert the UTC time to the local client time by using the `convertToLocalClientTime` method. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter * of type `Office.AsyncResult`. The `value` property of the result is a `Date` object. */ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Gets the start or end time of an appointment. * * The date and time is provided as a `Date` object in the `asyncResult.value` property. The value is in Coordinated Universal Time (UTC). * You can convert the UTC time to the local client time by using the `convertToLocalClientTime` method. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter * of type `Office.AsyncResult`. The `value` property of the result is a `Date` object. */ getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the start or end time of an appointment. * * If the `setAsync` method is called on the start property, the `end` property will be adjusted to maintain the duration of the appointment as * previously set. If the `setAsync` method is called on the `end` property, the duration of the appointment will be extended to the new end time. * * The time must be in UTC; you can get the correct UTC time by using the `convertToUtcClientTime` method. * * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `InvalidEndTime`: The appointment end time is before the appointment start time. * * @param dateTime - A date-time object in Coordinated Universal Time (UTC). * @param options - An object literal that contains one or more of the following properties:- * `asyncContext`: Developers can provide any object they wish to access in the callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If setting the date and time fails, the `asyncResult.error` property will contain an error code. */ setAsync(dateTime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Sets the start or end time of an appointment. * * If the `setAsync` method is called on the start property, the `end` property will be adjusted to maintain the duration of the appointment as * previously set. If the `setAsync` method is called on the `end` property, the duration of the appointment will be extended to the new end time. * * The time must be in UTC; you can get the correct UTC time by using the `convertToUtcClientTime` method. * * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. * * @remarks * [Api set: Mailbox 1.1] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * * **Errors**: * * - `InvalidEndTime`: The appointment end time is before the appointment start time. * * @param dateTime - A date-time object in Coordinated Universal Time (UTC). * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of * type `Office.AsyncResult`. If setting the date and time fails, the `asyncResult.error` property will contain an error code. */ setAsync(dateTime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void; } /** * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ interface UserProfile { /** * Gets the account type of the user associated with the mailbox. * * **Note**: This member is currently only supported in Outlook on Mac, Build 16.9.1212 and greater. * * @remarks * [Api set: Mailbox 1.6] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read * * The possible account types are listed in the following table. * * * * * * * * * * * * * * * * * * * * * * *
ValueDescription
enterpriseThe mailbox is on an on-premises Exchange server.
gmailThe mailbox is associated with a Gmail account.
office365The mailbox is associated with a Microsoft 365 work or school account.
outlookComThe mailbox is associated with a personal Outlook.com account.
* * **Note**: For hybrid Exchange environments, the returned account type value depends on where the mailbox is hosted. * If the mailbox is on an on-premises server, the account type value is **enterprise**. However, if it's hosted on * Exchange Online, the account type value is **office365**. */ accountType: string; /** * Gets the user's display name. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ displayName: string; /** * Gets the user's SMTP email address. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ emailAddress: string; /** * Gets the user's time zone in Windows format. * * The system time zone is usually returned. However, in Outlook on the web, the default time zone in the calendar preferences is returned instead. * * @remarks * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read */ timeZone: string; } } //////////////////////////////////////////////////////////////// /////////////////////// End Exchange APIs ////////////////////// //////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////// Begin OfficeExtension runtime ///////////////// //////////////////////////////////////////////////////////////// declare namespace OfficeExtension { /** * An abstract proxy object that represents an object in an Office document. * You create proxy objects from the context (or from other proxy objects), add commands to a queue to act on the object, and then synchronize the * proxy object state with the document by calling `context.sync()`. */ class ClientObject { /** The request context associated with the object */ context: ClientRequestContext; /** * Returns a boolean value for whether the corresponding object is a null object. You must call `context.sync()` before reading the * isNullObject property. */ isNullObject: boolean; } /** * Specifies which properties of an object should be loaded. This load happens when the sync() method is executed. * This synchronizes the states between Office objects and corresponding JavaScript proxy objects. * * @remarks * * For Word, the preferred method for specifying the properties and paging information is by using a string literal. * The first two examples show the preferred way to request the text and font size properties for paragraphs in a paragraph collection: * * `context.load(paragraphs, 'text, font/size');` * * `paragraphs.load('text, font/size');` * * Here is a similar example using object notation (includes paging): * * `context.load(paragraphs, {select: 'text, font/size', expand: 'font', top: 50, skip: 0});` * * `paragraphs.load({select: 'text, font/size', expand: 'font', top: 50, skip: 0});` * * Note that if we don't specify the specific properties on the font object in the select statement, the expand statement by itself would * indicate that all of the font properties are loaded. */ interface LoadOption { /** * A comma-delimited string, or array of strings, that specifies the properties to load. */ select?: string | string[]; /** * A comma-delimited string, or array of strings, that specifies the navigation properties to load. */ expand?: string | string[]; /** * Only usable on collection types. Specifies the maximum number of collection items that can be included in the result. */ top?: number; /** * Only usable on collection types. Specifies the number of items in the collection that are to be skipped and not included in the result. * If top is specified, the result set will start after skipping the specified number of items. */ skip?: number; } /** * Provides an option for suppressing an error when the object that is used to set multiple properties tries to set read-only properties. */ interface UpdateOptions { /** * Throw an error if the passed-in property list includes read-only properties (default = true). */ throwOnReadOnly?: boolean } /** * Additional options passed into `{Host}.run(...)`. */ export interface RunOptions { /** * The URL of the remote workbook and the request headers to be sent. */ session?: RequestUrlAndHeaderInfo | T; /** * A previously-created context, or API object, or array of objects. * The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up * by `context.sync()`. */ previousObjects?: ClientObject | ClientObject[] | ClientRequestContext; } /** Contains debug information about the request context. */ interface RequestContextDebugInfo { /** * The statements to be executed in the Office application. * * These statements may not match the code exactly as written, but will be a close approximation. */ pendingStatements: string[]; } /** * An abstract RequestContext object that facilitates requests to the Office application. * The `Excel.run` and `Word.run` methods provide a request context. */ class ClientRequestContext { constructor(url?: string); /** Collection of objects that are tracked for automatic adjustments based on surrounding changes in the document. */ trackedObjects: TrackedObjects; /** Request headers */ requestHeaders: { [name: string]: string }; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param object The object whose properties are loaded. * @param option A comma-delimited string, or array of strings, that specifies the properties to load, or an * {@link OfficeExtension.LoadOption} object. */ load(object: ClientObject, option?: string | string[] | LoadOption): void; /** * Queues up a command to recursively load the specified properties of the object and its navigation properties. * * You must call `context.sync()` before reading the properties. * * @param object The object to be loaded. * @param options The key-value pairing of load options for the types, such as * `{ "Workbook": "worksheets,tables", "Worksheet": "tables", "Tables": "name" }` * @param maxDepth The maximum recursive depth. */ loadRecursive(object: ClientObject, options: { [typeName: string]: string | string[] | LoadOption }, maxDepth?: number): void; /** * Adds a trace message to the queue. If the promise returned by `context.sync()` is rejected due to an error, this adds a ".traceMessages" * array to the OfficeExtension.Error object, containing all trace messages that were executed. * These messages can help you monitor the program execution sequence and detect the cause of the error. */ trace(message: string): void; /** * Synchronizes the state between JavaScript proxy objects and the Office document, by executing instructions queued on the request context * and retrieving properties of loaded Office objects for use in your code. * This method returns a promise, which is resolved when the synchronization is complete. */ sync(passThroughValue?: T): Promise; /** Debug information */ readonly debugInfo: RequestContextDebugInfo; } /** * Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`. * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}. */ interface EmbeddedOptions { sessionKey?: string, /* * The iframe element that hosts the Visio diagram. */ container?: HTMLElement, id?: string; timeoutInMilliseconds?: number; height?: string; width?: string; } /** * Represents a session of a Visio diagram embedded in a SharePoint page. * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}. */ class EmbeddedSession { constructor(url: string, options?: EmbeddedOptions); /** * Initializes the session. */ public init(): Promise; } /** Contains the result for methods that return primitive types. The object's value property is retrieved from the document after `context.sync()` is invoked. */ class ClientResult { /** The value of the result that is retrieved from the document after `context.sync()` is invoked. */ value: T; } /** Configuration */ var config: { /** * Determines whether to log additional error information upon failure. * * When this property is set to true, the error object will include a `debugInfo.fullStatements` property that lists all statements in the * batch request, including all statements that precede and follow the point of failure. * * Setting this property to true will negatively impact performance and will log all statements in the batch request, including any statements * that may contain potentially-sensitive data. * It is recommended that you only set this property to true during debugging and that you never log the value of * error.debugInfo.fullStatements to an external database or analytics service. */ extendedErrorLogging: boolean; }; /** * Provides information about an error. */ interface DebugInfo { /** Error code string, such as "InvalidArgument". */ code: string; /** The error message passed through from the Office application. */ message: string; /** Inner error, if applicable. */ innerError?: DebugInfo | string; /** The object type and property or method name (or similar information), if available. */ errorLocation?: string; /** * The statement that caused the error, if available. * * This statement will never contain any potentially sensitive data and may not match the code exactly as written, * but will be a close approximation. */ statement?: string; /** * The statements that closely precede and follow the statement that caused the error, if available. * * These statements will never contain any potentially sensitive data and may not match the code exactly as written, * but will be a close approximation. */ surroundingStatements?: string[]; /** * All statements in the batch request (including any potentially-sensitive information that was specified in the request), if available. * * These statements may not match the code exactly as written, but will be a close approximation. */ fullStatements?: string[]; } /** The error object returned by `context.sync()`, if a promise is rejected due to an error while processing the request. */ class Error { /** Error name: "OfficeExtension.Error".*/ name: string; /** The error message passed through from the Office application. */ message: string; /** Stack trace, if applicable. */ stack: string; /** Error code string, such as "InvalidArgument". */ code: string; /** * Trace messages (if any) that were added via a `context.trace()` invocation before calling `context.sync()`. * If there was an error, this contains all trace messages that were executed before the error occurred. * These messages can help you monitor the program execution sequence and detect the case of the error. */ traceMessages: string[]; /** Debug info (useful for detailed logging of the error, i.e., via `JSON.stringify(...)`). */ debugInfo: DebugInfo; /** Inner error, if applicable. */ innerError: Error; } /** * Represents the error code that can be returned by {@link OfficeExtension.Error | OfficeExtension.Error.code}. * * To learn more about the error codes, see * {@link https://learn.microsoft.com/office/dev/add-ins/reference/javascript-api-for-office-error-codes | Office Common API error codes}. */ class ErrorCodes { public static accessDenied: string; public static generalException: string; public static activityLimitReached: string; public static invalidObjectPath: string; public static propertyNotLoaded: string; public static valueNotLoaded: string; public static invalidRequestContext: string; public static invalidArgument: string; public static runMustReturnPromise: string; public static cannotRegisterEvent: string; public static apiNotFound: string; public static connectionFailure: string; } /** * A Promise object that represents a deferred interaction with the Office application. * The publicly-consumable OfficeExtension.Promise is available starting in ExcelApi 1.2 and WordApi 1.2. * Promises can be chained via ".then", and errors can be caught via ".catch". * Remember to always use a ".catch" on the outer promise, and to return intermediary promises so as not to break the promise chain. * When a browser-provided native Promise implementation is available, OfficeExtension.Promise will switch to use the native Promise instead. */ const Promise: Office.IPromiseConstructor; type IPromise = Promise; /** * Collection of tracked objects, contained within a request context. * See {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects} * for more information. */ class TrackedObjects { /** * Track a new object for automatic adjustment based on surrounding changes in the document. Only some object types require this. * If you are using an object across ".sync" calls and outside the sequential execution of a ".run" batch, * and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object * to the tracked object collection when the object was first created. If this object is part of a collection in Word, you should also track * the parent collection. */ add(object: ClientObject): void; /** * Track a set of objects for automatic adjustment based on surrounding changes in the document. Only some object types require this. * If you are using an object across ".sync" calls and outside the sequential execution of a ".run" batch, * and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object * to the tracked object collection when the object was first created. If this object is part of a collection in Word, you should also track * the parent collection. */ add(objects: ClientObject[]): void; /** * Release the memory associated with an object that was previously added to this collection. * Having many tracked objects slows down the Office application, so please remember to free any objects you add, once you're done using them. * You will need to call `context.sync()` before the memory release takes effect. */ remove(object: ClientObject): void; /** * Release the memory associated with an object that was previously added to this collection. * Having many tracked objects slows down the Office application, so please remember to free any objects you add, once you're done using them. * You will need to call `context.sync()` before the memory release takes effect. */ remove(objects: ClientObject[]): void; } class EventHandlers { constructor(context: ClientRequestContext, parentObject: ClientObject, name: string, eventInfo: EventInfo); /** * Adds a function to be called when the event is triggered. * @param handler A promise-based function that takes in any relevant event arguments. */ add(handler: (args: T) => Promise): EventHandlerResult; /** * Removes the specified function from the event handler list so that it will not be called on subsequent events. * * **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler. * More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}. * * @param handler A reference to a function previously provided to the `add` method as an event handler. */ remove(handler: (args: T) => Promise): void; } /** * Enables the removal of an event handler. Returned by the `EventHandlers.add` method. * * **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler. * More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}. */ class EventHandlerResult { constructor(context: ClientRequestContext, handlers: EventHandlers, handler: (args: T) => Promise); /** The request context associated with the object */ context: ClientRequestContext; /* * Removes the handler from the event. */ remove(): void; } /** * Used by Office to construct event handlers. Do not call in your code. */ interface EventInfo { registerFunc: (callback: (args: any) => void) => Promise; unregisterFunc: (callback: (args: any) => void) => Promise; eventArgsTransformFunc: (args: any) => Promise; } /** * Request URL and headers */ interface RequestUrlAndHeaderInfo { /** Request URL */ url: string; /** Request headers */ headers?: { [name: string]: string; }; } } //////////////////////////////////////////////////////////////// ///////////////// End OfficeExtension runtime ////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// ////////////////////// Begin OfficeCore //////////////////////// //////////////////////////////////////////////////////////////// declare namespace OfficeCore { class RequestContext extends OfficeExtension.ClientRequestContext { constructor(url?: string | OfficeExtension.RequestUrlAndHeaderInfo | any); } } //////////////////////////////////////////////////////////////// /////////////////////// End OfficeCore ///////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// /////////////////////// Begin Excel APIs /////////////////////// //////////////////////////////////////////////////////////////// declare namespace Excel { /** * Represents a 2D array of cell values. * * @remarks * [Api set: ExcelApi 1.16] */ interface ArrayCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.array | ReferenceValueType.array | "Array"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#VALUE!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the elements of the array. May not directly contain an `ArrayCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ elements: CellValue[][]; /** * Represents the cell values which are referenced within `ArrayCellValue.elements`. * * @remarks * [Api set: ExcelApi 1.16] */ referencedValues?: ReferencedValue[]; } /** * Represents types of #BLOCKED! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum BlockedErrorCellValueSubType { /** * An unknown type of error. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by a service not supporting a linked data type. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ dataTypeRestrictedDomain = "DataTypeRestrictedDomain", /** * An error caused by privacy settings. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ dataTypePrivacySetting = "DataTypePrivacySetting", /** * An error caused by an unsupported data type. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ dataTypeUnsupportedApp = "DataTypeUnsupportedApp", /** * An error caused by external links. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksGeneric = "ExternalLinksGeneric", /** * An error caused by disabled rich data links. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ richDataLinkDisabled = "RichDataLinkDisabled", /** * An error caused by sign in failure. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ signInError = "SignInError", /** * An error caused by a license verification failure. Displays as error type #BLOCKED! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ noLicense = "NoLicense" } /** * Represents the value of a cell containing a #BLOCKED! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface BlockedErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#BLOCKED!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.blocked | "Blocked"; /** * Represents the type of `BlockedErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: BlockedErrorCellValueSubType | "Unknown" | "DataTypeRestrictedDomain" | "DataTypePrivacySetting" | "DataTypeUnsupportedApp" | "ExternalLinksGeneric" | "RichDataLinkDisabled" | "SignInError" | "NoLicense"; } /** * Represents the value of a cell containing a boolean. * * @remarks * [Api set: ExcelApi 1.16] */ interface BooleanCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.boolean | "Boolean"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue: boolean; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.boolean | "Boolean"; } /** * Represents types of #BUSY! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum BusyErrorCellValueSubType { /** * An unknown type of error. Displays as error type #BUSY! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by external links. Displays as error type #BUSY! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksGeneric = "ExternalLinksGeneric", /** * An error that displays while an image is loading. Displays as error type #BUSY! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ loadingImage = "LoadingImage" } /** * Represents the value of a cell containing a #BUSY! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface BusyErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#BUSY!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.busy | "Busy"; /** * Represents the type of `BusyErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: BusyErrorCellValueSubType | "Unknown" | "ExternalLinksGeneric" | "LoadingImage"; } /** * Represents types of #CALC! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum CalcErrorCellValueSubType { /** * An unknown type of error. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by including an array in an array. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ arrayOfArrays = "ArrayOfArrays", /** * An error caused by including a range in an array. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ arrayOfRanges = "ArrayOfRanges", /** * An error caused by an empty array. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ emptyArray = "EmptyArray", /** * An error caused by attempting to lift an unsupported formula (such as a Dynamic UDF) over an array. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unsupportedLifting = "UnsupportedLifting", /** * An error caused by a data table referencing a pending formula. The pending formula is likely asynchronous. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ dataTableReferencedPendingFormula = "DataTableReferencedPendingFormula", /** * An error caused by a function referencing too many cells. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ tooManyCells = "TooManyCells", /** * An error caused by a cell's formula evaluating to a lambda value. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ lambdaInCell = "LambdaInCell", /** * An error caused by a `CellValue` object that is too deeply nested within another `CellValue`. Displays as error type #CALC! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ tooDeeplyNested = "TooDeeplyNested", /** * An error caused by a cell's formula returning a string that exceeds the maximum of 32767 characters. Displays as error type #CALC! in Excel. * Some characters, like emoji, may appear to be one character in the Excel UI but are actually processed as surrogate characters. A surrogate character counts as multiple characters toward the maximum character limit. * * @remarks * [Api set: ExcelApi 1.16] */ textOverflow = "TextOverflow" } /** * Represents the value of a cell containing a #CALC! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface CalcErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#CALC!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.calc | "Calc"; /** * Represents the type of `CalcErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: CalcErrorCellValueSubType | "Unknown" | "ArrayOfArrays" | "ArrayOfRanges" | "EmptyArray" | "UnsupportedLifting" | "DataTableReferencedPendingFormula" | "TooManyCells" | "LambdaInCell" | "TooDeeplyNested" | "TextOverflow"; /** * Represents the name of the function causing the error. * * @remarks * [Api set: ExcelApi 1.16] */ functionName?: string; } /** * Represents a reference to a property used by the card layout. * * @remarks * [Api set: ExcelApi 1.16] */ interface CardLayoutPropertyReference { /** * Represents the name of the property referenced by the card layout. * * @remarks * [Api set: ExcelApi 1.16] */ property: string; } /** * Properties of a card layout relevant to most card layouts. * * @remarks * [Api set: ExcelApi 1.16] */ interface CardLayoutSectionStandardProperties { /** * Represents the title of this section of the card. * * @remarks * [Api set: ExcelApi 1.16] */ title?: string; /** * Represents whether this section of the card is collapsible. * If the card section has a title, the default value is `true`. * If the card section doesn't have a title, the default value is `false`. * * @remarks * [Api set: ExcelApi 1.16] */ collapsible?: boolean; /** * Represents whether this section of the card is initially collapsed. * * @remarks * [Api set: ExcelApi 1.16] */ collapsed?: boolean; /** * Represents the names of the properties in this section. * * @remarks * [Api set: ExcelApi 1.16] */ properties: string[]; } /** * Represents a section of a card that is arranged as a list in card view. * * @remarks * [Api set: ExcelApi 1.16] */ interface CardLayoutListSection extends CardLayoutSectionStandardProperties { /** * Represents the type of layout for this section. * * @remarks * [Api set: ExcelApi 1.16] */ layout: "List"; } /** * Represents a section of a card that is arranged as a table in card view. * * @remarks * [Api set: ExcelApi 1.16] */ interface CardLayoutTableSection extends CardLayoutSectionStandardProperties { /** * Represents the type of layout for this section. * * @remarks * [Api set: ExcelApi 1.16] */ layout: "Table"; } /** * Represents the layout of a section of a card in card view. * * @remarks * [Api set: ExcelApi 1.16] */ type CardLayoutSection = CardLayoutListSection | CardLayoutTableSection; /** * Properties of a card layout relevant to most card layouts. * * @remarks * [Api set: ExcelApi 1.16] */ interface CardLayoutStandardProperties { /** * Specifies a property which will be used as the main image of the card. * * @remarks * [Api set: ExcelApi 1.16] */ mainImage?: CardLayoutPropertyReference; /** * Represents the title of the card or the specification of which property contains the title of the card. * * @remarks * [Api set: ExcelApi 1.16] */ title?: string | CardLayoutPropertyReference; /** * Represents a specification of which property contains the subtitle of the card. * * @remarks * [Api set: ExcelApi 1.16] */ subTitle?: CardLayoutPropertyReference; /** * Represents the sections of the card. * * @remarks * [Api set: ExcelApi 1.16] */ sections?: CardLayoutSection[]; } /** * Represents the layout of a card in card view. * * @remarks * [Api set: ExcelApi 1.16] */ type CardLayout = EntityCardLayout; /** * The compact layout properties for an entity. * * @remarks * [Api set: ExcelApi 1.16] */ interface EntityCompactLayout { /** * Specifies the name of the icon which is used to open the card. * * @remarks * [Api set: ExcelApi 1.16] */ icon?: string | EntityCompactLayoutIcons; } /** * Represents the layout used when there is limited space to represent the entity. * * @remarks * [Api set: ExcelApi 1.16] */ type CompactLayout = EntityCompactLayout; /** * The list of icons available for `EntityCompactLayout`. An icon displays in the Excel UI, either to the left of the title in a cell that contains an entity card, or to the left of the title of a referenced entity inside an entity card. Selecting the icon opens the entity card. * * @remarks * [Api set: ExcelApi 1.16] */ enum EntityCompactLayoutIcons { /** * The default icon. * * @remarks * [Api set: ExcelApi 1.16] */ generic = "Generic", /** * Accessibility icon. * * @remarks * [Api set: ExcelApi 1.16] */ accessibility = "Accessibility", /** * Airplane icon. * * @remarks * [Api set: ExcelApi 1.16] */ airplane = "Airplane", /** * Airplane taking off icon. * * @remarks * [Api set: ExcelApi 1.16] */ airplaneTakeOff = "AirplaneTakeOff", /** * Album icon. * * @remarks * [Api set: ExcelApi 1.16] */ album = "Album", /** * Alert icon. * * @remarks * [Api set: ExcelApi 1.16] */ alert = "Alert", /** * Alert urgent icon. * * @remarks * [Api set: ExcelApi 1.16] */ alertUrgent = "AlertUrgent", /** * Animal icon. Displays as a pawprint. * * @remarks * [Api set: ExcelApi 1.16] */ animal = "Animal", /** * Animal cat icon. * * @remarks * [Api set: ExcelApi 1.16] */ animalCat = "AnimalCat", /** * Animal dog icon. * * @remarks * [Api set: ExcelApi 1.16] */ animalDog = "AnimalDog", /** * Animal rabbit icon. * * @remarks * [Api set: ExcelApi 1.16] */ animalRabbit = "AnimalRabbit", /** * Animal turtle icon. * * @remarks * [Api set: ExcelApi 1.16] */ animalTurtle = "AnimalTurtle", /** * App folder icon. * * @remarks * [Api set: ExcelApi 1.16] */ appFolder = "AppFolder", /** * App generic icon. * * @remarks * [Api set: ExcelApi 1.16] */ appGeneric = "AppGeneric", /** * Apple icon. * * @remarks * [Api set: ExcelApi 1.16] */ apple = "Apple", /** * Approvals app icon. * * @remarks * [Api set: ExcelApi 1.16] */ approvalsApp = "ApprovalsApp", /** * Archive icon. * * @remarks * [Api set: ExcelApi 1.16] */ archive = "Archive", /** * Archive multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ archiveMultiple = "ArchiveMultiple", /** * Arrow trending lines icon. * * @remarks * [Api set: ExcelApi 1.16] */ arrowTrendingLines = "ArrowTrendingLines", /** * Art icon. Displays as a paint palette. * * @remarks * [Api set: ExcelApi 1.16] */ art = "Art", /** * Atom icon. * * @remarks * [Api set: ExcelApi 1.16] */ atom = "Atom", /** * Attach icon. * * @remarks * [Api set: ExcelApi 1.16] */ attach = "Attach", /** * Automobile icon. * * @remarks * [Api set: ExcelApi 1.16] */ automobile = "Automobile", /** * Autosum icon. * * @remarks * [Api set: ExcelApi 1.16] */ autosum = "Autosum", /** * Backpack icon. * * @remarks * [Api set: ExcelApi 1.16] */ backpack = "Backpack", /** * Badge icon. * * @remarks * [Api set: ExcelApi 1.16] */ badge = "Badge", /** * Balloon icon. * * @remarks * [Api set: ExcelApi 1.16] */ balloon = "Balloon", /** * Bank icon. Displays as a building with pillars and a triangular roof. * * @remarks * [Api set: ExcelApi 1.16] */ bank = "Bank", /** * Barcode scanner icon. * * @remarks * [Api set: ExcelApi 1.16] */ barcodeScanner = "BarcodeScanner", /** * Basketball icon. * * @remarks * [Api set: ExcelApi 1.16] */ basketball = "Basketball", /** * Battery empty icon. * * @remarks * [Api set: ExcelApi 1.16] */ battery0 = "Battery0", /** * Battery full icon. * * @remarks * [Api set: ExcelApi 1.16] */ battery10 = "Battery10", /** * Beach icon. * * @remarks * [Api set: ExcelApi 1.16] */ beach = "Beach", /** * Beaker icon. * * @remarks * [Api set: ExcelApi 1.16] */ beaker = "Beaker", /** * Bed icon. * * @remarks * [Api set: ExcelApi 1.16] */ bed = "Bed", /** * Bin full icon. * * @remarks * [Api set: ExcelApi 1.16] */ binFull = "BinFull", /** * Bird icon. * * @remarks * [Api set: ExcelApi 1.16] */ bird = "Bird", /** * Bluetooth icon. * * @remarks * [Api set: ExcelApi 1.16] */ bluetooth = "Bluetooth", /** * Board icon. * * @remarks * [Api set: ExcelApi 1.16] */ board = "Board", /** * Board games icon. * * @remarks * [Api set: ExcelApi 1.16] */ boardGames = "BoardGames", /** * Book icon. * * @remarks * [Api set: ExcelApi 1.16] */ book = "Book", /** * Bookmark icon. * * @remarks * [Api set: ExcelApi 1.16] */ bookmark = "Bookmark", /** * Bookmark multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ bookmarkMultiple = "BookmarkMultiple", /** * Bot icon. * * @remarks * [Api set: ExcelApi 1.16] */ bot = "Bot", /** * Bowl chopsticks icon. * * @remarks * [Api set: ExcelApi 1.16] */ bowlChopsticks = "BowlChopsticks", /** * Box icon. * * @remarks * [Api set: ExcelApi 1.16] */ box = "Box", /** * Box multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ boxMultiple = "BoxMultiple", /** * Brain circuit icon. * * @remarks * [Api set: ExcelApi 1.16] */ brainCircuit = "BrainCircuit", /** * Branch icon. * * @remarks * [Api set: ExcelApi 1.16] */ branch = "Branch", /** * Branch fork icon. * * @remarks * [Api set: ExcelApi 1.16] */ branchFork = "BranchFork", /** * Branch request icon. * * @remarks * [Api set: ExcelApi 1.16] */ branchRequest = "BranchRequest", /** * Bridge icon. * * @remarks * [Api set: ExcelApi 1.16] */ bridge = "Bridge", /** * Briefcase icon. * * @remarks * [Api set: ExcelApi 1.16] */ briefcase = "Briefcase", /** * Briefcase medical icon. * * @remarks * [Api set: ExcelApi 1.16] */ briefcaseMedical = "BriefcaseMedical", /** * Broad activity feed icon. * * @remarks * [Api set: ExcelApi 1.16] */ broadActivityFeed = "BroadActivityFeed", /** * Broom icon. * * @remarks * [Api set: ExcelApi 1.16] */ broom = "Broom", /** * Bug icon. * * @remarks * [Api set: ExcelApi 1.16] */ bug = "Bug", /** * Building icon. * * @remarks * [Api set: ExcelApi 1.16] */ building = "Building", /** * Building bank icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingBank = "BuildingBank", /** * Building factory icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingFactory = "BuildingFactory", /** * Building government icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingGovernment = "BuildingGovernment", /** * Building home icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingHome = "BuildingHome", /** * Building lighthouse icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingLighthouse = "BuildingLighthouse", /** * Building multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingMultiple = "BuildingMultiple", /** * Building retail icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingRetail = "BuildingRetail", /** * Building retail more icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingRetailMore = "BuildingRetailMore", /** * Building retail toolbox icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingRetailToolbox = "BuildingRetailToolbox", /** * Building shop icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingShop = "BuildingShop", /** * Building skyscraper icon. * * @remarks * [Api set: ExcelApi 1.16] */ buildingSkyscraper = "BuildingSkyscraper", /** * Calculator icon. * * @remarks * [Api set: ExcelApi 1.16] */ calculator = "Calculator", /** * Calendar left to right icon. * * @remarks * [Api set: ExcelApi 1.16] */ calendarLtr = "CalendarLtr", /** * Calendar right to left icon. * * @remarks * [Api set: ExcelApi 1.16] */ calendarRtl = "CalendarRtl", /** * Call icon. * * @remarks * [Api set: ExcelApi 1.16] */ call = "Call", /** * Calligraphy pen icon. * * @remarks * [Api set: ExcelApi 1.16] */ calligraphyPen = "CalligraphyPen", /** * Camera icon. * * @remarks * [Api set: ExcelApi 1.16] */ camera = "Camera", /** * Camera dome icon. * * @remarks * [Api set: ExcelApi 1.16] */ cameraDome = "CameraDome", /** * Car icon. * * @remarks * [Api set: ExcelApi 1.16] */ car = "Car", /** * Cart icon. * * @remarks * [Api set: ExcelApi 1.16] */ cart = "Cart", /** * Cat icon. * * @remarks * [Api set: ExcelApi 1.16] */ cat = "Cat", /** * Certificate icon. * * @remarks * [Api set: ExcelApi 1.16] */ certificate = "Certificate", /** * Chart multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ chartMultiple = "ChartMultiple", /** * Chat icon. * * @remarks * [Api set: ExcelApi 1.16] */ chat = "Chat", /** * Chat multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ chatMultiple = "ChatMultiple", /** * Chat video icon. * * @remarks * [Api set: ExcelApi 1.16] */ chatVideo = "ChatVideo", /** * Check icon. * * @remarks * [Api set: ExcelApi 1.16] */ check = "Check", /** * Checkbox checked icon. * * @remarks * [Api set: ExcelApi 1.16] */ checkboxChecked = "CheckboxChecked", /** * Checkbox unchecked icon. * * @remarks * [Api set: ExcelApi 1.16] */ checkboxUnchecked = "CheckboxUnchecked", /** * Checkmark icon. * * @remarks * [Api set: ExcelApi 1.16] */ checkmark = "Checkmark", /** * Chess icon. * * @remarks * [Api set: ExcelApi 1.16] */ chess = "Chess", /** * City icon. Displays as multiple tall buildings. * * @remarks * [Api set: ExcelApi 1.16] */ city = "City", /** * Class icon. * * @remarks * [Api set: ExcelApi 1.16] */ class = "Class", /** * Classification icon. * * @remarks * [Api set: ExcelApi 1.16] */ classification = "Classification", /** * Clipboard icon. * * @remarks * [Api set: ExcelApi 1.16] */ clipboard = "Clipboard", /** * Clipboard data bar icon. * * @remarks * [Api set: ExcelApi 1.16] */ clipboardDataBar = "ClipboardDataBar", /** * Clipboard pulse icon. * * @remarks * [Api set: ExcelApi 1.16] */ clipboardPulse = "ClipboardPulse", /** * Clipboard task icon. * * @remarks * [Api set: ExcelApi 1.16] */ clipboardTask = "ClipboardTask", /** * Clock icon. * * @remarks * [Api set: ExcelApi 1.16] */ clock = "Clock", /** * Clock alarm icon. * * @remarks * [Api set: ExcelApi 1.16] */ clockAlarm = "ClockAlarm", /** * Cloud icon. * * @remarks * [Api set: ExcelApi 1.16] */ cloud = "Cloud", /** * Cloud words icon. * * @remarks * [Api set: ExcelApi 1.16] */ cloudWords = "CloudWords", /** * Code icon. * * @remarks * [Api set: ExcelApi 1.16] */ code = "Code", /** * Collections icon. * * @remarks * [Api set: ExcelApi 1.16] */ collections = "Collections", /** * Comment icon. * * @remarks * [Api set: ExcelApi 1.16] */ comment = "Comment", /** * Comment multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ commentMultiple = "CommentMultiple", /** * Communication icon. * * @remarks * [Api set: ExcelApi 1.16] */ communication = "Communication", /** * Compass northwest icon. * * @remarks * [Api set: ExcelApi 1.16] */ compassNorthwest = "CompassNorthwest", /** * Conference room icon. * * @remarks * [Api set: ExcelApi 1.16] */ conferenceRoom = "ConferenceRoom", /** * Connector icon. * * @remarks * [Api set: ExcelApi 1.16] */ connector = "Connector", /** * Constellation icon. Displays dots in the shape of Ursa Major. * * @remarks * [Api set: ExcelApi 1.16] */ constellation = "Constellation", /** * Contact card icon. * * @remarks * [Api set: ExcelApi 1.16] */ contactCard = "ContactCard", /** * Cookies icon. * * @remarks * [Api set: ExcelApi 1.16] */ cookies = "Cookies", /** * Couch icon. * * @remarks * [Api set: ExcelApi 1.16] */ couch = "Couch", /** * Credit card person icon. * * @remarks * [Api set: ExcelApi 1.16] */ creditCardPerson = "CreditCardPerson", /** * Credit card toolbox icon. * * @remarks * [Api set: ExcelApi 1.16] */ creditCardToolbox = "CreditCardToolbox", /** * Cube icon. * * @remarks * [Api set: ExcelApi 1.16] */ cube = "Cube", /** * Cube multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ cubeMultiple = "CubeMultiple", /** * Cube tree icon. * * @remarks * [Api set: ExcelApi 1.16] */ cubeTree = "CubeTree", /** * Currency dollar euro icon. * * @remarks * [Api set: ExcelApi 1.16] */ currencyDollarEuro = "CurrencyDollarEuro", /** * Currency dollar rupee icon. * * @remarks * [Api set: ExcelApi 1.16] */ currencyDollarRupee = "CurrencyDollarRupee", /** * Data area icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataArea = "DataArea", /** * Database icon. * * @remarks * [Api set: ExcelApi 1.16] */ database = "Database", /** * Database multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ databaseMultiple = "DatabaseMultiple", /** * Data funnel icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataFunnel = "DataFunnel", /** * Data histogram icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataHistogram = "DataHistogram", /** * Data line icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataLine = "DataLine", /** * Data pie icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataPie = "DataPie", /** * Data scatter icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataScatter = "DataScatter", /** * Data sunburst icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataSunburst = "DataSunburst", /** * Data treemap icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataTreemap = "DataTreemap", /** * Data waterfall icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataWaterfall = "DataWaterfall", /** * Data whisker icon. * * @remarks * [Api set: ExcelApi 1.16] */ dataWhisker = "DataWhisker", /** * Dentist icon. * * @remarks * [Api set: ExcelApi 1.16] */ dentist = "Dentist", /** * Design ideas icon. * * @remarks * [Api set: ExcelApi 1.16] */ designIdeas = "DesignIdeas", /** * Desktop icon. * * @remarks * [Api set: ExcelApi 1.16] */ desktop = "Desktop", /** * Desktop Mac icon. * * @remarks * [Api set: ExcelApi 1.16] */ desktopMac = "DesktopMac", /** * Developer board icon. * * @remarks * [Api set: ExcelApi 1.16] */ developerBoard = "DeveloperBoard", /** * Device meeting room icon. * * @remarks * [Api set: ExcelApi 1.16] */ deviceMeetingRoom = "DeviceMeetingRoom", /** * Diagram icon. * * @remarks * [Api set: ExcelApi 1.16] */ diagram = "Diagram", /** * Dialpad icon. * * @remarks * [Api set: ExcelApi 1.16] */ dialpad = "Dialpad", /** * Diamond icon. * * @remarks * [Api set: ExcelApi 1.16] */ diamond = "Diamond", /** * Dinosaur icon. Displays as a long-necked dinosaur, similar to a Brachiosaurus. * * @remarks * [Api set: ExcelApi 1.16] */ dinosaur = "Dinosaur", /** * Directions icon. * * @remarks * [Api set: ExcelApi 1.16] */ directions = "Directions", /** * Disaster icon. Displays as a house sinking in a flood. * * @remarks * [Api set: ExcelApi 1.16] */ disaster = "Disaster", /** * Diversity icon. * * @remarks * [Api set: ExcelApi 1.16] */ diversity = "Diversity", /** * DNA icon. * * @remarks * [Api set: ExcelApi 1.16] */ dNA = "DNA", /** * Doctor icon. * * @remarks * [Api set: ExcelApi 1.16] */ doctor = "Doctor", /** * Document icon. * * @remarks * [Api set: ExcelApi 1.16] */ document = "Document", /** * Document data icon. * * @remarks * [Api set: ExcelApi 1.16] */ documentData = "DocumentData", /** * Document landscape icon. * * @remarks * [Api set: ExcelApi 1.16] */ documentLandscape = "DocumentLandscape", /** * Document multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ documentMultiple = "DocumentMultiple", /** * Document PDF icon. * * @remarks * [Api set: ExcelApi 1.16] */ documentPdf = "DocumentPdf", /** * Document queue icon. * * @remarks * [Api set: ExcelApi 1.16] */ documentQueue = "DocumentQueue", /** * Document text icon. * * @remarks * [Api set: ExcelApi 1.16] */ documentText = "DocumentText", /** * Dog icon. * * @remarks * [Api set: ExcelApi 1.16] */ dog = "Dog", /** * Door icon. * * @remarks * [Api set: ExcelApi 1.16] */ door = "Door", /** * Door tag icon. * * @remarks * [Api set: ExcelApi 1.16] */ doorTag = "DoorTag", /** * Drafts icon. * * @remarks * [Api set: ExcelApi 1.16] */ drafts = "Drafts", /** * Drama icon. Displays as a pair of theatre masks. * * @remarks * [Api set: ExcelApi 1.16] */ drama = "Drama", /** * Drink beer icon. * * @remarks * [Api set: ExcelApi 1.16] */ drinkBeer = "DrinkBeer", /** * Drink coffee icon. * * @remarks * [Api set: ExcelApi 1.16] */ drinkCoffee = "DrinkCoffee", /** * Drink margarita icon. * * @remarks * [Api set: ExcelApi 1.16] */ drinkMargarita = "DrinkMargarita", /** * Drink to go icon. * * @remarks * [Api set: ExcelApi 1.16] */ drinkToGo = "DrinkToGo", /** * Drink wine icon. * * @remarks * [Api set: ExcelApi 1.16] */ drinkWine = "DrinkWine", /** * Drive train icon. * * @remarks * [Api set: ExcelApi 1.16] */ driveTrain = "DriveTrain", /** * Drop icon. * * @remarks * [Api set: ExcelApi 1.16] */ drop = "Drop", /** * Dual screen icon. * * @remarks * [Api set: ExcelApi 1.16] */ dualScreen = "DualScreen", /** * Dumbbell icon. * * @remarks * [Api set: ExcelApi 1.16] */ dumbbell = "Dumbbell", /** * Earth icon. * * @remarks * [Api set: ExcelApi 1.16] */ earth = "Earth", /** * Emoji icon. * * @remarks * [Api set: ExcelApi 1.16] */ emoji = "Emoji", /** * Emoji angry icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiAngry = "EmojiAngry", /** * Emoji hand icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiHand = "EmojiHand", /** * Emoji laugh icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiLaugh = "EmojiLaugh", /** * Emoji meh icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiMeh = "EmojiMeh", /** * Emoji multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiMultiple = "EmojiMultiple", /** * Emoji sad icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiSad = "EmojiSad", /** * Emoji sad slight icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiSadSlight = "EmojiSadSlight", /** * Emoji smile slight icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiSmileSlight = "EmojiSmileSlight", /** * Emoji sparkle icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiSparkle = "EmojiSparkle", /** * Emoji surprise icon. * * @remarks * [Api set: ExcelApi 1.16] */ emojiSurprise = "EmojiSurprise", /** * Engine icon. * * @remarks * [Api set: ExcelApi 1.16] */ engine = "Engine", /** * Eraser icon. * * @remarks * [Api set: ExcelApi 1.16] */ eraser = "Eraser", /** * Eye icon. * * @remarks * [Api set: ExcelApi 1.16] */ eye = "Eye", /** * Eyedropper icon. * * @remarks * [Api set: ExcelApi 1.16] */ eyedropper = "Eyedropper", /** * Fax icon. * * @remarks * [Api set: ExcelApi 1.16] */ fax = "Fax", /** * Fingerprint icon. * * @remarks * [Api set: ExcelApi 1.16] */ fingerprint = "Fingerprint", /** * First aid icon. Displays as a briefcase with a medical cross symbol. * * @remarks * [Api set: ExcelApi 1.16] */ firstAid = "FirstAid", /** * Flag icon. * * @remarks * [Api set: ExcelApi 1.16] */ flag = "Flag", /** * Flash icon. * * @remarks * [Api set: ExcelApi 1.16] */ flash = "Flash", /** * Flashlight icon. * * @remarks * [Api set: ExcelApi 1.16] */ flashlight = "Flashlight", /** * Flow icon. * * @remarks * [Api set: ExcelApi 1.16] */ flow = "Flow", /** * Flowchart icon. * * @remarks * [Api set: ExcelApi 1.16] */ flowchart = "Flowchart", /** * Folder icon. * * @remarks * [Api set: ExcelApi 1.16] */ folder = "Folder", /** * Folder open icon. * * @remarks * [Api set: ExcelApi 1.16] */ folderOpen = "FolderOpen", /** * Folder open vertical icon. * * @remarks * [Api set: ExcelApi 1.16] */ folderOpenVertical = "FolderOpenVertical", /** * Folder person icon. * * @remarks * [Api set: ExcelApi 1.16] */ folderPerson = "FolderPerson", /** * Folder zip icon. * * @remarks * [Api set: ExcelApi 1.16] */ folderZip = "FolderZip", /** * Food icon. * * @remarks * [Api set: ExcelApi 1.16] */ food = "Food", /** * Food apple icon. * * @remarks * [Api set: ExcelApi 1.16] */ foodApple = "FoodApple", /** * Food cake icon. * * @remarks * [Api set: ExcelApi 1.16] */ foodCake = "FoodCake", /** * Food egg icon. * * @remarks * [Api set: ExcelApi 1.16] */ foodEgg = "FoodEgg", /** * Food grains icon. * * @remarks * [Api set: ExcelApi 1.16] */ foodGrains = "FoodGrains", /** * Food pizza icon. * * @remarks * [Api set: ExcelApi 1.16] */ foodPizza = "FoodPizza", /** * Food toast icon. * * @remarks * [Api set: ExcelApi 1.16] */ foodToast = "FoodToast", /** * Galaxy icon. * * @remarks * [Api set: ExcelApi 1.16] */ galaxy = "Galaxy", /** * Games icon. * * @remarks * [Api set: ExcelApi 1.16] */ games = "Games", /** * Gantt chart icon. * * @remarks * [Api set: ExcelApi 1.16] */ ganttChart = "GanttChart", /** * Gas icon. * * @remarks * [Api set: ExcelApi 1.16] */ gas = "Gas", /** * Gas pump icon. * * @remarks * [Api set: ExcelApi 1.16] */ gasPump = "GasPump", /** * Gauge icon. * * @remarks * [Api set: ExcelApi 1.16] */ gauge = "Gauge", /** * Gavel icon. * * @remarks * [Api set: ExcelApi 1.16] */ gavel = "Gavel", /** * Gift icon. * * @remarks * [Api set: ExcelApi 1.16] */ gift = "Gift", /** * Gift card icon. * * @remarks * [Api set: ExcelApi 1.16] */ giftCard = "GiftCard", /** * Glasses icon. * * @remarks * [Api set: ExcelApi 1.16] */ glasses = "Glasses", /** * Globe icon. * * @remarks * [Api set: ExcelApi 1.16] */ globe = "Globe", /** * Globe surface icon. * * @remarks * [Api set: ExcelApi 1.16] */ globeSurface = "GlobeSurface", /** * Grid icon. * * @remarks * [Api set: ExcelApi 1.16] */ grid = "Grid", /** * Grid dots icon. * * @remarks * [Api set: ExcelApi 1.16] */ gridDots = "GridDots", /** * Grid Kanban icon. * * @remarks * [Api set: ExcelApi 1.16] */ gridKanban = "GridKanban", /** * Guardian icon. * * @remarks * [Api set: ExcelApi 1.16] */ guardian = "Guardian", /** * Guest icon. * * @remarks * [Api set: ExcelApi 1.16] */ guest = "Guest", /** * Guitar icon. * * @remarks * [Api set: ExcelApi 1.16] */ guitar = "Guitar", /** * Hand left icon. * * @remarks * [Api set: ExcelApi 1.16] */ handLeft = "HandLeft", /** * Hand right icon. * * @remarks * [Api set: ExcelApi 1.16] */ handRight = "HandRight", /** * Handshake icon. * * @remarks * [Api set: ExcelApi 1.16] */ handshake = "Handshake", /** * Hard drive icon. * * @remarks * [Api set: ExcelApi 1.16] */ hardDrive = "HardDrive", /** * Graduation hat icon. Displays as a hat with a tassel. * * @remarks * [Api set: ExcelApi 1.16] */ hatGraduation = "HatGraduation", /** * Headphones icon. * * @remarks * [Api set: ExcelApi 1.16] */ headphones = "Headphones", /** * Headphones sound wave icon. * * @remarks * [Api set: ExcelApi 1.16] */ headphonesSoundWave = "HeadphonesSoundWave", /** * Headset icon. * * @remarks * [Api set: ExcelApi 1.16] */ headset = "Headset", /** * Headset VR icon. * * @remarks * [Api set: ExcelApi 1.16] */ headsetVr = "HeadsetVr", /** * Heart icon. * * @remarks * [Api set: ExcelApi 1.16] */ heart = "Heart", /** * Heart broken icon. * * @remarks * [Api set: ExcelApi 1.16] */ heartBroken = "HeartBroken", /** * Heart circle icon. * * @remarks * [Api set: ExcelApi 1.16] */ heartCircle = "HeartCircle", /** * Human heart icon. * * @remarks * [Api set: ExcelApi 1.16] */ heartHuman = "HeartHuman", /** * Heart pulse icon. * * @remarks * [Api set: ExcelApi 1.16] */ heartPulse = "HeartPulse", /** * History icon. * * @remarks * [Api set: ExcelApi 1.16] */ history = "History", /** * Home icon. * * @remarks * [Api set: ExcelApi 1.16] */ home = "Home", /** * Home more icon. * * @remarks * [Api set: ExcelApi 1.16] */ homeMore = "HomeMore", /** * Home person icon. * * @remarks * [Api set: ExcelApi 1.16] */ homePerson = "HomePerson", /** * Icons icon. * * @remarks * [Api set: ExcelApi 1.16] */ icons = "Icons", /** * Image icon. * * @remarks * [Api set: ExcelApi 1.16] */ image = "Image", /** * Image globe icon. * * @remarks * [Api set: ExcelApi 1.16] */ imageGlobe = "ImageGlobe", /** * Image multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ imageMultiple = "ImageMultiple", /** * IoT icon. * * @remarks * [Api set: ExcelApi 1.16] */ iot = "Iot", /** * Joystick icon. * * @remarks * [Api set: ExcelApi 1.16] */ joystick = "Joystick", /** * Justice icon. Displays as the scales of justice. * * @remarks * [Api set: ExcelApi 1.16] */ justice = "Justice", /** * Key icon. * * @remarks * [Api set: ExcelApi 1.16] */ key = "Key", /** * Keyboard icon. * * @remarks * [Api set: ExcelApi 1.16] */ keyboard = "Keyboard", /** * Keyboard layout split icon. * * @remarks * [Api set: ExcelApi 1.16] */ keyboardLayoutSplit = "KeyboardLayoutSplit", /** * Key multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ keyMultiple = "KeyMultiple", /** * Languages icon. Displays as a document and a globe. * * @remarks * [Api set: ExcelApi 1.16] */ languages = "Languages", /** * Laptop icon. * * @remarks * [Api set: ExcelApi 1.16] */ laptop = "Laptop", /** * Lasso icon. * * @remarks * [Api set: ExcelApi 1.16] */ lasso = "Lasso", /** * Launcher settings icon. * * @remarks * [Api set: ExcelApi 1.16] */ launcherSettings = "LauncherSettings", /** * Layer icon. * * @remarks * [Api set: ExcelApi 1.16] */ layer = "Layer", /** * Leaf icon. * * @remarks * [Api set: ExcelApi 1.16] */ leaf = "Leaf", /** * Leaf one icon. * * @remarks * [Api set: ExcelApi 1.16] */ leafOne = "LeafOne", /** * Leaf three icon. * * @remarks * [Api set: ExcelApi 1.16] */ leafThree = "LeafThree", /** * Leaf two icon. * * @remarks * [Api set: ExcelApi 1.16] */ leafTwo = "LeafTwo", /** * Library icon. * * @remarks * [Api set: ExcelApi 1.16] */ library = "Library", /** * Lightbulb icon. * * @remarks * [Api set: ExcelApi 1.16] */ lightbulb = "Lightbulb", /** * Lightbulb filament icon. * * @remarks * [Api set: ExcelApi 1.16] */ lightbulbFilament = "LightbulbFilament", /** * Likert icon. * * @remarks * [Api set: ExcelApi 1.16] */ likert = "Likert", /** * Link icon. * * @remarks * [Api set: ExcelApi 1.16] */ link = "Link", /** * Local language icon. * * @remarks * [Api set: ExcelApi 1.16] */ localLanguage = "LocalLanguage", /** * Location icon. Displays as a map marker. * * @remarks * [Api set: ExcelApi 1.16] */ location = "Location", /** * Lock closed icon. * * @remarks * [Api set: ExcelApi 1.16] */ lockClosed = "LockClosed", /** * Lock multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ lockMultiple = "LockMultiple", /** * Lock open icon. * * @remarks * [Api set: ExcelApi 1.16] */ lockOpen = "LockOpen", /** * Lottery icon. * * @remarks * [Api set: ExcelApi 1.16] */ lottery = "Lottery", /** * Luggage icon. * * @remarks * [Api set: ExcelApi 1.16] */ luggage = "Luggage", /** * Mail icon. * * @remarks * [Api set: ExcelApi 1.16] */ mail = "Mail", /** * Mail inbox icon. * * @remarks * [Api set: ExcelApi 1.16] */ mailInbox = "MailInbox", /** * Mail multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ mailMultiple = "MailMultiple", /** * Map icon. * * @remarks * [Api set: ExcelApi 1.16] */ map = "Map", /** * Map pin icon. * * @remarks * [Api set: ExcelApi 1.16] */ mapPin = "MapPin", /** * Markdown icon. * * @remarks * [Api set: ExcelApi 1.16] */ markdown = "Markdown", /** * Math formula icon. * * @remarks * [Api set: ExcelApi 1.16] */ mathFormula = "MathFormula", /** * Math symbols icon. * * @remarks * [Api set: ExcelApi 1.16] */ mathSymbols = "MathSymbols", /** * Max icon. * * @remarks * [Api set: ExcelApi 1.16] */ max = "Max", /** * Megaphone icon. * * @remarks * [Api set: ExcelApi 1.16] */ megaphone = "Megaphone", /** * Megaphone loud icon. * * @remarks * [Api set: ExcelApi 1.16] */ megaphoneLoud = "MegaphoneLoud", /** * Mention icon. * * @remarks * [Api set: ExcelApi 1.16] */ mention = "Mention", /** * Mic icon. * * @remarks * [Api set: ExcelApi 1.16] */ mic = "Mic", /** * Microscope icon. * * @remarks * [Api set: ExcelApi 1.16] */ microscope = "Microscope", /** * Midi icon. * * @remarks * [Api set: ExcelApi 1.16] */ midi = "Midi", /** * Molecule icon. * * @remarks * [Api set: ExcelApi 1.16] */ molecule = "Molecule", /** * Money icon. Displays as paper money and coins. * * @remarks * [Api set: ExcelApi 1.16] */ money = "Money", /** * Money hand icon. * * @remarks * [Api set: ExcelApi 1.16] */ moneyHand = "MoneyHand", /** * Mountain icon. * * @remarks * [Api set: ExcelApi 1.16] */ mountain = "Mountain", /** * Movie camera icon. Displays as a video camera. * * @remarks * [Api set: ExcelApi 1.16] */ movieCamera = "MovieCamera", /** * Movies and TV icon. * * @remarks * [Api set: ExcelApi 1.16] */ moviesAndTv = "MoviesAndTv", /** * Music note icon. * * @remarks * [Api set: ExcelApi 1.16] */ musicNote = "MusicNote", /** * Music note icon. * * @remarks * [Api set: ExcelApi 1.16] */ musicNote1 = "MusicNote1", /** * Music double note icon. * * @remarks * [Api set: ExcelApi 1.16] */ musicNote2 = "MusicNote2", /** * My location icon. * * @remarks * [Api set: ExcelApi 1.16] */ myLocation = "MyLocation", /** * N by N icon. Displays as a three by three grid. * * @remarks * [Api set: ExcelApi 1.16] */ nByN = "NByN", /** * N by one icon. Displays as a three by one grid. * * @remarks * [Api set: ExcelApi 1.16] */ nByOne = "NByOne", /** * News icon. * * @remarks * [Api set: ExcelApi 1.16] */ news = "News", /** * Notable people icon. * * @remarks * [Api set: ExcelApi 1.16] */ notablePeople = "NotablePeople", /** * Note icon. * * @remarks * [Api set: ExcelApi 1.16] */ note = "Note", /** * Notebook icon. * * @remarks * [Api set: ExcelApi 1.16] */ notebook = "Notebook", /** * Notepad icon. * * @remarks * [Api set: ExcelApi 1.16] */ notepad = "Notepad", /** * Notepad person icon. * * @remarks * [Api set: ExcelApi 1.16] */ notepadPerson = "NotepadPerson", /** * One by N icon. Displays as a one by three grid. * * @remarks * [Api set: ExcelApi 1.16] */ oneByN = "OneByN", /** * One by one icon. Displays as a one by one grid. * * @remarks * [Api set: ExcelApi 1.16] */ oneByOne = "OneByOne", /** * Options icon. * * @remarks * [Api set: ExcelApi 1.16] */ options = "Options", /** * Organization icon. * * @remarks * [Api set: ExcelApi 1.16] */ organization = "Organization", /** * Organization horizontal icon. * * @remarks * [Api set: ExcelApi 1.16] */ organizationHorizontal = "OrganizationHorizontal", /** * Oval icon. * * @remarks * [Api set: ExcelApi 1.16] */ oval = "Oval", /** * Paint brush icon. * * @remarks * [Api set: ExcelApi 1.16] */ paintBrush = "PaintBrush", /** * Paint bucket icon. * * @remarks * [Api set: ExcelApi 1.16] */ paintBucket = "PaintBucket", /** * Partly sunny weather icon. * * @remarks * [Api set: ExcelApi 1.16] */ partlySunnyWeather = "PartlySunnyWeather", /** * Password icon. * * @remarks * [Api set: ExcelApi 1.16] */ password = "Password", /** * Patch icon. * * @remarks * [Api set: ExcelApi 1.16] */ patch = "Patch", /** * Patient icon. * * @remarks * [Api set: ExcelApi 1.16] */ patient = "Patient", /** * Payment icon. * * @remarks * [Api set: ExcelApi 1.16] */ payment = "Payment", /** * Pen icon. * * @remarks * [Api set: ExcelApi 1.16] */ pen = "Pen", /** * Pentagon icon. * * @remarks * [Api set: ExcelApi 1.16] */ pentagon = "Pentagon", /** * People icon. * * @remarks * [Api set: ExcelApi 1.16] */ people = "People", /** * People audience icon. * * @remarks * [Api set: ExcelApi 1.16] */ peopleAudience = "PeopleAudience", /** * People call icon. * * @remarks * [Api set: ExcelApi 1.16] */ peopleCall = "PeopleCall", /** * People community icon. * * @remarks * [Api set: ExcelApi 1.16] */ peopleCommunity = "PeopleCommunity", /** * People money icon. * * @remarks * [Api set: ExcelApi 1.16] */ peopleMoney = "PeopleMoney", /** * People queue icon. * * @remarks * [Api set: ExcelApi 1.16] */ peopleQueue = "PeopleQueue", /** * People team icon. * * @remarks * [Api set: ExcelApi 1.16] */ peopleTeam = "PeopleTeam", /** * People toolbox icon. * * @remarks * [Api set: ExcelApi 1.16] */ peopleToolbox = "PeopleToolbox", /** * Person icon. * * @remarks * [Api set: ExcelApi 1.16] */ person = "Person", /** * Person board icon. * * @remarks * [Api set: ExcelApi 1.16] */ personBoard = "PersonBoard", /** * Person call icon. * * @remarks * [Api set: ExcelApi 1.16] */ personCall = "PersonCall", /** * Person chat icon. * * @remarks * [Api set: ExcelApi 1.16] */ personChat = "PersonChat", /** * Person feedback icon. * * @remarks * [Api set: ExcelApi 1.16] */ personFeedback = "PersonFeedback", /** * Person support icon. * * @remarks * [Api set: ExcelApi 1.16] */ personSupport = "PersonSupport", /** * Person voice icon. * * @remarks * [Api set: ExcelApi 1.16] */ personVoice = "PersonVoice", /** * Phone icon. * * @remarks * [Api set: ExcelApi 1.16] */ phone = "Phone", /** * Phone desktop icon. * * @remarks * [Api set: ExcelApi 1.16] */ phoneDesktop = "PhoneDesktop", /** * Phone laptop icon. * * @remarks * [Api set: ExcelApi 1.16] */ phoneLaptop = "PhoneLaptop", /** * Phone shake icon. * * @remarks * [Api set: ExcelApi 1.16] */ phoneShake = "PhoneShake", /** * Phone tablet icon. * * @remarks * [Api set: ExcelApi 1.16] */ phoneTablet = "PhoneTablet", /** * Phone vibrate icon. * * @remarks * [Api set: ExcelApi 1.16] */ phoneVibrate = "PhoneVibrate", /** * Photo filter icon. * * @remarks * [Api set: ExcelApi 1.16] */ photoFilter = "PhotoFilter", /** * Pi icon. * * @remarks * [Api set: ExcelApi 1.16] */ pi = "Pi", /** * Picture in picture icon. * * @remarks * [Api set: ExcelApi 1.16] */ pictureInPicture = "PictureInPicture", /** * Pilates icon. * * @remarks * [Api set: ExcelApi 1.16] */ pilates = "Pilates", /** * Pill icon. * * @remarks * [Api set: ExcelApi 1.16] */ pill = "Pill", /** * Pin icon. * * @remarks * [Api set: ExcelApi 1.16] */ pin = "Pin", /** * Pipeline icon. * * @remarks * [Api set: ExcelApi 1.16] */ pipeline = "Pipeline", /** * Planet icon. * * @remarks * [Api set: ExcelApi 1.16] */ planet = "Planet", /** * Playing cards icon. * * @remarks * [Api set: ExcelApi 1.16] */ playingCards = "PlayingCards", /** * Plug connected icon. * * @remarks * [Api set: ExcelApi 1.16] */ plugConnected = "PlugConnected", /** * Plug disconnected icon. * * @remarks * [Api set: ExcelApi 1.16] */ plugDisconnected = "PlugDisconnected", /** * Point scan icon. Displays as a target focus symbol. * * @remarks * [Api set: ExcelApi 1.16] */ pointScan = "PointScan", /** * Poll icon. * * @remarks * [Api set: ExcelApi 1.16] */ poll = "Poll", /** * Power icon. * * @remarks * [Api set: ExcelApi 1.16] */ power = "Power", /** * Predictions icon. * * @remarks * [Api set: ExcelApi 1.16] */ predictions = "Predictions", /** * Premium icon. * * @remarks * [Api set: ExcelApi 1.16] */ premium = "Premium", /** * Presenter icon. * * @remarks * [Api set: ExcelApi 1.16] */ presenter = "Presenter", /** * Preview link icon. * * @remarks * [Api set: ExcelApi 1.16] */ previewLink = "PreviewLink", /** * Print icon. * * @remarks * [Api set: ExcelApi 1.16] */ print = "Print", /** * Production icon. * * @remarks * [Api set: ExcelApi 1.16] */ production = "Production", /** * Prohibited icon. * * @remarks * [Api set: ExcelApi 1.16] */ prohibited = "Prohibited", /** * Projection screen icon. * * @remarks * [Api set: ExcelApi 1.16] */ projectionScreen = "ProjectionScreen", /** * Protocol handler icon. * * @remarks * [Api set: ExcelApi 1.16] */ protocolHandler = "ProtocolHandler", /** * Pulse icon. * * @remarks * [Api set: ExcelApi 1.16] */ pulse = "Pulse", /** * Pulse square icon. * * @remarks * [Api set: ExcelApi 1.16] */ pulseSquare = "PulseSquare", /** * Puzzle piece icon. * * @remarks * [Api set: ExcelApi 1.16] */ puzzlePiece = "PuzzlePiece", /** * QR code icon. * * @remarks * [Api set: ExcelApi 1.16] */ qrCode = "QrCode", /** * Radar icon. * * @remarks * [Api set: ExcelApi 1.16] */ radar = "Radar", /** * Ram icon. * * @remarks * [Api set: ExcelApi 1.16] */ ram = "Ram", /** * Reading list icon. * * @remarks * [Api set: ExcelApi 1.16] */ readingList = "ReadingList", /** * Real estate icon. * * @remarks * [Api set: ExcelApi 1.16] */ realEstate = "RealEstate", /** * Receipt icon. * * @remarks * [Api set: ExcelApi 1.16] */ receipt = "Receipt", /** * Reward icon. * * @remarks * [Api set: ExcelApi 1.16] */ reward = "Reward", /** * Rhombus icon. * * @remarks * [Api set: ExcelApi 1.16] */ rhombus = "Rhombus", /** * Ribbon icon. * * @remarks * [Api set: ExcelApi 1.16] */ ribbon = "Ribbon", /** * Ribbon star icon. * * @remarks * [Api set: ExcelApi 1.16] */ ribbonStar = "RibbonStar", /** * Road cone icon. * * @remarks * [Api set: ExcelApi 1.16] */ roadCone = "RoadCone", /** * Rocket icon. * * @remarks * [Api set: ExcelApi 1.16] */ rocket = "Rocket", /** * Router icon. * * @remarks * [Api set: ExcelApi 1.16] */ router = "Router", /** * RSS icon. * * @remarks * [Api set: ExcelApi 1.16] */ rss = "Rss", /** * Ruler icon. * * @remarks * [Api set: ExcelApi 1.16] */ ruler = "Ruler", /** * Run icon. * * @remarks * [Api set: ExcelApi 1.16] */ run = "Run", /** * Running icon. * * @remarks * [Api set: ExcelApi 1.16] */ running = "Running", /** * Satellite icon. * * @remarks * [Api set: ExcelApi 1.16] */ satellite = "Satellite", /** * Save icon. * * @remarks * [Api set: ExcelApi 1.16] */ save = "Save", /** * Savings icon. * * @remarks * [Api set: ExcelApi 1.16] */ savings = "Savings", /** * Scales icon. * * @remarks * [Api set: ExcelApi 1.16] */ scales = "Scales", /** * Scan icon. * * @remarks * [Api set: ExcelApi 1.16] */ scan = "Scan", /** * Scratchpad icon. * * @remarks * [Api set: ExcelApi 1.16] */ scratchpad = "Scratchpad", /** * Screen person icon. * * @remarks * [Api set: ExcelApi 1.16] */ screenPerson = "ScreenPerson", /** * Screenshot icon. * * @remarks * [Api set: ExcelApi 1.16] */ screenshot = "Screenshot", /** * Search icon. * * @remarks * [Api set: ExcelApi 1.16] */ search = "Search", /** * Serial port icon. * * @remarks * [Api set: ExcelApi 1.16] */ serialPort = "SerialPort", /** * Server icon. * * @remarks * [Api set: ExcelApi 1.16] */ server = "Server", /** * Server multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ serverMultiple = "ServerMultiple", /** * Service bell icon. * * @remarks * [Api set: ExcelApi 1.16] */ serviceBell = "ServiceBell", /** * Settings icon. * * @remarks * [Api set: ExcelApi 1.16] */ settings = "Settings", /** * Shapes icon. * * @remarks * [Api set: ExcelApi 1.16] */ shapes = "Shapes", /** * Shield icon. * * @remarks * [Api set: ExcelApi 1.16] */ shield = "Shield", /** * Shield task icon. * * @remarks * [Api set: ExcelApi 1.16] */ shieldTask = "ShieldTask", /** * Shopping bag icon. * * @remarks * [Api set: ExcelApi 1.16] */ shoppingBag = "ShoppingBag", /** * Signature icon. * * @remarks * [Api set: ExcelApi 1.16] */ signature = "Signature", /** * Sim icon. * * @remarks * [Api set: ExcelApi 1.16] */ sim = "Sim", /** * Sleep icon. * * @remarks * [Api set: ExcelApi 1.16] */ sleep = "Sleep", /** * Smartwatch icon. * * @remarks * [Api set: ExcelApi 1.16] */ smartwatch = "Smartwatch", /** * Sound source icon. * * @remarks * [Api set: ExcelApi 1.16] */ soundSource = "SoundSource", /** * Sound wave circle icon. * * @remarks * [Api set: ExcelApi 1.16] */ soundWaveCircle = "SoundWaveCircle", /** * Sparkle icon. * * @remarks * [Api set: ExcelApi 1.16] */ sparkle = "Sparkle", /** * Speaker icon. * * @remarks * [Api set: ExcelApi 1.16] */ speaker0 = "Speaker0", /** * Speaker with sound wave icon. * * @remarks * [Api set: ExcelApi 1.16] */ speaker2 = "Speaker2", /** * Sport icon. * * @remarks * [Api set: ExcelApi 1.16] */ sport = "Sport", /** * Sport american football icon. * * @remarks * [Api set: ExcelApi 1.16] */ sportAmericanFootball = "SportAmericanFootball", /** * Sport baseball icon. * * @remarks * [Api set: ExcelApi 1.16] */ sportBaseball = "SportBaseball", /** * Sport basketball icon. * * @remarks * [Api set: ExcelApi 1.16] */ sportBasketball = "SportBasketball", /** * Sport hockey icon. * * @remarks * [Api set: ExcelApi 1.16] */ sportHockey = "SportHockey", /** * Sport soccer icon. * * @remarks * [Api set: ExcelApi 1.16] */ sportSoccer = "SportSoccer", /** * Square multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ squareMultiple = "SquareMultiple", /** * Square shadow icon. * * @remarks * [Api set: ExcelApi 1.16] */ squareShadow = "SquareShadow", /** * Squares nested icon. * * @remarks * [Api set: ExcelApi 1.16] */ squaresNested = "SquaresNested", /** * Stack icon. * * @remarks * [Api set: ExcelApi 1.16] */ stack = "Stack", /** * Stack star icon. * * @remarks * [Api set: ExcelApi 1.16] */ stackStar = "StackStar", /** * Star icon. * * @remarks * [Api set: ExcelApi 1.16] */ star = "Star", /** * Star filled icon. * * @remarks * [Api set: ExcelApi 1.16] */ starFilled = "StarFilled", /** * Star half icon. * * @remarks * [Api set: ExcelApi 1.16] */ starHalf = "StarHalf", /** * Star with 3 horizontal lines icon. * * @remarks * [Api set: ExcelApi 1.16] */ starLineHorizontal3 = "StarLineHorizontal3", /** * Star one quarter icon. * * @remarks * [Api set: ExcelApi 1.16] */ starOneQuarter = "StarOneQuarter", /** * Star three quarter icon. * * @remarks * [Api set: ExcelApi 1.16] */ starThreeQuarter = "StarThreeQuarter", /** * Status icon. * * @remarks * [Api set: ExcelApi 1.16] */ status = "Status", /** * Steps icon. * * @remarks * [Api set: ExcelApi 1.16] */ steps = "Steps", /** * Stethoscope icon. * * @remarks * [Api set: ExcelApi 1.16] */ stethoscope = "Stethoscope", /** * Sticker icon. * * @remarks * [Api set: ExcelApi 1.16] */ sticker = "Sticker", /** * Storage icon. * * @remarks * [Api set: ExcelApi 1.16] */ storage = "Storage", /** * Stream icon. * * @remarks * [Api set: ExcelApi 1.16] */ stream = "Stream", /** * Stream input icon. * * @remarks * [Api set: ExcelApi 1.16] */ streamInput = "StreamInput", /** * Stream input output icon. * * @remarks * [Api set: ExcelApi 1.16] */ streamInputOutput = "StreamInputOutput", /** * Stream output icon. * * @remarks * [Api set: ExcelApi 1.16] */ streamOutput = "StreamOutput", /** * Style guide icon. * * @remarks * [Api set: ExcelApi 1.16] */ styleGuide = "StyleGuide", /** * Sub grid icon. * * @remarks * [Api set: ExcelApi 1.16] */ subGrid = "SubGrid", /** * Subtitles icon. * * @remarks * [Api set: ExcelApi 1.16] */ subtitles = "Subtitles", /** * Surface earbuds icon. * * @remarks * [Api set: ExcelApi 1.16] */ surfaceEarbuds = "SurfaceEarbuds", /** * Surface hub icon. * * @remarks * [Api set: ExcelApi 1.16] */ surfaceHub = "SurfaceHub", /** * Symbols icon. * * @remarks * [Api set: ExcelApi 1.16] */ symbols = "Symbols", /** * Syringe icon. * * @remarks * [Api set: ExcelApi 1.16] */ syringe = "Syringe", /** * System icon. * * @remarks * [Api set: ExcelApi 1.16] */ system = "System", /** * Tab desktop icon. * * @remarks * [Api set: ExcelApi 1.16] */ tabDesktop = "TabDesktop", /** * Tab InPrivate account icon. * * @remarks * [Api set: ExcelApi 1.16] */ tabInprivateAccount = "TabInprivateAccount", /** * Table icon. * * @remarks * [Api set: ExcelApi 1.16] */ table = "Table", /** * Table image icon. * * @remarks * [Api set: ExcelApi 1.16] */ tableImage = "TableImage", /** * Table multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ tableMultiple = "TableMultiple", /** * Tablet icon. * * @remarks * [Api set: ExcelApi 1.16] */ tablet = "Tablet", /** * Tabs icon. * * @remarks * [Api set: ExcelApi 1.16] */ tabs = "Tabs", /** * Tag icon. * * @remarks * [Api set: ExcelApi 1.16] */ tag = "Tag", /** * Tag circle icon. * * @remarks * [Api set: ExcelApi 1.16] */ tagCircle = "TagCircle", /** * Tag multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ tagMultiple = "TagMultiple", /** * Target icon. * * @remarks * [Api set: ExcelApi 1.16] */ target = "Target", /** * Target arrow icon. * * @remarks * [Api set: ExcelApi 1.16] */ targetArrow = "TargetArrow", /** * Teddy icon. * * @remarks * [Api set: ExcelApi 1.16] */ teddy = "Teddy", /** * Temperature icon. * * @remarks * [Api set: ExcelApi 1.16] */ temperature = "Temperature", /** * Tent icon. * * @remarks * [Api set: ExcelApi 1.16] */ tent = "Tent", /** * Tetris app icon. * * @remarks * [Api set: ExcelApi 1.16] */ tetrisApp = "TetrisApp", /** * Textbox icon. * * @remarks * [Api set: ExcelApi 1.16] */ textbox = "Textbox", /** * Text quote icon. * * @remarks * [Api set: ExcelApi 1.16] */ textQuote = "TextQuote", /** * Thinking icon. * * @remarks * [Api set: ExcelApi 1.16] */ thinking = "Thinking", /** * Thumb dislike icon. * * @remarks * [Api set: ExcelApi 1.16] */ thumbDislike = "ThumbDislike", /** * Thumb like icon. * * @remarks * [Api set: ExcelApi 1.16] */ thumbLike = "ThumbLike", /** * Ticket diagonal icon. * * @remarks * [Api set: ExcelApi 1.16] */ ticketDiagonal = "TicketDiagonal", /** * Ticket horizontal icon. * * @remarks * [Api set: ExcelApi 1.16] */ ticketHorizontal = "TicketHorizontal", /** * Time and weather icon. * * @remarks * [Api set: ExcelApi 1.16] */ timeAndWeather = "TimeAndWeather", /** * Timeline icon. * * @remarks * [Api set: ExcelApi 1.16] */ timeline = "Timeline", /** * Timer icon. * * @remarks * [Api set: ExcelApi 1.16] */ timer = "Timer", /** * Toolbox icon. * * @remarks * [Api set: ExcelApi 1.16] */ toolbox = "Toolbox", /** * Top speed icon. * * @remarks * [Api set: ExcelApi 1.16] */ topSpeed = "TopSpeed", /** * Translate icon. * * @remarks * [Api set: ExcelApi 1.16] */ translate = "Translate", /** * Transmission icon. * * @remarks * [Api set: ExcelApi 1.16] */ transmission = "Transmission", /** * Tree deciduous icon. * * @remarks * [Api set: ExcelApi 1.16] */ treeDeciduous = "TreeDeciduous", /** * Tree evergreen icon. * * @remarks * [Api set: ExcelApi 1.16] */ treeEvergreen = "TreeEvergreen", /** * Trophy icon. * * @remarks * [Api set: ExcelApi 1.16] */ trophy = "Trophy", /** * TV icon. * * @remarks * [Api set: ExcelApi 1.16] */ tv = "Tv", /** * TV USB icon. * * @remarks * [Api set: ExcelApi 1.16] */ tvUsb = "TvUsb", /** * Umbrella icon. * * @remarks * [Api set: ExcelApi 1.16] */ umbrella = "Umbrella", /** * USB plug icon. * * @remarks * [Api set: ExcelApi 1.16] */ usbPlug = "UsbPlug", /** * USB stick icon. * * @remarks * [Api set: ExcelApi 1.16] */ usbStick = "UsbStick", /** * Vault icon. * * @remarks * [Api set: ExcelApi 1.16] */ vault = "Vault", /** * Vehicle bicycle icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleBicycle = "VehicleBicycle", /** * Vehicle bus icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleBus = "VehicleBus", /** * Vehicle cab icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleCab = "VehicleCab", /** * Vehicle car icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleCar = "VehicleCar", /** * Vehicle car collision icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleCarCollision = "VehicleCarCollision", /** * Vehicle car profile left-to-right icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleCarProfileLtr = "VehicleCarProfileLtr", /** * Vehicle car profile right-to-left icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleCarProfileRtl = "VehicleCarProfileRtl", /** * Vehicle ship icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleShip = "VehicleShip", /** * Vehicle subway icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleSubway = "VehicleSubway", /** * Vehicle truck icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleTruck = "VehicleTruck", /** * Vehicle truck bag icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleTruckBag = "VehicleTruckBag", /** * Vehicle truck cube icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleTruckCube = "VehicleTruckCube", /** * Vehicle truck profile icon. * * @remarks * [Api set: ExcelApi 1.16] */ vehicleTruckProfile = "VehicleTruckProfile", /** * Video icon. * * @remarks * [Api set: ExcelApi 1.16] */ video = "Video", /** * Video 360 icon. * * @remarks * [Api set: ExcelApi 1.16] */ video360 = "Video360", /** * Video chat icon. * * @remarks * [Api set: ExcelApi 1.16] */ videoChat = "VideoChat", /** * Video clip icon. * * @remarks * [Api set: ExcelApi 1.16] */ videoClip = "VideoClip", /** * Video clip multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ videoClipMultiple = "VideoClipMultiple", /** * Video person icon. * * @remarks * [Api set: ExcelApi 1.16] */ videoPerson = "VideoPerson", /** * Video recording icon. * * @remarks * [Api set: ExcelApi 1.16] */ videoRecording = "VideoRecording", /** * Video security icon. * * @remarks * [Api set: ExcelApi 1.16] */ videoSecurity = "VideoSecurity", /** * View desktop icon. * * @remarks * [Api set: ExcelApi 1.16] */ viewDesktop = "ViewDesktop", /** * View desktop mobile icon. * * @remarks * [Api set: ExcelApi 1.16] */ viewDesktopMobile = "ViewDesktopMobile", /** * Violin icon. * * @remarks * [Api set: ExcelApi 1.16] */ violin = "Violin", /** * Virtual network icon. * * @remarks * [Api set: ExcelApi 1.16] */ virtualNetwork = "VirtualNetwork", /** * Voicemail icon. * * @remarks * [Api set: ExcelApi 1.16] */ voicemail = "Voicemail", /** * Vote icon. * * @remarks * [Api set: ExcelApi 1.16] */ vote = "Vote", /** * Walkie talkie icon. * * @remarks * [Api set: ExcelApi 1.16] */ walkieTalkie = "WalkieTalkie", /** * Wallet icon. * * @remarks * [Api set: ExcelApi 1.16] */ wallet = "Wallet", /** * Wallet credit card icon. * * @remarks * [Api set: ExcelApi 1.16] */ walletCreditCard = "WalletCreditCard", /** * Wallpaper icon. * * @remarks * [Api set: ExcelApi 1.16] */ wallpaper = "Wallpaper", /** * Wand icon. * * @remarks * [Api set: ExcelApi 1.16] */ wand = "Wand", /** * Warning icon. * * @remarks * [Api set: ExcelApi 1.16] */ warning = "Warning", /** * Weather blowing snow icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherBlowingSnow = "WeatherBlowingSnow", /** * Weather cloudy icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherCloudy = "WeatherCloudy", /** * Weather drizzle icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherDrizzle = "WeatherDrizzle", /** * Weather duststorm icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherDuststorm = "WeatherDuststorm", /** * Weather fog icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherFog = "WeatherFog", /** * Weather hail day icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherHailDay = "WeatherHailDay", /** * Weather hail night icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherHailNight = "WeatherHailNight", /** * Weather haze icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherHaze = "WeatherHaze", /** * Weather moon icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherMoon = "WeatherMoon", /** * Weather partly cloudy day icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherPartlyCloudyDay = "WeatherPartlyCloudyDay", /** * Weather partly cloudy night icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherPartlyCloudyNight = "WeatherPartlyCloudyNight", /** * Weather rain icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherRain = "WeatherRain", /** * Weather rain showers day icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherRainShowersDay = "WeatherRainShowersDay", /** * Weather rain showers night icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherRainShowersNight = "WeatherRainShowersNight", /** * Weather rain snow icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherRainSnow = "WeatherRainSnow", /** * Weather snow icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherSnow = "WeatherSnow", /** * Weather snowflake icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherSnowflake = "WeatherSnowflake", /** * Weather snow shower day icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherSnowShowerDay = "WeatherSnowShowerDay", /** * Weather snow shower night icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherSnowShowerNight = "WeatherSnowShowerNight", /** * Weather squalls icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherSqualls = "WeatherSqualls", /** * Weather sunny high icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherSunnyHigh = "WeatherSunnyHigh", /** * Weather sunny low icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherSunnyLow = "WeatherSunnyLow", /** * Weather thunderstorm icon. * * @remarks * [Api set: ExcelApi 1.16] */ weatherThunderstorm = "WeatherThunderstorm", /** * Web asset icon. * * @remarks * [Api set: ExcelApi 1.16] */ webAsset = "WebAsset", /** * Whiteboard icon. * * @remarks * [Api set: ExcelApi 1.16] */ whiteboard = "Whiteboard", /** * Wifi signal with 3 bars icon. * * @remarks * [Api set: ExcelApi 1.16] */ wifi1 = "Wifi1", /** * Wifi signal with 2 bars icon. * * @remarks * [Api set: ExcelApi 1.16] */ wifi2 = "Wifi2", /** * Window icon. * * @remarks * [Api set: ExcelApi 1.16] */ window = "Window", /** * Window multiple icon. * * @remarks * [Api set: ExcelApi 1.16] */ windowMultiple = "WindowMultiple", /** * Window wrench icon. * * @remarks * [Api set: ExcelApi 1.16] */ windowWrench = "WindowWrench", /** * Wrench icon. * * @remarks * [Api set: ExcelApi 1.16] */ wrench = "Wrench", /** * Wrench screwdriver icon. * * @remarks * [Api set: ExcelApi 1.16] */ wrenchScrewdriver = "WrenchScrewdriver", /** * X-ray icon. * * @remarks * [Api set: ExcelApi 1.16] */ xray = "Xray", /** * Yoga icon. * * @remarks * [Api set: ExcelApi 1.16] */ yoga = "Yoga" } /** * Represents a reference into `referencedValues`. One scenario for using this reference is to avoid duplicating cell value objects (such as an `EntityCellValue`). Define a cell value object once in `referencedValues`, and then refer to that cell value from many places by using a `ReferenceCellValue` where the duplicated value would have appeared. * * @remarks * [Api set: ExcelApi 1.16] */ interface ReferenceCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.reference | "Reference"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: boolean | number | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; /** * Represents the index into the `referencedValues` properties of cell values such as `EntityCellValue` and `ArrayCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ reference: number; } /** * Represents a reference to the value which contains `referencedValues`. * * @remarks * [Api set: ExcelApi 1.16] */ interface RootReferenceCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: ReferenceValueType.root | "Root"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: boolean | number | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; } /** * Represents the types of the `ReferenceValue` object. * * @remarks * [Api set: ExcelApi 1.16] */ enum ReferenceValueType { /** * Represents an `ArrayCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ array = "Array", /** * Represents an `EntityCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ entity = "Entity", /** * Represents a `RootReferenceCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ root = "Root" } /** * Represents the value in a cell. * * @remarks * [Api set: ExcelApi 1.16] */ type ReferencedValue = ArrayCellValue | EntityCellValue | RootReferenceCellValue; /** * Represents the types of the `CellValue` object. * * @remarks * [Api set: ExcelApi 1.16] */ enum CellValueType { /** * Represents an `ArrayCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ array = "Array", /** * Represents a `BooleanCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ boolean = "Boolean", /** * Represents a `DoubleCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ double = "Double", /** * Represents an `EntityCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ entity = "Entity", /** * Represents an `EmptyCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ empty = "Empty", /** * Represents an `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ error = "Error", /** * Represents a `FormattedNumberCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ formattedNumber = "FormattedNumber", /** * Represents a `LinkedEntityCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ linkedEntity = "LinkedEntity", /** * Represents a `ReferenceCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ reference = "Reference", /** * Represents a `StringCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ string = "String", /** * Represents a `ValueTypeNotAvailableCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ notAvailable = "NotAvailable", /** * Represents a `WebImageCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ webImage = "WebImage" } /** * Represents the value in a cell. * * @remarks * [Api set: ExcelApi 1.16] */ type CellValue = (ArrayCellValue | BooleanCellValue | DoubleCellValue | EntityCellValue | EmptyCellValue | ErrorCellValue | FormattedNumberCellValue | LinkedEntityCellValue | ReferenceCellValue | StringCellValue | ValueTypeNotAvailableCellValue | WebImageCellValue) & CellValueExtraProperties; /** * These extra properties may appear on a `CellValue` and provide information about that `CellValue`, but the extra properties are not part of the value in the cell. * * @remarks * [Api set: ExcelApi 1.16] */ interface CellValueExtraProperties { /** * Represents whether this `CellValue` will be used to overwrite a cell. * When false, APIs which would use this `CellValue` to overwrite a cell will instead ignore this value without throwing an error. * The default value is true. * * @remarks * [Api set: ExcelApi 1.16] */ writable?: boolean; /** * Represents an explanation about why `CellValue.writable` is specified as false. * Note: This string is only available if `writable` is specified as false. * * @remarks * [Api set: ExcelApi 1.16] */ writableNote?: string; } /** * Represents the value and metadata of a property. The metadata applies to the property (and not the value), but it is combined with the value in this type. * * @remarks * [Api set: ExcelApi 1.16] */ type CellValueAndPropertyMetadata = (CellValue) & EntityPropertyExtraProperties; /** * The attribution attributes object represents the set of details that can be used to describe where information came from, if the information comes from a public source. * * @remarks * [Api set: ExcelApi 1.16] */ interface CellValueAttributionAttributes { /** * Represents a URL to the source of the `CellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ sourceAddress?: string; /** * Represents a name for the source of the `CellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ sourceText?: string; /** * Represents a URL to a license or source that describes how this property can be used. * * @remarks * [Api set: ExcelApi 1.16] */ licenseAddress?: string; /** * Represents a name for the license that governs this property. * * @remarks * [Api set: ExcelApi 1.16] */ licenseText?: string; } /** * Represents the value of a cell containing a #BUSY! error. * This type of error is used as a placeholder while the value of a cell is downloaded. * * @remarks * [Api set: ExcelApi 1.16] */ interface PlaceholderErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#BUSY!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.placeholder | "Placeholder"; /** * `PlaceholderErrorCellValue` is used during processing, while data is downloaded. The `target` property represents the data that is downloading, the data for which the `PlaceholderErrorCellValue` object is a placeholder. * * @remarks * [Api set: ExcelApi 1.16] */ target: LinkedEntityCellValue | WebImageCellValue; } /** * The provider attributes object represents the set of details used in card view to provide specified branding information for a `CellValue` type that supports provider attributes. * * @remarks * [Api set: ExcelApi 1.16] */ interface CellValueProviderAttributes { /** * Represents the provider description property that is used in card view if no logo is specified. * If a logo is specified, this will be used as tooltip text. * * @remarks * [Api set: ExcelApi 1.16] */ description?: string; /** * Represents a URL used to download an image that will be used as a logo in card view. * * @remarks * [Api set: ExcelApi 1.16] */ logoSourceAddress?: string; /** * Represents a URL that is the navigation target if the user clicks on the logo element in card view. * * @remarks * [Api set: ExcelApi 1.16] */ logoTargetAddress?: string; } /** * Metadata about a property in `EntityCellValue.properties`. * * @remarks * [Api set: ExcelApi 1.16] */ interface CellValuePropertyMetadata { /** * Represents which features this property is excluded from. * * @remarks * [Api set: ExcelApi 1.16] */ excludeFrom?: CellValuePropertyMetadataExclusions; /** * Represents the sublabel for this property shown in card view. * * @remarks * [Api set: ExcelApi 1.16] */ sublabel?: string; /** * Represents attribution information to describe the source and license requirements for using this property. * * @remarks * [Api set: ExcelApi 1.16] */ attribution?: CellValueAttributionAttributes[]; } /** * Represents the exclusion of a property in `EntityCellValue.properties` from features of Excel. * * @remarks * [Api set: ExcelApi 1.16] */ interface CellValuePropertyMetadataExclusions { /** * True represents that the property is excluded from the properties shown by card view. False and undefined represent the default behavior of including the property. * * @remarks * [Api set: ExcelApi 1.16] */ cardView?: boolean; /** * True represents that the property is excluded from the properties shown by auto complete. False and undefined represent the default behavior of including the property. * * @remarks * [Api set: ExcelApi 1.16] */ autoComplete?: boolean; /** * True represents that the property is excluded from the properties used to compare cell values during recalc. False and undefined represent the default behavior of including the property. * * @remarks * [Api set: ExcelApi 1.16] */ calcCompare?: boolean; /** * True represents that the property is excluded from the properties which can be accessed via the FIELDVALUE function. False and undefined represent the default behavior of including the property. * * @remarks * [Api set: ExcelApi 1.16] */ dotNotation?: boolean; } /** * Represents types of #CONNECT! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum ConnectErrorCellValueSubType { /** * An unknown type of error. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by a problem with the service. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ serviceError = "ServiceError", /** * An error caused by an issue with the external links. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinks = "ExternalLinks", /** * An error caused by an external link to a non-cloud location, such as a link to an Excel file that is saved to a local computer instead of to a cloud location. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksNonCloudLocation = "ExternalLinksNonCloudLocation", /** * An error caused by no service connection for linked data types. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ dataTypeNoConnection = "DataTypeNoConnection", /** * An error caused by an issue in the service for linked data types. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ dataTypeServiceError = "DataTypeServiceError", /** * An error caused by missing content. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ missingContent = "MissingContent", /** * An error caused by request throttling. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ requestThrottle = "RequestThrottle", /** * An error caused by external links failing to refresh. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksFailedToRefresh = "ExternalLinksFailedToRefresh", /** * An error caused by a failure to access external links. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksAccessFailed = "ExternalLinksAccessFailed", /** * An error caused by a server error while resolving an external link. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksServerError = "ExternalLinksServerError", /** * An error caused by an invalid request while resolving an external link. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksInvalidRequest = "ExternalLinksInvalidRequest", /** * An error caused by a lack of authentication for external links. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksUnAuthenticated = "ExternalLinksUnAuthenticated", /** * An error caused by throttling from an external link host. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksThrottledByHost = "ExternalLinksThrottledByHost", /** * An error caused by an external link to a file which exceeds file size capacity. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksFileTooLarge = "ExternalLinksFileTooLarge", /** * An error caused by an outdated linked entity. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ outdatedLinkedEntity = "OutdatedLinkedEntity", /** * An error caused by an error returned from the server. Displays as error type #CONNECT! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ genericServerError = "GenericServerError" } /** * Represents the value of a cell containing a #CONNECT! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface ConnectErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#CONNECT!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.connect | "Connect"; /** * Represents the type of `ConnectErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: ConnectErrorCellValueSubType | "Unknown" | "ServiceError" | "ExternalLinks" | "ExternalLinksNonCloudLocation" | "DataTypeNoConnection" | "DataTypeServiceError" | "MissingContent" | "RequestThrottle" | "ExternalLinksFailedToRefresh" | "ExternalLinksAccessFailed" | "ExternalLinksServerError" | "ExternalLinksInvalidRequest" | "ExternalLinksUnAuthenticated" | "ExternalLinksThrottledByHost" | "ExternalLinksFileTooLarge" | "OutdatedLinkedEntity" | "GenericServerError"; } /** * Represents the value of a cell containing a #DIV/0! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface Div0ErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#DIV/0!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.div0 | "Div0"; } /** * Represents the value of a cell containing a double. * * @remarks * [Api set: ExcelApi 1.16] */ interface DoubleCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.double | "Double"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue: number; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.double | "Double"; } /** * Represents the value of a cell that's empty and has no formulas or data. * * @remarks * [Api set: ExcelApi 1.16] */ interface EmptyCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.empty | "Empty"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: ""; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.empty | "Empty"; } /** * Represents the value of a property. * * @remarks * [Api set: ExcelApi 1.16] */ type EntityPropertyType = CellValueAndPropertyMetadata | CellValue; /** * Properties used by `CellValueAndPropertyMetadata`. These properties refer to the metadata and not to a `CellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ interface EntityPropertyExtraProperties { /** * Represents metadata about the property. * * @remarks * [Api set: ExcelApi 1.16] */ propertyMetadata?: CellValuePropertyMetadata; } /** * Represents a set of properties without a schema or defined structure. * * @remarks * [Api set: ExcelApi 1.16] */ interface EntityCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.entity | ReferenceValueType.entity | "Entity"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#VALUE!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the text shown when a cell with this value is rendered. * * @remarks * [Api set: ExcelApi 1.16] */ text?: string; /** * Represents the properties of this entity and their metadata. * * @remarks * [Api set: ExcelApi 1.16] */ properties?: { [key: string]: EntityPropertyType; }; /** * Represents layout information for views of this entity. * * @remarks * [Api set: ExcelApi 1.16] */ layouts?: EntityViewLayouts; /** * Represents information that describes the service that provided the data in this `EntityCellValue`. * This information can be used for branding in entity cards. * * @remarks * [Api set: ExcelApi 1.16] */ provider?: CellValueProviderAttributes; /** * Represents the cell values which are referenced within `EntityCellValue.properties`. * * @remarks * [Api set: ExcelApi 1.16] */ referencedValues?: ReferencedValue[]; } /** * Represents layout information for various views of the entity. * * @remarks * [Api set: ExcelApi 1.16] */ interface EntityViewLayouts { /** * Represents the layout of this entity in card view. * If the `CardLayout` object does not have a layout property, it is assumed to be "Entity". * * @remarks * [Api set: ExcelApi 1.16] */ card?: CardLayout; /** * Represents the layout used when there is limited space to represent the entity. * * @remarks * [Api set: ExcelApi 1.16] */ compact?: CompactLayout; } /** * Represents a card layout that is best used for an array. * * @remarks * [Api set: ExcelApi 1.16] */ interface EntityCardLayout extends CardLayoutStandardProperties { /** * Represents the type of this layout. * * @remarks * [Api set: ExcelApi 1.16] */ layout?: "Entity"; } /** * Represents the types of the `ErrorCellValue` object. * * @remarks * [Api set: ExcelApi 1.16] */ enum ErrorCellValueType { /** * Represents a `BlockedErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ blocked = "Blocked", /** * Represents a `BusyErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ busy = "Busy", /** * Represents a `CalcErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ calc = "Calc", /** * Represents a `ConnectErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ connect = "Connect", /** * Represents a `Div0ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ div0 = "Div0", /** * Represents an `ExternalErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ external = "External", /** * Represents a `FieldErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ field = "Field", /** * Represents a `GettingDataErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ gettingData = "GettingData", /** * Represents a `NotAvailableErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ notAvailable = "NotAvailable", /** * Represents a `NameErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ name = "Name", /** * Represents a `NullErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ null = "Null", /** * Represents a `NumErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ num = "Num", /** * Represents a `PlaceholderErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ placeholder = "Placeholder", /** * Represents a `RefErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ ref = "Ref", /** * Represents a `SpillErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ spill = "Spill", /** * Represents a `ValueErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ value = "Value" } /** * Represents a cell value which contains an error. * * @remarks * [Api set: ExcelApi 1.16] */ type ErrorCellValue = BlockedErrorCellValue | BusyErrorCellValue | CalcErrorCellValue | ConnectErrorCellValue | Div0ErrorCellValue | ExternalErrorCellValue | FieldErrorCellValue | GettingDataErrorCellValue | NotAvailableErrorCellValue | NameErrorCellValue | NullErrorCellValue | NumErrorCellValue | PlaceholderErrorCellValue | RefErrorCellValue | SpillErrorCellValue | ValueErrorCellValue; /** * Represents types of #EXTERNAL! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum ExternalErrorCellValueSubType { /** * An unknown type of error. Displays as error type #EXTERNAL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown" } /** * Represents the value of a cell containing an #EXTERNAL! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface ExternalErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#EXTERNAL!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.external | "External"; /** * Represents the type of `ExternalErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: ExternalErrorCellValueSubType | "Unknown"; } /** * Represents types of #FIELD! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum FieldErrorCellValueSubType { /** * An unknown type of error. Displays as error type #FIELD! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by a missing file. In this case, the RichValueWebImageValue.xml file is missing from the metro package. Displays as error type #FIELD! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ webImageMissingFilePart = "WebImageMissingFilePart", /** * An error caused by an error from a data provider. Displays as error type #FIELD! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ dataProviderError = "DataProviderError", /** * An error caused by a missing file. In this case, the RichValueRel.xml file is missing from the metro package. Displays as error type #FIELD! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ richValueRelMissingFilePart = "RichValueRelMissingFilePart" } /** * Represents the value of a cell containing a #FIELD! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface FieldErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#FIELD!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.field | "Field"; /** * Represents the type of `FieldErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: FieldErrorCellValueSubType | "Unknown" | "WebImageMissingFilePart" | "DataProviderError" | "RichValueRelMissingFilePart"; /** * Represents the field which was not found by FIELDVALUE. * * @remarks * [Api set: ExcelApi 1.16] */ fieldName?: string; } /** * Represents the value of a cell containing a number with a format string. Number format strings must conform to Excel guidelines. To learn more, see {@link https://support.microsoft.com/office/review-guidelines-for-customizing-a-number-format-c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. * In this scenario, the format is applied to the value and not to the cell, so the value retains its format string throughout calculation. * * @remarks * [Api set: ExcelApi 1.16] */ interface FormattedNumberCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.formattedNumber | "FormattedNumber"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue: number; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.double | "Double"; /** * Returns the number format string that is used to display this value. * When accessed through a `valuesAsJson` property, this number format string is in the en-US locale. When accessed through a `valuesAsJsonLocal` property, this number format is in the user's display locale. * Number format strings must conform to Excel guidelines. * To learn more, see {@link https://support.microsoft.com/office/review-guidelines-for-customizing-a-number-format-c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. * * @remarks * [Api set: ExcelApi 1.16] */ numberFormat: string; } /** * Represents the value of a cell containing a #GETTING_DATA error. * * @remarks * [Api set: ExcelApi 1.16] */ interface GettingDataErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#GETTING_DATA" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.gettingData | "GettingData"; } /** * The linked entity ID object represents a set of properties that describes a service and culture for locating this service defined value. * * @remarks * [Api set: ExcelApi 1.16] */ interface LinkedEntityId { /** * Represents which service was used to create the `CellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ serviceId: number; /** * Represents a domain specific to a service used to create the `CellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ domainId?: string; /** * Represents an identifier specific to a service used to create the `CellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ entityId: string; /** * Represents which language culture was used to create this `CellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ culture: string; } /** * Represents a value whose properties derive from a service. * * @remarks * [Api set: ExcelApi 1.16] */ interface LinkedEntityCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.linkedEntity | "LinkedEntity"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#VALUE!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the service source that provided the information in this value. * * @remarks * [Api set: ExcelApi 1.16] */ id: LinkedEntityId; /** * Represents the text shown when a cell with this value is rendered. * * @remarks * [Api set: ExcelApi 1.16] */ text?: string; /** * Represents the properties of this linked entity and their metadata. * * @remarks * [Api set: ExcelApi 1.16] */ properties?: { [key: string]: CellValue & { propertyMetadata?: CellValuePropertyMetadata; }; }; /** * Represents the layout of this linked entity in card view. * If the `CardLayout` object doesn't have a layout property, it default value is "Entity". * * @remarks * [Api set: ExcelApi 1.16] */ cardLayout?: CardLayout; /** * Represents information that describes the service that provided data in this `LinkedEntityCellValue`. * This information can be used for branding in entity cards. * * @remarks * [Api set: ExcelApi 1.16] */ provider?: CellValueProviderAttributes; } /** * Represents the value of a cell containing a #N/A! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface NotAvailableErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#N/A!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.notAvailable | "NotAvailable"; } /** * Represents the value of a cell containing a #NAME? error. * * @remarks * [Api set: ExcelApi 1.16] */ interface NameErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#NAME?" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.name | "Name"; } /** * Represents the value of a cell containing a #NULL! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface NullErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#NULL!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.null | "Null"; } /** * Represents types of #NUM! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum NumErrorCellValueSubType { /** * An unknown type of error. Displays as error type #NUM! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by a cell's formula having an array parameter with too many rows or columns. The maximum number of rows and columns in an array parameter is 1048576. Displays as error type #NUM! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ arrayTooLarge = "ArrayTooLarge" } /** * Represents the value of a cell containing a #NUM! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface NumErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#NUM!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.num | "Num"; /** * Represents the type of `NumErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: NumErrorCellValueSubType | "Unknown" | "ArrayTooLarge"; /** * Represents the name of the function causing the error. * * @remarks * [Api set: ExcelApi 1.16] */ functionName?: string; } /** * Represents types of #REF! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum RefErrorCellValueSubType { /** * An unknown type of error. Displays as error type #REF! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by structured references from the linked workbook. Displays as error type #REF! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksStructuredRef = "ExternalLinksStructuredRef", /** * An error caused by dynamic array references from the linked workbook. Displays as error type #REF! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ externalLinksCalculatedRef = "ExternalLinksCalculatedRef" } /** * Represents the value of a cell containing a #REF! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface RefErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#REF!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.ref | "Ref"; /** * Represents the type of `RefErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: RefErrorCellValueSubType | "Unknown" | "ExternalLinksStructuredRef" | "ExternalLinksCalculatedRef"; } /** * Represents types of #SPILL! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum SpillErrorCellValueSubType { /** * An unknown type of error. Displays as error type #SPILL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by a dynamic array attempting to spill data into a cell that isn't empty. Displays as error type #SPILL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ collision = "Collision", /** * An error caused by a dynamic array formula that can't be evaluated in a single calculation. Displays as error type #SPILL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ indeterminateSize = "IndeterminateSize", /** * An error caused by a dynamic array attempting to spill over the edge of the worksheet. Displays as error type #SPILL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ worksheetEdge = "WorksheetEdge", /** * An error caused by insufficient memory when attempting to calculate a dynamic array formula. Displays as error type #SPILL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ outOfMemoryWhileCalc = "OutOfMemoryWhileCalc", /** * An error caused by entering a dynamic array formula in a table. Displays as error type #SPILL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ table = "Table", /** * An error caused by a merged cell blocking a dynamic array. Displays as error type #SPILL! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ mergedCell = "MergedCell" } /** * Represents the value of a cell containing a #SPILL! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface SpillErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#SPILL!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.spill | "Spill"; /** * Represents the type of `SpillErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: SpillErrorCellValueSubType | "Unknown" | "Collision" | "IndeterminateSize" | "WorksheetEdge" | "OutOfMemoryWhileCalc" | "Table" | "MergedCell"; /** * Represents the number of rows that would spill if there were no #SPILL! error. * * @remarks * [Api set: ExcelApi 1.16] */ rowCount?: number; /** * Represents the number of columns that would spill if there were no #SPILL! error. * * @remarks * [Api set: ExcelApi 1.16] */ columnCount?: number; } /** * Represents the value of a cell containing a string. * * @remarks * [Api set: ExcelApi 1.16] */ interface StringCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.string | "String"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue: string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.string | "String"; } /** * Represents types of #VALUE! errors. * * @remarks * [Api set: ExcelApi 1.16] */ enum ValueErrorCellValueSubType { /** * An unknown type of error. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ unknown = "Unknown", /** * An error caused by a column_index_num parameter of VLOOKUP of less than 1. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ vlookupColumnIndexLessThanOne = "VlookupColumnIndexLessThanOne", /** * An error caused by VLOOKUP not finding its lookup_value parameter. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ vlookupResultNotFound = "VlookupResultNotFound", /** * An error caused by a row_index_num parameter of HLOOKUP of less than 1. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ hlookupRowIndexLessThanOne = "HlookupRowIndexLessThanOne", /** * An error caused by HLOOKUP not finding its lookup_value parameter. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ hlookupResultNotFound = "HlookupResultNotFound", /** * An error caused by encountering a string where a number was expected, and that string not being coercible to a number. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ coerceStringToNumberInvalid = "CoerceStringToNumberInvalid", /** * An error caused by encountering a string where a boolean was expected, and that string not being coercible to a boolean. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ coerceStringToBoolInvalid = "CoerceStringToBoolInvalid", /** * An error caused by conversion of a string to a type other than a boolean or number. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ coerceStringToInvalidType = "CoerceStringToInvalidType", /** * An error caused by SUBARRAY missing a start row. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ subArrayStartRowMissingEndRowNot = "SubArrayStartRowMissingEndRowNot", /** * An error caused by SUBARRAY missing a start column. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ subArrayStartColumnMissingEndColumnNot = "SubArrayStartColumnMissingEndColumnNot", /** * An error caused by a `WebImageValue` with an invalid URL. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ invalidImageUrl = "InvalidImageUrl", /** * An error caused by STOCKHISTORY having a date range which only contains days that don't have stock trading. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryNonTradingDays = "StockHistoryNonTradingDays", /** * An error caused by passing a stock parameter which is not a stock to STOCKHISTORY. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryNotAStock = "StockHistoryNotAStock", /** * An error caused by passing an invalid date to STOCKHISTORY. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryInvalidDate = "StockHistoryInvalidDate", /** * An error caused by passing an end_date parameter that precedes the start_date parameter to STOCKHISTORY. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryEndBeforeStart = "StockHistoryEndBeforeStart", /** * An error caused by passing a future start_date parameter to STOCKHISTORY. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryStartInFuture = "StockHistoryStartInFuture", /** * An error caused by invalid interval or header parameters for STOCKHISTORY. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryInvalidEnum = "StockHistoryInvalidEnum", /** * An error caused by STOCKHISTORY parameters that request only the date and no other fields. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryOnlyDateRequested = "StockHistoryOnlyDateRequested", /** * An error caused by STOCKHISTORY not finding the history of the specified stock. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ stockHistoryNotFound = "StockHistoryNotFound", /** * An error caused by passing the incorrect number of parameters to a lambda value. Displays as error type #VALUE! in Excel. * * @remarks * [Api set: ExcelApi 1.16] */ lambdaWrongParamCount = "LambdaWrongParamCount" } /** * Represents the value of a cell containing a #VALUE! error. * * @remarks * [Api set: ExcelApi 1.16] */ interface ValueErrorCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.error | "Error"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#VALUE!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the type of `ErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorType?: ErrorCellValueType.value | "Value"; /** * Represents the type of `ValueErrorCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ errorSubType?: ValueErrorCellValueSubType | "Unknown" | "VlookupColumnIndexLessThanOne" | "VlookupResultNotFound" | "HlookupRowIndexLessThanOne" | "HlookupResultNotFound" | "CoerceStringToNumberInvalid" | "CoerceStringToBoolInvalid" | "CoerceStringToInvalidType" | "SubArrayStartRowMissingEndRowNot" | "SubArrayStartColumnMissingEndColumnNot" | "InvalidImageUrl" | "StockHistoryNonTradingDays" | "StockHistoryNotAStock" | "StockHistoryInvalidDate" | "StockHistoryEndBeforeStart" | "StockHistoryStartInFuture" | "StockHistoryInvalidEnum" | "StockHistoryOnlyDateRequested" | "StockHistoryNotFound" | "LambdaWrongParamCount"; } /** * Represents the value of a cell containing a type of value which cannot be serialized. * For example, an #UNKNOWN! error which represents a type of rich value not known to this version of Excel. * * @remarks * [Api set: ExcelApi 1.16] */ interface ValueTypeNotAvailableCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.notAvailable | "NotAvailable"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue: boolean | number | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; } /** * Represents the value of a cell containing an image downloaded from the internet. * * @remarks * [Api set: ExcelApi 1.16] */ interface WebImageCellValue { /** * Represents the type of this cell value. * * @remarks * [Api set: ExcelApi 1.16] */ type: CellValueType.webImage | "WebImage"; /** * Represents the value that would be returned by `Range.values` for a cell with this value. * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. * * @remarks * [Api set: ExcelApi 1.16] */ basicValue?: "#VALUE!" | string; /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * * @remarks * [Api set: ExcelApi 1.16] */ basicType?: RangeValueType.error | "Error"; /** * Represents the URL from which the image will be downloaded. * This image must be hosted on a server that supports HTTPS. * * @remarks * [Api set: ExcelApi 1.16] */ address: string; /** * Represents the alternate text that can be used in accessibility scenarios to describe what the image represents. * * @remarks * [Api set: ExcelApi 1.16] */ altText?: string; /** * Represents the URL of a webpage with images that are considered related to this `WebImageCellValue`. * * @remarks * [Api set: ExcelApi 1.16] */ relatedImagesAddress?: string; /** * Represents attribution information to describe the source and license requirements for using this image. * * @remarks * [Api set: ExcelApi 1.16] */ attribution?: CellValueAttributionAttributes[]; /** * Represents information that describes the entity or individual who provided the image. * This information can be used for branding in image cards. * * @remarks * [Api set: ExcelApi 1.16] */ provider?: CellValueProviderAttributes; } /** * * Represents which cell properties to load, when used as part of a "range.getCellProperties" method. * * [Api set: ExcelApi 1.9] */ interface CellPropertiesLoadOptions { /** * * Specifies whether to load on the `address` property. * * [Api set: ExcelApi 1.9] */ address?: boolean; /** * * Specifies whether to load on the `addressLocal` property. * * [Api set: ExcelApi 1.9] */ addressLocal?: boolean; /** * * Specifies whether to load on the `format` property. * * [Api set: ExcelApi 1.9] */ format?: Excel.CellPropertiesFormatLoadOptions; /** * * Specifies whether to load on the `hidden` property. * * [Api set: ExcelApi 1.9] */ hidden?: boolean; /** * * Specifies whether to load on the `hyperlink` property. * * [Api set: ExcelApi 1.9] */ hyperlink?: boolean; /** * * Specifies whether to load on the `style` property. * * [Api set: ExcelApi 1.9] */ style?: boolean; } /** * * Represents which row properties to load, when used as part of a "range.getRowProperties" method. * * [Api set: ExcelApi 1.9] */ interface RowPropertiesLoadOptions extends CellPropertiesLoadOptions { /** * * Specifies whether to load on the `rowHidden` property. * * [Api set: ExcelApi 1.9] */ rowHidden?: boolean; /** * * Specifies whether to load on the `rowIndex` property. * * [Api set: ExcelApi 1.9] */ rowIndex?: boolean; /** * * Specifies whether to load on the `format` property. * * [Api set: ExcelApi 1.9] */ format?: Excel.CellPropertiesFormatLoadOptions & { rowHeight?: boolean; }; } /** * * Represents which column properties to load, when used as part of a "range.getColumnProperties" method. * * [Api set: ExcelApi 1.9] */ interface ColumnPropertiesLoadOptions extends CellPropertiesLoadOptions { /** * * Specifies whether to load on the `columnIndex` property. * * [Api set: ExcelApi 1.9] */ columnIndex?: boolean; /** * * Specifies whether to load on the `columnHidden` property. * * [Api set: ExcelApi 1.9] */ columnHidden?: boolean; /** * * Specifies whether to load on the `format` property. * * [Api set: ExcelApi 1.9] */ format?: Excel.CellPropertiesFormatLoadOptions & { columnWidth?: boolean; }; } /** * * Represents which properties to load on the format object. * * [Api set: ExcelApi 1.9] */ interface CellPropertiesFormatLoadOptions { /** * * Specifies whether to load on the `autoIndent` property. * * [Api set: ExcelApi 1.9] */ autoIndent?: boolean; /** * * Specifies whether to load on the `borders` property. * * [Api set: ExcelApi 1.9] */ borders?: Excel.CellPropertiesBorderLoadOptions; /** * * Specifies whether to load on the `fill` property. * * [Api set: ExcelApi 1.9] */ fill?: Excel.CellPropertiesFillLoadOptions; /** * * Specifies whether to load on the `font` property. * * [Api set: ExcelApi 1.9] */ font?: Excel.CellPropertiesFontLoadOptions; /** * * Specifies whether to load on the `horizontalAlignment` property. * * [Api set: ExcelApi 1.9] */ horizontalAlignment?: boolean; /** * * Specifies whether to load on the `indentLevel` property. * * [Api set: ExcelApi 1.9] */ indentLevel?: boolean; /** * * Specifies whether to load on the `protection` property. * * [Api set: ExcelApi 1.9] */ protection?: boolean; /** * * Specifies whether to load on the `readingOrder` property. * * [Api set: ExcelApi 1.9] */ readingOrder?: boolean; /** * * Specifies whether to load on the `shrinkToFit` property. * * [Api set: ExcelApi 1.9] */ shrinkToFit?: boolean; /** * * Specifies whether to load on the `textOrientation` property. * * [Api set: ExcelApi 1.9] */ textOrientation?: boolean; /** * * Specifies whether to load on the `useStandardHeight` property. * * [Api set: ExcelApi 1.9] */ useStandardHeight?: boolean; /** * * Specifies whether to load on the `useStandardWidth` property. * * [Api set: ExcelApi 1.9] */ useStandardWidth?: boolean; /** * * Specifies whether to load on the `verticalAlignment` property. * * [Api set: ExcelApi 1.9] */ verticalAlignment?: boolean; /** * * Specifies whether to load on the `wrapText` property. * * [Api set: ExcelApi 1.9] */ wrapText?: boolean; } /** * * Represents the input parameter of setCellProperties. * * [Api set: ExcelApi 1.9] */ interface SettableCellProperties { /** * * Represents the `format` property. * * [Api set: ExcelApi 1.9] */ format?: Excel.CellPropertiesFormat; /** * * Represents the `hyperlink` property. * * [Api set: ExcelApi 1.9] */ hyperlink?: Excel.RangeHyperlink; /** * * Represents the `style` property. * * [Api set: ExcelApi 1.9] */ style?: string; } /** * * Represents the returned properties of getCellProperties. * * [Api set: ExcelApi 1.9] */ interface CellProperties extends SettableCellProperties { /** * * Represents the `address` property. * * [Api set: ExcelApi 1.9] */ address?: string; /** * * Represents the `addressLocal` property. * * [Api set: ExcelApi 1.9] */ addressLocal?: string; /** * * Represents the `hidden` property. * * [Api set: ExcelApi 1.9] */ hidden?: boolean; } /** * * Represents the input parameter of setRowProperties. * * [Api set: ExcelApi 1.9] */ interface SettableRowProperties extends SettableCellProperties { /** * * Represents the `rowHidden` property. * * [Api set: ExcelApi 1.9] */ rowHidden?: boolean; /** * * Represents the `format` property. * * [Api set: ExcelApi 1.9] */ format?: Excel.CellPropertiesFormat & { rowHeight?: number; }; } /** * * Represents the returned properties of getRowProperties. * * [Api set: ExcelApi 1.9] */ interface RowProperties extends SettableRowProperties { /** * * Represents the `rowIndex` property. * * [Api set: ExcelApi 1.9] */ rowIndex?: number; /** * * Represents the `address` property. * * [Api set: ExcelApi 1.9] */ address?: string; /** * * Represents the `addressLocal` property. * * [Api set: ExcelApi 1.9] */ addressLocal?: string; } /** * * Represents the input parameter of setColumnProperties. * * [Api set: ExcelApi 1.9] */ interface SettableColumnProperties extends SettableCellProperties { /** * * Represents the `columnHidden` property. * * [Api set: ExcelApi 1.9] */ columnHidden?: boolean; /** * * Represents the `format` property. * * [Api set: ExcelApi 1.9] */ format?: Excel.CellPropertiesFormat & { columnWidth?: number; }; } /** * * Represents the returned properties of getColumnProperties. * * [Api set: ExcelApi 1.9] */ interface ColumnProperties extends SettableColumnProperties { /** * * Represents the `columnIndex` property. * * [Api set: ExcelApi 1.9] */ columnIndex?: number; /** * * Represents the `address` property. * * [Api set: ExcelApi 1.9] */ address?: string; /** * * Represents the `addressLocal` property. * * [Api set: ExcelApi 1.9] */ addressLocal?: string; } /** * * Represents the returned format properties of getCellProperties or format input parameter of setCellProperties. * * [Api set: ExcelApi 1.9] */ interface CellPropertiesFormat { /** * * Represents the `autoIndent` property. * * [Api set: ExcelApi 1.9] */ autoIndent?: boolean; /** * * Represents the `borders` property. * * [Api set: ExcelApi 1.9] */ borders?: Excel.CellBorderCollection; /** * * Represents the `fill` property. * * [Api set: ExcelApi 1.9] */ fill?: Excel.CellPropertiesFill; /** * * Represents the `font` property. * * [Api set: ExcelApi 1.9] */ font?: Excel.CellPropertiesFont; /** * * Represents the `horizontalAlignment` property. * * [Api set: ExcelApi 1.9] */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * * Represents the `indentLevel` property. * * [Api set: ExcelApi 1.9] */ indentLevel?: number; /** * * Represents the `protection` property. * * [Api set: ExcelApi 1.9] */ protection?: Excel.CellPropertiesProtection; /** * * Represents the `readingOrder` property. * * [Api set: ExcelApi 1.9] */ readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * * Represents the `shrinkToFit` property. * * [Api set: ExcelApi 1.9] */ shrinkToFit?: boolean; /** * * Represents the `textOrientation` property. * * [Api set: ExcelApi 1.9] */ textOrientation?: number; /** * * Represents the `useStandardHeight` property. * * [Api set: ExcelApi 1.9] */ useStandardHeight?: boolean; /** * * Represents the `useStandardWidth` property. * * [Api set: ExcelApi 1.9] */ useStandardWidth?: boolean; /** * * Represents the `verticalAlignment` property. * * [Api set: ExcelApi 1.9] */ verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * * Represents the `wrapText` property. * * [Api set: ExcelApi 1.9] */ wrapText?: boolean; } /** * * Creates and opens a new workbook. Optionally, the workbook can be pre-populated with a base64-encoded .xlsx file. * Note: Macros can be a security risk. If this API is used to create a workbook that includes a macro, the add-in user will be prompted with a "Trust this add-in?" dialog in the Excel UI. The user must select the "Trust add-in" button to proceed. * * [Api set: ExcelApi 1.8] * * @param base64File Optional. The base64 encoded .xlsx file. The default value is null. */ function createWorkbook(base64?: string): Promise; interface ThreeArrowsSet { [index: number]: Icon; redDownArrow: Icon; yellowSideArrow: Icon; greenUpArrow: Icon; } interface ThreeArrowsGraySet { [index: number]: Icon; grayDownArrow: Icon; graySideArrow: Icon; grayUpArrow: Icon; } interface ThreeFlagsSet { [index: number]: Icon; redFlag: Icon; yellowFlag: Icon; greenFlag: Icon; } interface ThreeTrafficLights1Set { [index: number]: Icon; redCircleWithBorder: Icon; yellowCircle: Icon; greenCircle: Icon; } interface ThreeTrafficLights2Set { [index: number]: Icon; redTrafficLight: Icon; yellowTrafficLight: Icon; greenTrafficLight: Icon; } interface ThreeSignsSet { [index: number]: Icon; redDiamond: Icon; yellowTriangle: Icon; greenCircle: Icon; } interface ThreeSymbolsSet { [index: number]: Icon; redCrossSymbol: Icon; yellowExclamationSymbol: Icon; greenCheckSymbol: Icon; } interface ThreeSymbols2Set { [index: number]: Icon; redCross: Icon; yellowExclamation: Icon; greenCheck: Icon; } interface FourArrowsSet { [index: number]: Icon; redDownArrow: Icon; yellowDownInclineArrow: Icon; yellowUpInclineArrow: Icon; greenUpArrow: Icon; } interface FourArrowsGraySet { [index: number]: Icon; grayDownArrow: Icon; grayDownInclineArrow: Icon; grayUpInclineArrow: Icon; grayUpArrow: Icon; } interface FourRedToBlackSet { [index: number]: Icon; blackCircle: Icon; grayCircle: Icon; pinkCircle: Icon; redCircle: Icon; } interface FourRatingSet { [index: number]: Icon; oneBar: Icon; twoBars: Icon; threeBars: Icon; fourBars: Icon; } interface FourTrafficLightsSet { [index: number]: Icon; blackCircleWithBorder: Icon; redCircleWithBorder: Icon; yellowCircle: Icon; greenCircle: Icon; } interface FiveArrowsSet { [index: number]: Icon; redDownArrow: Icon; yellowDownInclineArrow: Icon; yellowSideArrow: Icon; yellowUpInclineArrow: Icon; greenUpArrow: Icon; } interface FiveArrowsGraySet { [index: number]: Icon; grayDownArrow: Icon; grayDownInclineArrow: Icon; graySideArrow: Icon; grayUpInclineArrow: Icon; grayUpArrow: Icon; } interface FiveRatingSet { [index: number]: Icon; noBars: Icon; oneBar: Icon; twoBars: Icon; threeBars: Icon; fourBars: Icon; } interface FiveQuartersSet { [index: number]: Icon; whiteCircleAllWhiteQuarters: Icon; circleWithThreeWhiteQuarters: Icon; circleWithTwoWhiteQuarters: Icon; circleWithOneWhiteQuarter: Icon; blackCircle: Icon; } interface ThreeStarsSet { [index: number]: Icon; silverStar: Icon; halfGoldStar: Icon; goldStar: Icon; } interface ThreeTrianglesSet { [index: number]: Icon; redDownTriangle: Icon; yellowDash: Icon; greenUpTriangle: Icon; } interface FiveBoxesSet { [index: number]: Icon; noFilledBoxes: Icon; oneFilledBox: Icon; twoFilledBoxes: Icon; threeFilledBoxes: Icon; fourFilledBoxes: Icon; } interface IconCollections { threeArrows: ThreeArrowsSet; threeArrowsGray: ThreeArrowsGraySet; threeFlags: ThreeFlagsSet; threeTrafficLights1: ThreeTrafficLights1Set; threeTrafficLights2: ThreeTrafficLights2Set; threeSigns: ThreeSignsSet; threeSymbols: ThreeSymbolsSet; threeSymbols2: ThreeSymbols2Set; fourArrows: FourArrowsSet; fourArrowsGray: FourArrowsGraySet; fourRedToBlack: FourRedToBlackSet; fourRating: FourRatingSet; fourTrafficLights: FourTrafficLightsSet; fiveArrows: FiveArrowsSet; fiveArrowsGray: FiveArrowsGraySet; fiveRating: FiveRatingSet; fiveQuarters: FiveQuartersSet; threeStars: ThreeStarsSet; threeTriangles: ThreeTrianglesSet; fiveBoxes: FiveBoxesSet; } var icons: IconCollections; interface Session { } /** * The RequestContext object facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the request context is required to get access to the Excel object model from the add-in. */ class RequestContext extends OfficeCore.RequestContext { constructor(url?: string | Session); readonly workbook: Workbook; readonly application: Application; /** * [Api set: ExcelApi 1.5] */ readonly runtime: Runtime; } interface RunOptions extends OfficeExtension.RunOptions { /** * Determines whether Excel will delay the batch request until the user exits cell edit mode. * * When false, if the user is in cell edit when the batch request is processed by the host, the batch will automatically fail. * When true, the batch request will be executed immediately if the user is not in cell edit mode, but if the user is in cell edit mode the batch request will be delayed until the user exits cell edit mode. */ delayForCellEdit?: boolean; } /** * Executes a batch script that performs actions on the Excel object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. */ function run(batch: (context: Excel.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param object - A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. */ function run(object: OfficeExtension.ClientObject, batch: (context: Excel.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Excel object model, using the RequestContext of previously-created API objects. * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. */ function run(objects: OfficeExtension.ClientObject[], batch: (context: Excel.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param options - The additional options for this Excel.run which specify previous objects, whether to delay the request for cell edit, session info, etc. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. */ function run(options: Excel.RunOptions, batch: (context: Excel.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * * @param context - A previously-created object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. */ function run(context: OfficeExtension.ClientRequestContext, batch: (context: Excel.RequestContext) => Promise): Promise; function postprocessBindingDescriptor(response: any): any; function getDataCommonPostprocess(response: any, callArgs: any): any; /** * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ class AllowEditRange extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the range associated with the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. * * @remarks * [Api set: ExcelApiOnline 1.1] */ address: string; /** * Specifies if the object is password protected. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly isPasswordProtected: boolean; /** * Specifies the title of the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. * * @remarks * [Api set: ExcelApiOnline 1.1] */ title: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.AllowEditRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.AllowEditRange): void; /** * Deletes the object from the `AllowEditRangeCollection`. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails the delete operation. * * @remarks * [Api set: ExcelApiOnline 1.1] */ delete(): void; /** * Pauses worksheet protection for the object for the user in the current session. This method does nothing if worksheet protection isn't enabled or is already paused. If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the object. If the password is incorrect, then this method throws a `BadPassword` error and fails to pause protection for the object. If a password is supplied but the object does not require a password, the inputted password will be ignored and the operation will succeed. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param password The password associated with the `AllowEditRange` object. */ pauseProtection(password?: string): void; /** * Changes the password associated with the object. Setting the password string as empty ("") or `null` will remove password protection from the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the set operation fails. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param password The password associated with the `AllowEditRange` object. */ setPassword(password?: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.AllowEditRangeLoadOptions): Excel.AllowEditRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.AllowEditRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.AllowEditRange; /** * 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.AllowEditRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AllowEditRangeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.AllowEditRangeData; } /** * Represents the set of `AllowEditRange` objects found in a worksheet. `AllowEditRange` objects work with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ class AllowEditRangeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.AllowEditRange[]; /** * Adds an `AllowEditRange` object to the worksheet. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the add operation fails. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param title The title string of the `AllowEditRange` object to be added. * @param rangeAddress The range address of the `AllowEditRange` object to be added. * @param options Additional options to be added to the `AllowEditRange` object, such as the password. */ add(title: string, rangeAddress: string, options?: Excel.AllowEditRangeOptions): void; /** * Returns the number of `AllowEditRange` objects in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] */ getCount(): OfficeExtension.ClientResult; /** * Gets the `AllowEditRange` object by its title. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param key The title of the `AllowEditRange`. * @returns The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then an `ItemNotFound` error is thrown. */ getItem(key: string): Excel.AllowEditRange; /** * Returns an `AllowEditRange` object by its index in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param index The index of the `AllowEditRange` object in the collection. * @returns The `AllowEditRange` at the given index. */ getItemAt(index: number): Excel.AllowEditRange; /** * Gets the `AllowEditRange` object by its title. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param key The title of the `AllowEditRange`. * @returns The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. */ getItemOrNullObject(key: string): Excel.AllowEditRange; /** * Pauses worksheet protection for all `AllowEditRange` objects found in this worksheet that have the given password for the user in the current session. This method does nothing if worksheet protection isn't enabled or is paused. If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the range. If the password does not match any `AllowEditRange` objects in the collection, then this method throws a `BadPassword` error and fails to pause protection for any range in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param password The password to pause protection on the `AllowEditRange` objects. */ pauseProtection(password: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.AllowEditRangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.AllowEditRangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.AllowEditRangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.AllowEditRangeCollection; /** * 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.AllowEditRangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AllowEditRangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.AllowEditRangeCollectionData; } /** * The interface used to construct optional fields of the `AllowEditRange` object. * * @remarks * [Api set: ExcelApiOnline 1.1] */ interface AllowEditRangeOptions { /** * The password associated with the `AllowEditRange`. * * @remarks * [Api set: ExcelApiOnline 1.1] */ password?: string; } /** * Notifies when a worksheet is moved within a workbook. If a worksheet is moved from one position within the workbook to another via the Excel UI, then this API will trigger an event. Note that if the position of a worksheet changes as a result of moving a different worksheet, then this event won't trigger for both position changes. This event only triggers for the primary worksheet move, and not any worksheet position changes that occur as a result of that primary move. * * @remarks * [Api set: ExcelApi 1.17] */ interface WorksheetMovedEventArgs { /** * Gets the new position of the worksheet, after the move. * * @remarks * [Api set: ExcelApi 1.17] */ positionAfter: number; /** * Gets the previous position of the worksheet, prior to the move. * * @remarks * [Api set: ExcelApi 1.17] */ positionBefore: number; /** * The source of the event. It can be local or remote (through co-authoring). * * @remarks * [Api set: ExcelApi 1.17] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. * * @remarks * [Api set: ExcelApi 1.17] */ type: string; /** * Gets the ID of the worksheet that was moved. * * @remarks * [Api set: ExcelApi 1.17] */ worksheetId: string; } /** * Provides information about the worksheet whose name has changed. * * @remarks * [Api set: ExcelApi 1.17] */ interface WorksheetNameChangedEventArgs { /** * Gets the new name of the worksheet, after the name change. * * @remarks * [Api set: ExcelApi 1.17] */ nameAfter: string; /** * Gets the previous name of the worksheet, before the name changed. * * @remarks * [Api set: ExcelApi 1.17] */ nameBefore: string; /** * The source of the event. It can be local or remote (through co-authoring). * * @remarks * [Api set: ExcelApi 1.17] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. * * @remarks * [Api set: ExcelApi 1.17] */ type: string; /** * Gets the ID of the worksheet with the new name. * * @remarks * [Api set: ExcelApi 1.17] */ worksheetId: string; } /** * Provides information about the worksheet whose visibility has changed. * * @remarks * [Api set: ExcelApi 1.17] */ interface WorksheetVisibilityChangedEventArgs { /** * The source of the event. It can be local or remote (through co-authoring). * * @remarks * [Api set: ExcelApi 1.17] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. * * @remarks * [Api set: ExcelApi 1.17] */ type: string; /** * Gets the new visibility setting of the worksheet, after the visibility change. * * @remarks * [Api set: ExcelApi 1.17] */ visibilityAfter: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; /** * Gets the previous visibility setting of the worksheet, before the visibility change. * * @remarks * [Api set: ExcelApi 1.17] */ visibilityBefore: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; /** * Gets the ID of the worksheet whose visibility has changed. * * @remarks * [Api set: ExcelApi 1.17] */ worksheetId: string; } /** * An enum that specifies the query load to destination. * * @remarks * [Api set: ExcelApi 1.14] */ enum LoadToType { /** * Load to connection only. * @remarks * [Api set: ExcelApi 1.14] */ connectionOnly = "ConnectionOnly", /** * Load to a table. * @remarks * [Api set: ExcelApi 1.14] */ table = "Table", /** * Load to PivotTable. * @remarks * [Api set: ExcelApi 1.14] */ pivotTable = "PivotTable", /** * Load to PivotChart. * @remarks * [Api set: ExcelApi 1.14] */ pivotChart = "PivotChart" } /** * Represents a Power Query query. * * @remarks * [Api set: ExcelApi 1.14] */ class Query extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the query error message from when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ readonly error: Excel.QueryError | "Unknown" | "None" | "FailedLoadToWorksheet" | "FailedLoadToDataModel" | "FailedDownload" | "FailedToCompleteDownload"; /** * Gets the query loaded to object type. * * @remarks * [Api set: ExcelApi 1.14] */ readonly loadedTo: Excel.LoadToType | "ConnectionOnly" | "Table" | "PivotTable" | "PivotChart"; /** * Specifies if the query loaded to the data model. * * @remarks * [Api set: ExcelApi 1.14] */ readonly loadedToDataModel: boolean; /** * Gets the name of the query. Query names cannot contain periods or quotation marks. * * @remarks * [Api set: ExcelApi 1.14] */ readonly name: string; /** * Gets the date and time when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ readonly refreshDate: Date; /** * Gets the number of rows that were loaded when the query was last refreshed. If last refresh has errors the value will be -1. * * @remarks * [Api set: ExcelApi 1.14] */ readonly rowsLoadedCount: number; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.QueryLoadOptions): Excel.Query; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Query; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Query; /** * 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.Query object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.QueryData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.QueryData; } /** * Represents the collection of queries in the workbook. * * @remarks * [Api set: ExcelApi 1.14] */ class QueryCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Query[]; /** * Gets the number of queries in the workbook. * * @remarks * [Api set: ExcelApi 1.14] */ getCount(): OfficeExtension.ClientResult; /** * Gets a query from the collection based on its name. * * @remarks * [Api set: ExcelApi 1.14] * * @param key The name of the query case-insensitive. * @returns The query with the given name. If there is no query by that name, then an error is thrown. */ getItem(key: string): Excel.Query; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.QueryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.QueryCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.QueryCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.QueryCollection; /** * 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.QueryCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.QueryCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.QueryCollectionData; } /** * An enum that specifies the query load error message. * * @remarks * [Api set: ExcelApi 1.14] */ enum QueryError { /** * Unknown error. * @remarks * [Api set: ExcelApi 1.14] */ unknown = "Unknown", /** * No error. * @remarks * [Api set: ExcelApi 1.14] */ none = "None", /** * Load to the worksheet failed. * @remarks * [Api set: ExcelApi 1.14] */ failedLoadToWorksheet = "FailedLoadToWorksheet", /** * Load to the data model failed. * @remarks * [Api set: ExcelApi 1.14] */ failedLoadToDataModel = "FailedLoadToDataModel", /** * Download failed. * @remarks * [Api set: ExcelApi 1.14] */ failedDownload = "FailedDownload", /** * Download did not complete. * @remarks * [Api set: ExcelApi 1.14] */ failedToCompleteDownload = "FailedToCompleteDownload" } /** * Contains information about a linked workbook. If a workbook has links pointing to data in another workbook, the second workbook is linked to the first workbook. In this scenario, the second workbook is called the "linked workbook". * * @remarks * [Api set: ExcelApiOnline 1.1] */ class LinkedWorkbook extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly id: string; /** * Makes a request to break the links pointing to the linked workbook. Links in formulas are replaced with the latest fetched data. The current `LinkedWorkbook` object is invalidated and removed from `LinkedWorkbookCollection`. * * @remarks * [Api set: ExcelApiOnline 1.1] */ breakLinks(): void; /** * Makes a request to refresh the data retrieved from the linked workbook. * * @remarks * [Api set: ExcelApiOnline 1.1] */ refresh(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.LinkedWorkbookLoadOptions): Excel.LinkedWorkbook; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.LinkedWorkbook; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.LinkedWorkbook; /** * 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.LinkedWorkbook` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedWorkbookData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.LinkedWorkbookData; } /** * Represents a collection of linked workbook objects. * * @remarks * [Api set: ExcelApiOnline 1.1] */ class LinkedWorkbookCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.LinkedWorkbook[]; /** * Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. * * @remarks * [Api set: ExcelApiOnline 1.1] */ workbookLinksRefreshMode: Excel.WorkbookLinksRefreshMode | "Manual" | "Automatic"; /** * Breaks all the links to the linked workbooks. Once the links are broken, any formulas referencing workbook links are removed entirely and replaced with the most recently retrieved values. * * @remarks * [Api set: ExcelApiOnline 1.1] */ breakAllLinks(): void; /** * Gets information about a linked workbook by its URL. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param key The URL of the linked workbook. * @returns The linked workbook with the given URL. */ getItem(key: string): Excel.LinkedWorkbook; /** * Gets information about a linked workbook by its URL. If the workbook does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param key The URL of the linked workbook. * @returns The linked workbook with given URL. */ getItemOrNullObject(key: string): Excel.LinkedWorkbook; /** * Makes a request to refresh all the workbook links. * * @remarks * [Api set: ExcelApiOnline 1.1] */ refreshAll(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.LinkedWorkbookCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.LinkedWorkbookCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.LinkedWorkbookCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.LinkedWorkbookCollection; /** * 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.LinkedWorkbookCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedWorkbookCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.LinkedWorkbookCollectionData; } /** * Represents the refresh mode of the workbook links. * * @remarks * [Api set: ExcelApiOnline 1.1] */ enum WorkbookLinksRefreshMode { /** * The workbook links are updated manually. * @remarks * [Api set: ExcelApiOnline 1.1] */ manual = "Manual", /** * The workbook links are updated at a set interval determined by the Excel application. * @remarks * [Api set: ExcelApiOnline 1.1] */ automatic = "Automatic" } /** * Represents a command type of `DataConnection`. * * @remarks * [Api set: ExcelApi 1.15] */ enum DataSourceType { /** * The data source type is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.15] */ unknown = "Unknown", /** * The data source type is a range in the current workbook. * @remarks * [Api set: ExcelApi 1.15] */ localRange = "LocalRange", /** * The data source type is a table in the current workbook. * @remarks * [Api set: ExcelApi 1.15] */ localTable = "LocalTable" } /** * Enum representing all accepted conditions by which a date filter can be applied. Used to configure the type of PivotFilter that is applied to the field. * * @remarks * [Api set: ExcelApi 1.12] */ enum DateFilterCondition { /** * `DateFilterCondition` is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.12] */ unknown = "Unknown", /** * Equals comparator criterion. Required Criteria: {`comparator`}. Optional Criteria: {`wholeDays`, `exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ equals = "Equals", /** * Date is before comparator date. Required Criteria: {`comparator`}. Optional Criteria: {`wholeDays`}. * @remarks * [Api set: ExcelApi 1.12] */ before = "Before", /** * Date is before or equal to comparator date. Required Criteria: {`comparator`}. Optional Criteria: {`wholeDays`}. * @remarks * [Api set: ExcelApi 1.12] */ beforeOrEqualTo = "BeforeOrEqualTo", /** * Date is after comparator date. Required Criteria: {`comparator`}. Optional Criteria: {`wholeDays`}. * @remarks * [Api set: ExcelApi 1.12] */ after = "After", /** * Date is after or equal to comparator date. Required Criteria: {`comparator`}. Optional Criteria: {`wholeDays`}. * @remarks * [Api set: ExcelApi 1.12] */ afterOrEqualTo = "AfterOrEqualTo", /** * Between `lowerBound` and `upperBound` dates. Required Criteria: {`lowerBound`, `upperBound`}. Optional Criteria: {`wholeDays`, `exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ between = "Between", /** * Date is tomorrow. * @remarks * [Api set: ExcelApi 1.12] */ tomorrow = "Tomorrow", /** * Date is today. * @remarks * [Api set: ExcelApi 1.12] */ today = "Today", /** * Date is yesterday. * @remarks * [Api set: ExcelApi 1.12] */ yesterday = "Yesterday", /** * Date is next week. * @remarks * [Api set: ExcelApi 1.12] */ nextWeek = "NextWeek", /** * Date is this week. * @remarks * [Api set: ExcelApi 1.12] */ thisWeek = "ThisWeek", /** * Date is last week. * @remarks * [Api set: ExcelApi 1.12] */ lastWeek = "LastWeek", /** * Date is next month. * @remarks * [Api set: ExcelApi 1.12] */ nextMonth = "NextMonth", /** * Date is this month. * @remarks * [Api set: ExcelApi 1.12] */ thisMonth = "ThisMonth", /** * Date is last month. * @remarks * [Api set: ExcelApi 1.12] */ lastMonth = "LastMonth", /** * Date is next quarter. * @remarks * [Api set: ExcelApi 1.12] */ nextQuarter = "NextQuarter", /** * Date is this quarter. * @remarks * [Api set: ExcelApi 1.12] */ thisQuarter = "ThisQuarter", /** * Date is last quarter. * @remarks * [Api set: ExcelApi 1.12] */ lastQuarter = "LastQuarter", /** * Date is next year. * @remarks * [Api set: ExcelApi 1.12] */ nextYear = "NextYear", /** * Date is this year. * @remarks * [Api set: ExcelApi 1.12] */ thisYear = "ThisYear", /** * Date is last year. * @remarks * [Api set: ExcelApi 1.12] */ lastYear = "LastYear", /** * Date is in the same year to date. * @remarks * [Api set: ExcelApi 1.12] */ yearToDate = "YearToDate", /** * Date is in Quarter 1. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", /** * Date is in Quarter 2. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", /** * Date is in Quarter 3. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", /** * Date is in Quarter 4. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", /** * Date is in January. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", /** * Date is in February. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodFebruary = "AllDatesInPeriodFebruary", /** * Date is in March. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodMarch = "AllDatesInPeriodMarch", /** * Date is in April. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodApril = "AllDatesInPeriodApril", /** * Date is in May. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodMay = "AllDatesInPeriodMay", /** * Date is in June. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodJune = "AllDatesInPeriodJune", /** * Date is in July. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodJuly = "AllDatesInPeriodJuly", /** * Date is in August. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodAugust = "AllDatesInPeriodAugust", /** * Date is in September. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", /** * Date is in October. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodOctober = "AllDatesInPeriodOctober", /** * Date is in November. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodNovember = "AllDatesInPeriodNovember", /** * Date is in December. * @remarks * [Api set: ExcelApi 1.12] */ allDatesInPeriodDecember = "AllDatesInPeriodDecember" } /** * Enum representing all accepted conditions by which a label filter can be applied. Used to configure the type of PivotFilter that is applied to the field. `PivotFilter.criteria.exclusive` can be set to `true` to invert many of these conditions. * * @remarks * [Api set: ExcelApi 1.12] */ enum LabelFilterCondition { /** * `LabelFilterCondition` is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.12] */ unknown = "Unknown", /** * Equals comparator criterion. Required Criteria: {`comparator`}. Optional Criteria: {`exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ equals = "Equals", /** * Label begins with substring criterion. Required Criteria: {`substring`}. Optional Criteria: {`exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ beginsWith = "BeginsWith", /** * Label ends with substring criterion. Required Criteria: {`substring`}. Optional Criteria: {`exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ endsWith = "EndsWith", /** * Label contains substring criterion. Required Criteria: {`substring`}. Optional Criteria: {`exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ contains = "Contains", /** * Greater than comparator criterion. Required Criteria: {`comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ greaterThan = "GreaterThan", /** * Greater than or equal to comparator criterion. Required Criteria: {`comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ greaterThanOrEqualTo = "GreaterThanOrEqualTo", /** * Less than comparator criterion. Required Criteria: {`comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ lessThan = "LessThan", /** * Less than or equal to comparator criterion. Required Criteria: {`comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ lessThanOrEqualTo = "LessThanOrEqualTo", /** * Between `lowerBound` and `upperBound` criteria. Required Criteria: {`lowerBound`, `upperBound`}. Optional Criteria: {`exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ between = "Between" } /** * Configurable template for a date filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. * * @remarks * [Api set: ExcelApi 1.12] */ interface PivotDateFilter { /** * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. * * @remarks * [Api set: ExcelApi 1.12] */ comparator?: Excel.FilterDatetime; /** * Specifies the condition for the filter, which defines the necessary filtering criteria. * * @remarks * [Api set: ExcelApi 1.12] */ condition: Excel.DateFilterCondition | "Unknown" | "Equals" | "Before" | "BeforeOrEqualTo" | "After" | "AfterOrEqualTo" | "Between" | "Tomorrow" | "Today" | "Yesterday" | "NextWeek" | "ThisWeek" | "LastWeek" | "NextMonth" | "ThisMonth" | "LastMonth" | "NextQuarter" | "ThisQuarter" | "LastQuarter" | "NextYear" | "ThisYear" | "LastYear" | "YearToDate" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodJanuary" | "AllDatesInPeriodFebruary" | "AllDatesInPeriodMarch" | "AllDatesInPeriodApril" | "AllDatesInPeriodMay" | "AllDatesInPeriodJune" | "AllDatesInPeriodJuly" | "AllDatesInPeriodAugust" | "AllDatesInPeriodSeptember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodNovember" | "AllDatesInPeriodDecember"; /** * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). * * @remarks * [Api set: ExcelApi 1.12] */ exclusive?: boolean; /** * The lower-bound of the range for the `between` filter condition. * * @remarks * [Api set: ExcelApi 1.12] */ lowerBound?: Excel.FilterDatetime; /** * The upper-bound of the range for the `between` filter condition. * * @remarks * [Api set: ExcelApi 1.12] */ upperBound?: Excel.FilterDatetime; /** * For `equals`, `before`, `after`, and `between` filter conditions, indicates if comparisons should be made as whole days. * * @remarks * [Api set: ExcelApi 1.12] */ wholeDays?: boolean; } /** * A simple enum that represents a type of filter for a PivotField. * * @remarks * [Api set: ExcelApi 1.12] */ enum PivotFilterType { /** * `PivotFilterType` is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.12] */ unknown = "Unknown", /** * Filters based on the value of a PivotItem with respect to a `DataPivotHierarchy`. * @remarks * [Api set: ExcelApi 1.12] */ value = "Value", /** * Filters specific manually selected PivotItems from the PivotTable. * @remarks * [Api set: ExcelApi 1.12] */ manual = "Manual", /** * Filters PivotItems based on their labels. Note: A PivotField cannot simultaneously have a label filter and a date filter applied. * @remarks * [Api set: ExcelApi 1.12] */ label = "Label", /** * Filters PivotItems with a date in place of a label. Note: A PivotField cannot simultaneously have a label filter and a date filter applied. * @remarks * [Api set: ExcelApi 1.12] */ date = "Date" } /** * An interface representing all PivotFilters currently applied to a given PivotField. * * @remarks * [Api set: ExcelApi 1.12] */ interface PivotFilters { /** * The PivotField's currently applied date filter. This property is `null` if no value filter is applied. * * @remarks * [Api set: ExcelApi 1.12] */ dateFilter?: Excel.PivotDateFilter; /** * The PivotField's currently applied label filter. This property is `null` if no value filter is applied. * * @remarks * [Api set: ExcelApi 1.12] */ labelFilter?: Excel.PivotLabelFilter; /** * The PivotField's currently applied manual filter. This property is `null` if no value filter is applied. * * @remarks * [Api set: ExcelApi 1.12] */ manualFilter?: Excel.PivotManualFilter; /** * The PivotField's currently applied value filter. This property is `null` if no value filter is applied. * * @remarks * [Api set: ExcelApi 1.12] */ valueFilter?: Excel.PivotValueFilter; } /** * Configurable template for a label filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. * * @remarks * [Api set: ExcelApi 1.12] */ interface PivotLabelFilter { /** * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. Note: A numeric string is treated as a number when being compared against other numeric strings. * * @remarks * [Api set: ExcelApi 1.12] */ comparator?: string; /** * Specifies the condition for the filter, which defines the necessary filtering criteria. * * @remarks * [Api set: ExcelApi 1.12] */ condition: Excel.LabelFilterCondition | "Unknown" | "Equals" | "BeginsWith" | "EndsWith" | "Contains" | "GreaterThan" | "GreaterThanOrEqualTo" | "LessThan" | "LessThanOrEqualTo" | "Between"; /** * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). * * @remarks * [Api set: ExcelApi 1.12] */ exclusive?: boolean; /** * The lower-bound of the range for the `between` filter condition. Note: A numeric string is treated as a number when being compared against other numeric strings. * * @remarks * [Api set: ExcelApi 1.12] */ lowerBound?: string; /** * The substring used for the `beginsWith`, `endsWith`, and `contains` filter conditions. * * @remarks * [Api set: ExcelApi 1.12] */ substring?: string; /** * The upper-bound of the range for the `between` filter condition. Note: A numeric string is treated as a number when being compared against other numeric strings. * * @remarks * [Api set: ExcelApi 1.12] */ upperBound?: string; } /** * Configurable template for a manual filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. * * @remarks * [Api set: ExcelApi 1.12] */ interface PivotManualFilter { /** * A list of selected items to manually filter. These must be existing and valid items from the chosen field. * * @remarks * [Api set: ExcelApi 1.12] */ selectedItems?: Array; } /** * Configurable template for a value filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. * * @remarks * [Api set: ExcelApi 1.12] */ interface PivotValueFilter { /** * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. For example, if comparator is "50" and condition is "greaterThan", all item values that are not greater than 50 will be removed by the filter. * * @remarks * [Api set: ExcelApi 1.12] */ comparator?: number; /** * Specifies the condition for the filter, which defines the necessary filtering criteria. * * @remarks * [Api set: ExcelApi 1.12] */ condition: Excel.ValueFilterCondition | "Unknown" | "Equals" | "GreaterThan" | "GreaterThanOrEqualTo" | "LessThan" | "LessThanOrEqualTo" | "Between" | "TopN" | "BottomN"; /** * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). * * @remarks * [Api set: ExcelApi 1.12] */ exclusive?: boolean; /** * The lower-bound of the range for the `between` filter condition. * * @remarks * [Api set: ExcelApi 1.12] */ lowerBound?: number; /** * Specifies if the filter is for the top/bottom N items, top/bottom N percent, or top/bottom N sum. * * @remarks * [Api set: ExcelApi 1.12] */ selectionType?: Excel.TopBottomSelectionType | "Items" | "Percent" | "Sum"; /** * The "N" threshold number of items, percent, or sum to be filtered for a top/bottom filter condition. * * @remarks * [Api set: ExcelApi 1.12] */ threshold?: number; /** * The upper-bound of the range for the `between` filter condition. * * @remarks * [Api set: ExcelApi 1.12] */ upperBound?: number; /** * Name of the chosen "value" in the field by which to filter. * * @remarks * [Api set: ExcelApi 1.12] */ value: string; } /** * A simple enum for top/bottom filters to select whether to filter by the top N or bottom N percent, number, or sum of values. * * @remarks * [Api set: ExcelApi 1.12] */ enum TopBottomSelectionType { /** * Filter the top/bottom N number of items as measured by the chosen value. * @remarks * [Api set: ExcelApi 1.12] */ items = "Items", /** * Filter the top/bottom N percent of items as measured by the chosen value. * @remarks * [Api set: ExcelApi 1.12] */ percent = "Percent", /** * Filter the top/bottom N sum as measured by the chosen value. * @remarks * [Api set: ExcelApi 1.12] */ sum = "Sum" } /** * Enum representing all accepted conditions by which a value filter can be applied. Used to configure the type of PivotFilter that is applied to the field. `PivotFilter.exclusive` can be set to `true` to invert many of these conditions. * * @remarks * [Api set: ExcelApi 1.12] */ enum ValueFilterCondition { /** * `ValueFilterCondition` is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.12] */ unknown = "Unknown", /** * Equals comparator criterion. Required Criteria: {`value`, `comparator`}. Optional Criteria: {`exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ equals = "Equals", /** * Greater than comparator criterion. Required Criteria: {`value`, `comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ greaterThan = "GreaterThan", /** * Greater than or equal to comparator criterion. Required Criteria: {`value`, `comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ greaterThanOrEqualTo = "GreaterThanOrEqualTo", /** * Less than comparator criterion. Required Criteria: {`value`, `comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ lessThan = "LessThan", /** * Less than or equal to comparator criterion. Required Criteria: {`value`, `comparator`}. * @remarks * [Api set: ExcelApi 1.12] */ lessThanOrEqualTo = "LessThanOrEqualTo", /** * Between `lowerBound` and `upperBound` criteria. Required Criteria: {`value`, `lowerBound`, `upperBound`}. Optional Criteria: {`exclusive`}. * @remarks * [Api set: ExcelApi 1.12] */ between = "Between", /** * In top N (`threshold`) [items, percent, sum] of value category. Required Criteria: {`value`, `threshold`, `selectionType`}. * @remarks * [Api set: ExcelApi 1.12] */ topN = "TopN", /** * In bottom N (`threshold`) [items, percent, sum] of value category. Required Criteria: {`value`, `threshold`, `selectionType`}. * @remarks * [Api set: ExcelApi 1.12] */ bottomN = "BottomN" } /** * Represents the dimensions when getting values from chart series. * * @remarks * [Api set: ExcelApi 1.12] */ enum ChartSeriesDimension { /** * The chart series axis for the categories. * @remarks * [Api set: ExcelApi 1.12] */ categories = "Categories", /** * The chart series axis for the values. * @remarks * [Api set: ExcelApi 1.12] */ values = "Values", /** * The chart series axis for the x-axis values in scatter and bubble charts. * @remarks * [Api set: ExcelApi 1.12] */ xvalues = "XValues", /** * The chart series axis for the y-axis values in scatter and bubble charts. * @remarks * [Api set: ExcelApi 1.12] */ yvalues = "YValues", /** * The chart series axis for the bubble sizes in bubble charts. * @remarks * [Api set: ExcelApi 1.12] */ bubbleSizes = "BubbleSizes" } /** * Provides information about the selection that raised the selection changed event. **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. * * @remarks * [Api set: ExcelApi 1.2] */ interface BindingSelectionChangedEventArgs { /** * Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. * * @remarks * [Api set: ExcelApi 1.2] */ binding: Excel.Binding; /** * Gets the number of columns selected. * * @remarks * [Api set: ExcelApi 1.2] */ columnCount: number; /** * Gets the number of rows selected. * * @remarks * [Api set: ExcelApi 1.2] */ rowCount: number; /** * Gets the index of the first column of the selection (zero-based). * * @remarks * [Api set: ExcelApi 1.2] */ startColumn: number; /** * Gets the index of the first row of the selection (zero-based). * * @remarks * [Api set: ExcelApi 1.2] */ startRow: number; } /** * Provides information about the binding that raised the data changed event. * * @remarks * [Api set: ExcelApi 1.2] */ interface BindingDataChangedEventArgs { /** * Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. * * @remarks * [Api set: ExcelApi 1.2] */ binding: Excel.Binding; } /** * Provides information about the document that raised the selection changed event. * * @remarks * [Api set: ExcelApi 1.2] */ interface SelectionChangedEventArgs { /** * Gets the workbook object that raised the selection changed event. * * @remarks * [Api set: ExcelApi 1.2] */ workbook: Excel.Workbook; } /** * Provides information about the setting that raised the settings changed event * * @remarks * [Api set: ExcelApi 1.4] */ interface SettingsChangedEventArgs { /** * Gets the `Setting` object that represents the binding that raised the settings changed event * * @remarks * [Api set: ExcelApi 1.4] */ settings: Excel.SettingCollection; } /** * Provides information about the workbook that raised the activated event. * * @remarks * [Api set: ExcelApi 1.13] */ interface WorkbookActivatedEventArgs { /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.13] */ type: "WorkbookActivated"; } /** * Provides information about the workbook's `onAutoSaveSettingChanged` event. * * @remarks * [Api set: ExcelApi 1.9] */ interface WorkbookAutoSaveSettingChangedEventArgs { /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type: "WorkbookAutoSaveSettingChanged"; } /** * Represents the direction that existing or remaining cells in a worksheet will shift when cells are inserted into or deleted from a worksheet. * * @remarks * [Api set: ExcelApi 1.14] */ interface ChangeDirectionState { /** * Represents the direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted. Note: `insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. * * @remarks * [Api set: ExcelApi 1.14] */ deleteShiftDirection: Excel.DeleteShiftDirection | "Up" | "Left"; /** * Represents the direction (such as down or to the right) that the existing cells will shift when a new cell or cells are inserted. Note: `insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. * * @remarks * [Api set: ExcelApi 1.14] */ insertShiftDirection: Excel.InsertShiftDirection | "Down" | "Right"; } /** * Provides information about the details of a `WorksheetChangedEvent` or `TableChangedEvent`. * * @remarks * [Api set: ExcelApi 1.9] */ interface ChangedEventDetail { /** * Represents the value after the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. * * @remarks * [Api set: ExcelApi 1.9] */ valueAfter: any; /** * Represents the type of value after the change. Unlike `valueAfter`, `valueAsJsonAfter` can represent all cell values, such as formatted number, web image, and entity data types. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJsonAfter: CellValue; /** * Represents the type of value before the change. Unlike `valueBefore`, `valueAsJsonBefore` can represent all cell values, such as formatted number, web image, and entity data types. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJsonBefore: CellValue; /** * Represents the value before the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. * * @remarks * [Api set: ExcelApi 1.9] */ valueBefore: any; /** * Represents the type of value after the change. * * @remarks * [Api set: ExcelApi 1.9] */ valueTypeAfter: Excel.RangeValueType | "Unknown" | "Empty" | "String" | "Integer" | "Double" | "Boolean" | "Error" | "RichValue"; /** * Represents the type of value before the change. * * @remarks * [Api set: ExcelApi 1.9] */ valueTypeBefore: Excel.RangeValueType | "Unknown" | "Empty" | "String" | "Integer" | "Double" | "Boolean" | "Error" | "RichValue"; } /** * Provides information about the worksheet that raised the changed event. * * @remarks * [Api set: ExcelApi 1.7] */ interface WorksheetChangedEventArgs { /** * Gets the range address that represents the changed area of a specific worksheet. * * @remarks * [Api set: ExcelApi 1.7] */ address: string; /** * Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ changeType: Excel.DataChangeType | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" | "ColumnInserted" | "ColumnDeleted" | "CellInserted" | "CellDeleted"; /** * Represents the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. * * @remarks * [Api set: ExcelApi 1.9] */ details: Excel.ChangedEventDetail; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.7] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "WorksheetChanged"; /** * Gets the ID of the worksheet in which the data changed. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; /** * Represents a change to the direction that the cells in a worksheet will shift when a cell or cells are deleted or inserted. This includes the following two scenarios. 1. The direction (such as down or to the right) that existing cells will shift when a new cell or cells are inserted into a worksheet. 2. The direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted from a worksheet. * * @remarks * [Api set: ExcelApi 1.14] */ changeDirectionState: Excel.ChangeDirectionState; /** * Represents the trigger source of the event. For example, identifies whether this local add-in triggers the event. * * @remarks * [Api set: ExcelApi 1.14] */ triggerSource: Excel.EventTriggerSource | "Unknown" | "ThisLocalAddin"; /** * * Gets the range that represents the changed area of a specific worksheet. * * [Api set: ExcelApi 1.8] */ getRange(ctx: Excel.RequestContext): Excel.Range; /** * * Gets the range that represents the changed area of a specific worksheet. It might return null object. * * [Api set: ExcelApi 1.8] */ getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; } /** * Provides information about the worksheet format change event. * * @remarks * [Api set: ExcelApi 1.9] */ interface WorksheetFormatChangedEventArgs { /** * Gets the range address that represents the changed area of a specific worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ address: string; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.9] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type: "WorksheetFormatChanged"; /** * Gets the ID of the worksheet in which the data changed. * * @remarks * [Api set: ExcelApi 1.9] */ worksheetId: string; /** * * Gets the range that represents the changed area of a specific worksheet. * * [Api set: ExcelApi 1.9] */ getRange(ctx: Excel.RequestContext): Excel.Range; /** * * Gets the range that represents the changed area of a specific worksheet. It might return null object. * * [Api set: ExcelApi 1.9] */ getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; } /** * Provides information about the worksheet's row hidden change event. * * @remarks * [Api set: ExcelApi 1.11] */ interface WorksheetRowHiddenChangedEventArgs { /** * Gets the range address that represents the changed area of a specific worksheet. * * @remarks * [Api set: ExcelApi 1.11] */ address: string; /** * Gets the type of change that represents how the event was triggered. See `Excel.RowHiddenChangeType` for details. * * @remarks * [Api set: ExcelApi 1.11] */ changeType: Excel.RowHiddenChangeType | "Unhidden" | "Hidden"; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.11] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.11] */ type: "WorksheetRowHiddenChanged"; /** * Gets the ID of the worksheet in which the data changed. * * @remarks * [Api set: ExcelApi 1.11] */ worksheetId: string; } /** * Provides information about the table that raised the changed event. * * @remarks * [Api set: ExcelApi 1.7] */ interface TableChangedEventArgs { /** * Gets the address that represents the changed area of a table on a specific worksheet. * * @remarks * [Api set: ExcelApi 1.7] */ address: string; /** * Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ changeType: Excel.DataChangeType | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" | "ColumnInserted" | "ColumnDeleted" | "CellInserted" | "CellDeleted"; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.7] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the ID of the table in which the data changed. * * @remarks * [Api set: ExcelApi 1.7] */ tableId: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "TableChanged"; /** * Gets the ID of the worksheet in which the data changed. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; /** * Gets the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. * * @remarks * [Api set: ExcelApi 1.9] */ details: Excel.ChangedEventDetail; /** * * Gets the range that represents the changed area of a table on a specific worksheet. * * [Api set: ExcelApi 1.8] */ getRange(ctx: Excel.RequestContext): Excel.Range; /** * * Gets the range that represents the changed area of a table on a specific worksheet. It might return null object. * * [Api set: ExcelApi 1.8] */ getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; } /** * Provides information about the worksheet and formulas that raised the formula changed event. * * @remarks * [Api set: ExcelApi 1.13] */ interface WorksheetFormulaChangedEventArgs { /** * Gets an array of `FormulaChangedEventDetail` objects, which contain the details about the all of the changed formulas. * * @remarks * [Api set: ExcelApi 1.13] */ formulaDetails: Excel.FormulaChangedEventDetail[]; /** * The source of the event. It can be local or remote (through co-authoring). * * @remarks * [Api set: ExcelApi 1.13] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.13] */ type: "WorksheetFormulaChanged"; /** * Gets the ID of the worksheet in which the formula changed. * * @remarks * [Api set: ExcelApi 1.13] */ worksheetId: string; } /** * Provides information about a changed formula during a formula changed event. * * @remarks * [Api set: ExcelApi 1.13] */ interface FormulaChangedEventDetail { /** * The address of the cell that contains the changed formula. * * @remarks * [Api set: ExcelApi 1.13] */ cellAddress: string; /** * Represents the previous formula, before it was changed. * * @remarks * [Api set: ExcelApi 1.13] */ previousFormula: string; } /** * Provides information about the worksheet that raised the protection status changed event, which fires when the protection status is updated in a worksheet. * * @remarks * [Api set: ExcelApi 1.14] */ interface WorksheetProtectionChangedEventArgs { /** * Specifies if any of the `AllowEditRange` objects have changed. * * @remarks * [Api set: ExcelApiOnline 1.1] */ allowEditRangesChanged: boolean; /** * Gets the current protection status of the worksheet. * * @remarks * [Api set: ExcelApi 1.14] */ isProtected: boolean; /** * Specifies if the `WorksheetProtectionOptions` have changed. * * @remarks * [Api set: ExcelApiOnline 1.1] */ protectionOptionsChanged: boolean; /** * Specifies if the worksheet password has changed. * * @remarks * [Api set: ExcelApiOnline 1.1] */ sheetPasswordChanged: boolean; /** * The source of the event. It can be local or remote (through co-authoring). * * @remarks * [Api set: ExcelApi 1.14] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.14] */ type: "WorksheetProtectionChanged"; /** * Gets the ID of the worksheet in which the protection status is changed. * * @remarks * [Api set: ExcelApi 1.14] */ worksheetId: string; } /** * Provides information about the worksheet that raised the activated event. * * @remarks * [Api set: ExcelApi 1.7] */ interface WorksheetActivatedEventArgs { /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "WorksheetActivated"; /** * Gets the ID of the worksheet that is activated. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; } /** * Provides information about the worksheet that raised the deactivated event. * * @remarks * [Api set: ExcelApi 1.7] */ interface WorksheetDeactivatedEventArgs { /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "WorksheetDeactivated"; /** * Gets the ID of the worksheet that is deactivated. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; } /** * Provides information about the row-sorted event and its related worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ interface WorksheetRowSortedEventArgs { /** * Gets the range address that represents the sorted areas of a specific worksheet. Only rows changed as a result of the sort operation are returned. * * @remarks * [Api set: ExcelApi 1.10] */ address: string; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.10] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.10] */ type: "WorksheetRowSorted"; /** * Gets the ID of the worksheet where the sorting happened. * * @remarks * [Api set: ExcelApi 1.10] */ worksheetId: string; } /** * Provides information about the column-sorted event and its related worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ interface WorksheetColumnSortedEventArgs { /** * Gets the range address that represents the sorted areas of a specific worksheet. Only columns changed as a result of the sort operation are returned. * * @remarks * [Api set: ExcelApi 1.10] */ address: string; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.10] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.10] */ type: "WorksheetColumnSorted"; /** * Gets the ID of the worksheet where the sorting happened. * * @remarks * [Api set: ExcelApi 1.10] */ worksheetId: string; } /** * Provides information about the worksheet that raised the selection changed event. * * @remarks * [Api set: ExcelApi 1.7] */ interface WorksheetSelectionChangedEventArgs { /** * Gets the range address that represents the selected area of a specific worksheet. * * @remarks * [Api set: ExcelApi 1.7] */ address: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "WorksheetSelectionChanged"; /** * Gets the ID of the worksheet in which the selection changed. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; } /** * Provides information about the left-clicked/tapped event and its related worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ interface WorksheetSingleClickedEventArgs { /** * Gets the address that represents the cell which was left-clicked/tapped for a specific worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ address: string; /** * The distance, in points, from the left-clicked/tapped point to the left (or right for right-to-left languages) gridline edge of the left-clicked/tapped cell. * * @remarks * [Api set: ExcelApi 1.10] */ offsetX: number; /** * The distance, in points, from the left-clicked/tapped point to the top gridline edge of the left-clicked/tapped cell. * * @remarks * [Api set: ExcelApi 1.10] */ offsetY: number; /** * Gets the type of the event. * * @remarks * [Api set: ExcelApi 1.10] */ type: "WorksheetSingleClicked"; /** * Gets the ID of the worksheet in which the cell was left-clicked/tapped. * * @remarks * [Api set: ExcelApi 1.10] */ worksheetId: string; } /** * Provides information about the table that raised the selection changed event. * * @remarks * [Api set: ExcelApi 1.7] */ interface TableSelectionChangedEventArgs { /** * Gets the range address that represents the selected area of the table on a specific worksheet. * * @remarks * [Api set: ExcelApi 1.7] */ address: string; /** * Specifies if the selection is inside a table. `IsInsideTable` must be set to `true` for the address to be useful. * * @remarks * [Api set: ExcelApi 1.7] */ isInsideTable: boolean; /** * Gets the ID of the table in which the selection changed. * * @remarks * [Api set: ExcelApi 1.7] */ tableId: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "TableSelectionChanged"; /** * Gets the ID of the worksheet in which the selection changed. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; } /** * Provides information about the worksheet that raised the added event. * * @remarks * [Api set: ExcelApi 1.7] */ interface WorksheetAddedEventArgs { /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.7] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "WorksheetAdded"; /** * Gets the ID of the worksheet that is added to the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; } /** * Provides information about the worksheet that raised the deleted event. * * @remarks * [Api set: ExcelApi 1.7] */ interface WorksheetDeletedEventArgs { /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.7] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type: "WorksheetDeleted"; /** * Gets the ID of the worksheet that is deleted from the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ worksheetId: string; } /** * Provides information about the chart that raised the added event. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartAddedEventArgs { /** * Gets the ID of the chart that is added to the worksheet. * * @remarks * [Api set: ExcelApi 1.8] */ chartId: string; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.8] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ type: "ChartAdded"; /** * Gets the ID of the worksheet in which the chart is added. * * @remarks * [Api set: ExcelApi 1.8] */ worksheetId: string; } /** * Provides information about the chart that raised the activated event. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartActivatedEventArgs { /** * Gets the ID of the chart that is activated. * * @remarks * [Api set: ExcelApi 1.8] */ chartId: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ type: "ChartActivated"; /** * Gets the ID of the worksheet in which the chart is activated. * * @remarks * [Api set: ExcelApi 1.8] */ worksheetId: string; } /** * Provides information about the chart that raised the deactivated event. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartDeactivatedEventArgs { /** * Gets the ID of the chart that is deactivated. * * @remarks * [Api set: ExcelApi 1.8] */ chartId: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ type: "ChartDeactivated"; /** * Gets the ID of the worksheet in which the chart is deactivated. * * @remarks * [Api set: ExcelApi 1.8] */ worksheetId: string; } /** * Provides information about the chart that raised the deleted event. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartDeletedEventArgs { /** * Gets the ID of the chart that is deleted from the worksheet. * * @remarks * [Api set: ExcelApi 1.8] */ chartId: string; /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.8] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ type: "ChartDeleted"; /** * Gets the ID of the worksheet in which the chart is deleted. * * @remarks * [Api set: ExcelApi 1.8] */ worksheetId: string; } /** * Provides information about the worksheet that raised the calculated event. * * @remarks * [Api set: ExcelApi 1.8] */ interface WorksheetCalculatedEventArgs { /** * The address of the range that completed calculation. If multiple ranges completed calculation, the string is a comma-separated list of those range addresses. * * @remarks * [Api set: ExcelApi 1.11] */ address: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ type: "WorksheetCalculated"; /** * Gets the ID of the worksheet in which the calculation occurred. * * @remarks * [Api set: ExcelApi 1.8] */ worksheetId: string; } /** * Provides information about the table that raised the added event. * * @remarks * [Api set: ExcelApi 1.9] */ interface TableAddedEventArgs { /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.9] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the ID of the table that is added. * * @remarks * [Api set: ExcelApi 1.9] */ tableId: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type: "TableAdded"; /** * Gets the ID of the worksheet in which the table is added. * * @remarks * [Api set: ExcelApi 1.9] */ worksheetId: string; } /** * Provides information about the table that raised the deleted event. * * @remarks * [Api set: ExcelApi 1.9] */ interface TableDeletedEventArgs { /** * Gets the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.9] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the ID of the table that is deleted. * * @remarks * [Api set: ExcelApi 1.9] */ tableId: string; /** * Gets the name of the table that is deleted. * * @remarks * [Api set: ExcelApi 1.9] */ tableName: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type: "TableDeleted"; /** * Gets the ID of the worksheet in which the table is deleted. * * @remarks * [Api set: ExcelApi 1.9] */ worksheetId: string; } /** * Provides information about the comments that raised the comment added event. * * @remarks * [Api set: ExcelApi 1.12] */ interface CommentAddedEventArgs { /** * Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. * * @remarks * [Api set: ExcelApi 1.12] */ commentDetails: Excel.CommentDetail[]; /** * Specifies the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.12] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.12] */ type: "CommentAdded"; /** * Gets the ID of the worksheet in which the event happened. * * @remarks * [Api set: ExcelApi 1.12] */ worksheetId: string; } /** * Provides information about the comments that raised the comment deleted event. * * @remarks * [Api set: ExcelApi 1.12] */ interface CommentDeletedEventArgs { /** * Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. * * @remarks * [Api set: ExcelApi 1.12] */ commentDetails: Excel.CommentDetail[]; /** * Specifies the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.12] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.12] */ type: "CommentDeleted"; /** * Gets the ID of the worksheet in which the event happened. * * @remarks * [Api set: ExcelApi 1.12] */ worksheetId: string; } /** * Occurs when existing comments are changed. * * @remarks * [Api set: ExcelApi 1.12] */ interface CommentChangedEventArgs { /** * Gets the change type that represents how the changed event is triggered. * * @remarks * [Api set: ExcelApi 1.12] */ changeType: Excel.CommentChangeType | "CommentEdited" | "CommentResolved" | "CommentReopened" | "ReplyAdded" | "ReplyDeleted" | "ReplyEdited"; /** * Get the `CommentDetail` array which contains the comment ID and IDs of its related replies. * * @remarks * [Api set: ExcelApi 1.12] */ commentDetails: Excel.CommentDetail[]; /** * Specifies the source of the event. See `Excel.EventSource` for details. * * @remarks * [Api set: ExcelApi 1.12] */ source: Excel.EventSource | "Local" | "Remote"; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.12] */ type: "CommentChanged"; /** * Gets the ID of the worksheet in which the event happened. * * @remarks * [Api set: ExcelApi 1.12] */ worksheetId: string; } /** * A structure for the comment ID and IDs of its related replies. * * @remarks * [Api set: ExcelApi 1.12] */ interface CommentDetail { /** * Represents the IDs of the related replies that belong to the comment. * * @remarks * [Api set: ExcelApi 1.12] */ replyIds: string[]; /** * Represents the ID of the comment. * * @remarks * [Api set: ExcelApi 1.12] */ commentId: string; } /** * Provides information about the shape that raised the activated event. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeActivatedEventArgs { /** * Gets the ID of the activated shape. * * @remarks * [Api set: ExcelApi 1.9] */ shapeId: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type: "ShapeActivated"; /** * Gets the ID of the worksheet in which the shape is activated. * * @remarks * [Api set: ExcelApi 1.9] */ worksheetId: string; } /** * Provides information about the shape that raised the deactivated event. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeDeactivatedEventArgs { /** * Gets the ID of the shape deactivated shape. * * @remarks * [Api set: ExcelApi 1.9] */ shapeId: string; /** * Gets the type of the event. See `Excel.EventType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type: "ShapeDeactivated"; /** * Gets the ID of the worksheet in which the shape is deactivated. * * @remarks * [Api set: ExcelApi 1.9] */ worksheetId: string; } /** * Represents the Excel Runtime class. * * @remarks * [Api set: ExcelApi 1.5] */ class Runtime extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Toggle JavaScript events in the current task pane or content add-in. * * @remarks * [Api set: ExcelApi 1.8] */ enableEvents: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RuntimeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Runtime): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RuntimeLoadOptions): Excel.Runtime; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Runtime; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Runtime; /** * 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.Runtime object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RuntimeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RuntimeData; } /** * Represents the Excel application that manages the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ class Application extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. * * @remarks * [Api set: ExcelApi 1.11] */ readonly cultureInfo: Excel.CultureInfo; /** * Returns the iterative calculation settings. In Excel on Windows and Mac, the settings will apply to the Excel Application. In Excel on the web and other platforms, the settings will apply to the active workbook. * * @remarks * [Api set: ExcelApi 1.9] */ readonly iterativeCalculation: Excel.IterativeCalculation; /** * Returns the Excel calculation engine version used for the last full recalculation. * * @remarks * [Api set: ExcelApi 1.9] */ readonly calculationEngineVersion: number; /** * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. * * @remarks * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ calculationMode: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; /** * Returns the calculation state of the application. See `Excel.CalculationState` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readonly calculationState: Excel.CalculationState | "Done" | "Calculating" | "Pending"; /** * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. * * @remarks * [Api set: ExcelApi 1.11] */ readonly decimalSeparator: string; /** * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. * * @remarks * [Api set: ExcelApi 1.11] */ readonly thousandsSeparator: string; /** * Specifies if the system separators of Excel are enabled. System separators include the decimal separator and thousands separator. * * @remarks * [Api set: ExcelApi 1.11] */ readonly useSystemSeparators: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Application): void; /** * Recalculate all currently opened workbooks in Excel. * * @remarks * [Api set: ExcelApi 1.1] * * @param calculationType Specifies the calculation type to use. See `Excel.CalculationType` for details. */ calculate(calculationType: Excel.CalculationType): void; /** * Recalculate all currently opened workbooks in Excel. * * @remarks * [Api set: ExcelApi 1.1] * * @param calculationType Specifies the calculation type to use. See `Excel.CalculationType` for details. */ calculate(calculationType: "Recalculate" | "Full" | "FullRebuild"): void; /** * Suspends calculation until the next `context.sync()` is called. Once set, it is the developer's responsibility to re-calc the workbook, to ensure that any dependencies are propagated. * * @remarks * [Api set: ExcelApi 1.6] */ suspendApiCalculationUntilNextSync(): void; /** * Suspends screen updating until the next `context.sync()` is called. **Note**: Don't call `suspendScreenUpdatingUntilNextSync` repeatedly (such as in a loop). Repeated calls will cause the Excel window to flicker. * * @remarks * [Api set: ExcelApi 1.9] */ suspendScreenUpdatingUntilNextSync(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ApplicationLoadOptions): Excel.Application; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Application; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Application; /** * 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.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ApplicationData; } /** * Represents the iterative calculation settings. * * @remarks * [Api set: ExcelApi 1.9] */ class IterativeCalculation extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * True if Excel will use iteration to resolve circular references. * * @remarks * [Api set: ExcelApi 1.9] */ enabled: boolean; /** * Specifies the maximum amount of change between each iteration as Excel resolves circular references. * * @remarks * [Api set: ExcelApi 1.9] */ maxChange: number; /** * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. * * @remarks * [Api set: ExcelApi 1.9] */ maxIteration: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.IterativeCalculationUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.IterativeCalculation): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.IterativeCalculationLoadOptions): Excel.IterativeCalculation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.IterativeCalculation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.IterativeCalculation; /** * 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.IterativeCalculation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.IterativeCalculationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.IterativeCalculationData; } /** * Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges. To learn more about the workbook object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ class Workbook extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the Excel application instance that contains this workbook. * * @remarks * [Api set: ExcelApi 1.1] */ readonly application: Excel.Application; /** * Represents a collection of bindings that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ readonly bindings: Excel.BindingCollection; /** * Represents a collection of comments associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ readonly comments: Excel.CommentCollection; /** * Represents the collection of custom XML parts contained by this workbook. * * @remarks * [Api set: ExcelApi 1.5] */ readonly customXmlParts: Excel.CustomXmlPartCollection; /** * Represents all data connections in the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ readonly dataConnections: Excel.DataConnectionCollection; /** * Represents a collection of worksheet functions that can be used for computation. * * @remarks * [Api set: ExcelApi 1.2] */ readonly functions: Excel.Functions; /** * Returns a collection of linked workbooks. In formulas, the workbook links can be used to reference data (cell values and names) outside of the current workbook. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly linkedWorkbooks: Excel.LinkedWorkbookCollection; /** * Represents a collection of workbook-scoped named items (named ranges and constants). * * @remarks * [Api set: ExcelApi 1.1] */ readonly names: Excel.NamedItemCollection; /** * Represents a collection of PivotTableStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ readonly pivotTableStyles: Excel.PivotTableStyleCollection; /** * Represents a collection of PivotTables associated with the workbook. * * @remarks * [Api set: ExcelApi 1.3] */ readonly pivotTables: Excel.PivotTableCollection; /** * Gets the workbook properties. * * @remarks * [Api set: ExcelApi 1.7] */ readonly properties: Excel.DocumentProperties; /** * Returns the protection object for a workbook. * * @remarks * [Api set: ExcelApi 1.7] */ readonly protection: Excel.WorkbookProtection; /** * Returns a collection of Power Query queries that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.14] */ readonly queries: Excel.QueryCollection; /** * Represents a collection of settings associated with the workbook. * * @remarks * [Api set: ExcelApi 1.4] */ readonly settings: Excel.SettingCollection; /** * Represents a collection of SlicerStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ readonly slicerStyles: Excel.SlicerStyleCollection; /** * Represents a collection of slicers associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ readonly slicers: Excel.SlicerCollection; /** * Represents a collection of styles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ readonly styles: Excel.StyleCollection; /** * Represents a collection of TableStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ readonly tableStyles: Excel.TableStyleCollection; /** * Represents a collection of tables associated with the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ readonly tables: Excel.TableCollection; /** * Represents a collection of TimelineStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ readonly timelineStyles: Excel.TimelineStyleCollection; /** * Represents a collection of worksheets associated with the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ readonly worksheets: Excel.WorksheetCollection; /** * Specifies if the workbook is in AutoSave mode. * * @remarks * [Api set: ExcelApi 1.9] */ readonly autoSave: boolean; /** * Returns a number about the version of Excel Calculation Engine. * * @remarks * [Api set: ExcelApi 1.9] */ readonly calculationEngineVersion: number; /** * True if all charts in the workbook are tracking the actual data points to which they are attached. False if the charts track the index of the data points. * * @remarks * [Api set: ExcelApi 1.9] */ chartDataPointTrack: boolean; /** * Specifies if changes have been made since the workbook was last saved. You can set this property to `true` if you want to close a modified workbook without either saving it or being prompted to save it. * * @remarks * [Api set: ExcelApi 1.9] */ isDirty: boolean; /** * Gets the workbook name. * * @remarks * [Api set: ExcelApi 1.7] */ readonly name: string; /** * Specifies if the workbook has ever been saved locally or online. * * @remarks * [Api set: ExcelApi 1.9] */ readonly previouslySaved: boolean; /** * Returns `true` if the workbook is open in read-only mode. * * @remarks * [Api set: ExcelApi 1.8] */ readonly readOnly: boolean; /** * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. Data will permanently lose accuracy when switching this property from `false` to `true`. * * @remarks * [Api set: ExcelApi 1.9] */ usePrecisionAsDisplayed: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.WorkbookUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Workbook): void; /** * Close current workbook. * * @remarks * [Api set: ExcelApi 1.11] * * @param closeBehavior workbook close behavior. */ close(closeBehavior?: Excel.CloseBehavior): void; /** * Close current workbook. * * @remarks * [Api set: ExcelApi 1.11] * * @param closeBehavior workbook close behavior. */ close(closeBehavior?: "Save" | "SkipSave"): void; /** * Gets the currently active cell from the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ getActiveCell(): Excel.Range; /** * Gets the currently active chart in the workbook. If there is no active chart, an `ItemNotFound` exception is thrown. * * @remarks * [Api set: ExcelApi 1.9] */ getActiveChart(): Excel.Chart; /** * Gets the currently active chart in the workbook. If there is no active chart, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] */ getActiveChartOrNullObject(): Excel.Chart; /** * Gets the currently active slicer in the workbook. If there is no active slicer, an `ItemNotFound` exception is thrown. * * @remarks * [Api set: ExcelApi 1.10] */ getActiveSlicer(): Excel.Slicer; /** * Gets the currently active slicer in the workbook. If there is no active slicer, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.10] */ getActiveSlicerOrNullObject(): Excel.Slicer; /** * Returns `true` if the workbook is being edited by multiple users (through co-authoring). Please be aware there might be some delay between when the workbook status changes and when the changes are reflected on the result of the method. * * @remarks * [Api set: ExcelApi 1.9] */ getIsActiveCollabSession(): OfficeExtension.ClientResult; /** * Returns a `LinkedEntityCellValue` based on the provided `LinkedEntityId`. * * @remarks * [Api set: ExcelApi 1.16] * * @param linkedEntityCellValueId An identifier that specifies an individual `LinkedEntityCellValue`. */ getLinkedEntityCellValue(linkedEntityCellValueId: LinkedEntityId): OfficeExtension.ClientResult; /** * Gets the currently selected single range from the workbook. If there are multiple ranges selected, this method will throw an error. * * @remarks * [Api set: ExcelApi 1.1] */ getSelectedRange(): Excel.Range; /** * Gets the currently selected one or more ranges from the workbook. Unlike `getSelectedRange()`, this method returns a `RangeAreas` object that represents all the selected ranges. * * @remarks * [Api set: ExcelApi 1.9] */ getSelectedRanges(): Excel.RangeAreas; /** * Inserts the specified worksheets from a source workbook into the current workbook. **Note**: This API is currently only supported for Office on Windows, Mac, and the web. * * @remarks * [Api set: ExcelApi 1.13] * * @param base64File Required. The base64-encoded string representing the source workbook file. * @param options Optional. The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. By default, all the worksheets from the source workbook are inserted at the end of the current workbook. * @returns An array of IDs corresponding to each newly inserted worksheet. */ insertWorksheetsFromBase64(base64File: string, options?: Excel.InsertWorksheetOptions): OfficeExtension.ClientResult; /** * Save current workbook. * * @remarks * [Api set: ExcelApi 1.11] * * @param saveBehavior The save behavior must be "Save" or "Prompt". Default value is "Save". */ save(saveBehavior?: Excel.SaveBehavior): void; /** * Save current workbook. * * @remarks * [Api set: ExcelApi 1.11] * * @param saveBehavior The save behavior must be "Save" or "Prompt". Default value is "Save". */ save(saveBehavior?: "Save" | "Prompt"): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorkbookLoadOptions): Excel.Workbook; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Workbook; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Workbook; /** * Occurs when the workbook is activated. Note: This event will not fire when the workbook is opened. * * @remarks * [Api set: ExcelApi 1.13] * * @eventproperty */ readonly onActivated: OfficeExtension.EventHandlers; /** * Occurs when the AutoSave setting is changed on the workbook. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onAutoSaveSettingChanged: OfficeExtension.EventHandlers; /** * Occurs when the selection in the document is changed. * * @remarks * [Api set: ExcelApi 1.2] * * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * 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.Workbook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.WorkbookData; } /** * Represents the protection of a workbook object. * * @remarks * [Api set: ExcelApi 1.7] */ class WorkbookProtection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies if the workbook is protected. * * @remarks * [Api set: ExcelApi 1.7] */ readonly protected: boolean; /** * Protects a workbook. Fails if the workbook has been protected. * * @remarks * [Api set: ExcelApi 1.7] * * @param password Workbook protection password. */ protect(password?: string): void; /** * Unprotects a workbook. * * @remarks * [Api set: ExcelApi 1.7] * * @param password Workbook protection password. */ unprotect(password?: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorkbookProtectionLoadOptions): Excel.WorkbookProtection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.WorkbookProtection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.WorkbookProtection; /** * 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.WorkbookProtection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookProtectionData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.WorkbookProtectionData; } /** * The `WorkbookCreated` object is the top level object created by `Application.CreateWorkbook`. A `WorkbookCreated` object is a special Workbook object. * * @remarks * [Api set: ExcelApi 1.8] */ class WorkbookCreated extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.WorkbookCreated; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.WorkbookCreated; /** * 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.WorkbookCreated object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookCreatedData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.WorkbookCreatedData; } /** * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. To learn more about the worksheet object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | Work with worksheets using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ class Worksheet extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the `AutoFilter` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ readonly autoFilter: Excel.AutoFilter; /** * Returns a collection of charts that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ readonly charts: Excel.ChartCollection; /** * Returns a collection of all the Comments objects on the worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ readonly comments: Excel.CommentCollection; /** * Gets a collection of worksheet-level custom properties. * * @remarks * [Api set: ExcelApi 1.12] */ readonly customProperties: Excel.WorksheetCustomPropertyCollection; /** * Gets an object that can be used to manipulate frozen panes on the worksheet. * * @remarks * [Api set: ExcelApi 1.7] */ readonly freezePanes: Excel.WorksheetFreezePanes; /** * Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. * * @remarks * [Api set: ExcelApi 1.9] */ readonly horizontalPageBreaks: Excel.PageBreakCollection; /** * Returns a collection of sheet views that are present in the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly namedSheetViews: Excel.NamedSheetViewCollection; /** * Collection of names scoped to the current worksheet. * * @remarks * [Api set: ExcelApi 1.4] */ readonly names: Excel.NamedItemCollection; /** * Gets the `PageLayout` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ readonly pageLayout: Excel.PageLayout; /** * Collection of PivotTables that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.3] */ readonly pivotTables: Excel.PivotTableCollection; /** * Returns the sheet protection object for a worksheet. * * @remarks * [Api set: ExcelApi 1.2] */ readonly protection: Excel.WorksheetProtection; /** * Returns the collection of all the Shape objects on the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ readonly shapes: Excel.ShapeCollection; /** * Returns a collection of slicers that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ readonly slicers: Excel.SlicerCollection; /** * Collection of tables that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ readonly tables: Excel.TableCollection; /** * Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks. * * @remarks * [Api set: ExcelApi 1.9] */ readonly verticalPageBreaks: Excel.PageBreakCollection; /** * Determines if Excel should recalculate the worksheet when necessary. True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. * * @remarks * [Api set: ExcelApi 1.9] */ enableCalculation: boolean; /** * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. * * @remarks * [Api set: ExcelApi 1.1] */ readonly id: string; /** * The display name of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ name: string; /** * The zero-based position of the worksheet within the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ position: number; /** * Specifies if gridlines are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showGridlines: boolean; /** * Specifies if headings are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showHeadings: boolean; /** * Returns the standard (default) height of all the rows in the worksheet, in points. * * @remarks * [Api set: ExcelApi 1.7] */ readonly standardHeight: number; /** * Specifies the standard (default) width of all the columns in the worksheet. One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. * * @remarks * [Api set: ExcelApi 1.7] */ standardWidth: number; /** * The tab color of the worksheet. When retrieving the tab color, if the worksheet is invisible, the value will be `null`. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form #RRGGBB (e.g., "FFA500"). When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. * * @remarks * [Api set: ExcelApi 1.7] */ tabColor: string; /** * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). * * @remarks * [Api set: ExcelApi 1.14] */ readonly tabId: number; /** * The visibility of the worksheet. * * @remarks * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] */ visibility: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.WorksheetUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Worksheet): void; /** * Activate the worksheet in the Excel UI. * * @remarks * [Api set: ExcelApi 1.1] */ activate(): void; /** * Calculates all cells on a worksheet. * * @remarks * [Api set: ExcelApi 1.6] * * @param markAllDirty True, to mark all as dirty. */ calculate(markAllDirty: boolean): void; /** * Copies a worksheet and places it at the specified position. * * @remarks * [Api set: ExcelApi 1.7] * * @param positionType The location in the workbook to place the newly created worksheet. The default value is "None", which inserts the worksheet at the beginning of the worksheet. * @param relativeTo The existing worksheet which determines the newly created worksheet's position. This is only needed if `positionType` is "Before" or "After". * @returns The newly created worksheet. */ copy(positionType?: Excel.WorksheetPositionType, relativeTo?: Excel.Worksheet): Excel.Worksheet; /** * Copies a worksheet and places it at the specified position. * * @remarks * [Api set: ExcelApi 1.7] * * @param positionType The location in the workbook to place the newly created worksheet. The default value is "None", which inserts the worksheet at the beginning of the worksheet. * @param relativeTo The existing worksheet which determines the newly created worksheet's position. This is only needed if `positionType` is "Before" or "After". * @returns The newly created worksheet. */ copy(positionType?: "None" | "Before" | "After" | "Beginning" | "End", relativeTo?: Excel.Worksheet): Excel.Worksheet; /** * Deletes the worksheet from the workbook. Note that if the worksheet's visibility is set to "VeryHidden", the delete operation will fail with an `InvalidOperation` exception. You should first change its visibility to hidden or visible before deleting it. * * @remarks * [Api set: ExcelApi 1.1] */ delete(): void; /** * Finds all occurrences of the given string based on the criteria specified and returns them as a `RangeAreas` object, comprising one or more rectangular ranges. * * @remarks * [Api set: ExcelApi 1.9] * * @param text The string to find. * @param criteria Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. * @returns A `RangeAreas` object, comprising one or more rectangular ranges, that matches the search criteria. If no cells meet this criteria, an `ItemNotFound` error will be thrown. */ findAll(text: string, criteria: Excel.WorksheetSearchCriteria): Excel.RangeAreas; /** * Finds all occurrences of the given string based on the criteria specified and returns them as a `RangeAreas` object, comprising one or more rectangular ranges. * * @remarks * [Api set: ExcelApi 1.9] * * @param text The string to find. * @param criteria Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. * @returns A `RangeAreas` object, comprising one or more rectangular ranges, that matches the search criteria. If there are no matches, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. */ findAllOrNullObject(text: string, criteria: Excel.WorksheetSearchCriteria): Excel.RangeAreas; /** * Gets the `Range` object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it stays within the worksheet grid. * * @remarks * [Api set: ExcelApi 1.1] * * @param row The row number of the cell to be retrieved. Zero-indexed. * @param column The column number of the cell to be retrieved. Zero-indexed. */ getCell(row: number, column: number): Excel.Range; /** * Gets the worksheet that follows this one. If there are no worksheets following this one, this method will throw an error. * * @remarks * [Api set: ExcelApi 1.5] * * @param visibleOnly Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. */ getNext(visibleOnly?: boolean): Excel.Worksheet; /** * Gets the worksheet that follows this one. If there are no worksheets following this one, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.5] * * @param visibleOnly Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. */ getNextOrNullObject(visibleOnly?: boolean): Excel.Worksheet; /** * Gets the worksheet that precedes this one. If there are no previous worksheets, this method will throw an error. * * @remarks * [Api set: ExcelApi 1.5] * * @param visibleOnly Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. */ getPrevious(visibleOnly?: boolean): Excel.Worksheet; /** * Gets the worksheet that precedes this one. If there are no previous worksheets, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.5] * * @param visibleOnly Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. */ getPreviousOrNullObject(visibleOnly?: boolean): Excel.Worksheet; /** * Gets the `Range` object, representing a single rectangular block of cells, specified by the address or name. * * @remarks * [Api set: ExcelApi 1.1] * * @param address Optional. The string representing the address or name of the range. For example, "A1:B2". If not specified, the entire worksheet range is returned. */ getRange(address?: string): Excel.Range; /** * Gets the `Range` object beginning at a particular row index and column index, and spanning a certain number of rows and columns. * * @remarks * [Api set: ExcelApi 1.7] * * @param startRow Start row (zero-indexed). * @param startColumn Start column (zero-indexed). * @param rowCount Number of rows to include in the range. * @param columnCount Number of columns to include in the range. */ getRangeByIndexes(startRow: number, startColumn: number, rowCount: number, columnCount: number): Excel.Range; /** * Gets the `RangeAreas` object, representing one or more blocks of rectangular ranges, specified by the address or name. * * @remarks * [Api set: ExcelApi 1.9] * * @param address Optional. A string containing the comma-separated or semicolon-separated addresses or names of the individual ranges. For example, "A1:B2, A5:B5" or "A1:B2; A5:B5". If not specified, a `RangeAreas` object for the entire worksheet is returned. */ getRanges(address?: string): Excel.RangeAreas; /** * The used range is the smallest range that encompasses any cells that have a value or formatting assigned to them. If the entire worksheet is blank, this function will return the top left cell (i.e. it will *not* throw an error). * * @remarks * [Api set: ExcelApi 1.1] * * @param valuesOnly Optional. If `true`, considers only cells with values as used cells (ignoring formatting). [Api set: ExcelApi 1.2] */ getUsedRange(valuesOnly?: boolean): Excel.Range; /** * The used range is the smallest range that encompasses any cells that have a value or formatting assigned to them. If the entire worksheet is blank, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param valuesOnly Optional. Considers only cells with values as used cells. */ getUsedRangeOrNullObject(valuesOnly?: boolean): Excel.Range; /** * Finds and replaces the given string based on the criteria specified within the current worksheet. * * @remarks * [Api set: ExcelApi 1.9] * * @param text String to find. * @param replacement The string that replaces the original string. * @param criteria Additional replacement criteria. * @returns The number of replacements performed. */ replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult; /** * Shows row or column groups by their outline levels. Outlines groups and summarizes a list of data in the worksheet. The `rowLevels` and `columnLevels` parameters specify how many levels of the outline will be displayed. The acceptable argument range is between 0 and 8. A value of 0 does not change the current display. A value greater than the current number of levels displays all the levels. * * @remarks * [Api set: ExcelApi 1.10] * * @param rowLevels The number of row levels of an outline to display. * @param columnLevels The number of column levels of an outline to display. */ showOutlineLevels(rowLevels: number, columnLevels: number): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorksheetLoadOptions): Excel.Worksheet; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Worksheet; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Worksheet; /** * Occurs when the worksheet is activated. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onActivated: OfficeExtension.EventHandlers; /** * Occurs when the worksheet is calculated. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onCalculated: OfficeExtension.EventHandlers; /** * Occurs when data changes in a specific worksheet. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; /** * Occurs when one or more columns have been sorted. This happens as the result of a left to right sort operation. * * @remarks * [Api set: ExcelApi 1.10] * * @eventproperty */ readonly onColumnSorted: OfficeExtension.EventHandlers; /** * Occurs when the worksheet is deactivated. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onDeactivated: OfficeExtension.EventHandlers; /** * Occurs when format changed on a specific worksheet. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onFormatChanged: OfficeExtension.EventHandlers; /** * Occurs when one or more formulas are changed in this worksheet. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. * * @remarks * [Api set: ExcelApi 1.13] * * @eventproperty */ readonly onFormulaChanged: OfficeExtension.EventHandlers; /** * Occurs when the worksheet name is changed. * * @remarks * [Api set: ExcelApi 1.17] * * @eventproperty */ readonly onNameChanged: OfficeExtension.EventHandlers; /** * Occurs when the worksheet protection state is changed. * * @remarks * [Api set: ExcelApi 1.14] * * @eventproperty */ readonly onProtectionChanged: OfficeExtension.EventHandlers; /** * Occurs when the hidden state of one or more rows has changed on a specific worksheet. * * @remarks * [Api set: ExcelApi 1.11] * * @eventproperty */ readonly onRowHiddenChanged: OfficeExtension.EventHandlers; /** * Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. * * @remarks * [Api set: ExcelApi 1.10] * * @eventproperty */ readonly onRowSorted: OfficeExtension.EventHandlers; /** * Occurs when the selection changes on a specific worksheet. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * Occurs when a left-clicked/tapped action happens in the worksheet. This event will not be fired when clicking in the following cases: - The user drags the mouse for multi-selection. - The user selects a cell in the mode when cell arguments are selected for formula references. * * @remarks * [Api set: ExcelApi 1.10] * * @eventproperty */ readonly onSingleClicked: OfficeExtension.EventHandlers; /** * Occurs when the worksheet visibility is changed. * * @remarks * [Api set: ExcelApi 1.17] * * @eventproperty */ readonly onVisibilityChanged: OfficeExtension.EventHandlers; /** * 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.Worksheet object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.WorksheetData; } /** * Represents a collection of worksheet objects that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ class WorksheetCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Worksheet[]; /** * Adds a new worksheet to the workbook. The worksheet will be added at the end of existing worksheets. If you wish to activate the newly added worksheet, call `.activate()` on it. * * @remarks * [Api set: ExcelApi 1.1] * * @param name Optional. The name of the worksheet to be added. If specified, the name should be unique. If not specified, Excel determines the name of the new worksheet. */ add(name?: string): Excel.Worksheet; /** * Gets the currently active worksheet in the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ getActiveWorksheet(): Excel.Worksheet; /** * Gets the number of worksheets in the collection. * * @remarks * [Api set: ExcelApi 1.4] * * @param visibleOnly Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. */ getCount(visibleOnly?: boolean): OfficeExtension.ClientResult; /** * Gets the first worksheet in the collection. * * @remarks * [Api set: ExcelApi 1.5] * * @param visibleOnly Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. */ getFirst(visibleOnly?: boolean): Excel.Worksheet; /** * Gets a worksheet object using its name or ID. * * @remarks * [Api set: ExcelApi 1.1] * * @param key The name or ID of the worksheet. */ getItem(key: string): Excel.Worksheet; /** * Gets a worksheet object using its name or ID. If the worksheet does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param key The name or ID of the worksheet. */ getItemOrNullObject(key: string): Excel.Worksheet; /** * Gets the last worksheet in the collection. * * @remarks * [Api set: ExcelApi 1.5] * * @param visibleOnly Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. */ getLast(visibleOnly?: boolean): Excel.Worksheet; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorksheetCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.WorksheetCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.WorksheetCollection; /** * Occurs when any worksheet in the workbook is activated. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onActivated: OfficeExtension.EventHandlers; /** * Occurs when a new worksheet is added to the workbook. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onAdded: OfficeExtension.EventHandlers; /** * Occurs when any worksheet in the workbook is calculated. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onCalculated: OfficeExtension.EventHandlers; /** * Occurs when any worksheet in the workbook is changed. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; /** * Occurs when one or more columns have been sorted. This happens as the result of a left-to-right sort operation. * * @remarks * [Api set: ExcelApi 1.10] * * @eventproperty */ readonly onColumnSorted: OfficeExtension.EventHandlers; /** * Occurs when any worksheet in the workbook is deactivated. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onDeactivated: OfficeExtension.EventHandlers; /** * Occurs when a worksheet is deleted from the workbook. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onDeleted: OfficeExtension.EventHandlers; /** * Occurs when any worksheet in the workbook has a format changed. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onFormatChanged: OfficeExtension.EventHandlers; /** * Occurs when one or more formulas are changed in any worksheet of this collection. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. * * @remarks * [Api set: ExcelApi 1.13] * * @eventproperty */ readonly onFormulaChanged: OfficeExtension.EventHandlers; /** * Occurs when a worksheet is moved within a workbook. This event only triggers when a worksheet is directly moved within a workbook. This event doesn't trigger when the position of a worksheet is indirectly changed, such as when a new worksheet is inserted and causes existing worksheets to change positions. * * @remarks * [Api set: ExcelApi 1.17] * * @eventproperty */ readonly onMoved: OfficeExtension.EventHandlers; /** * Occurs when the worksheet name is changed in the worksheet collection. * * @remarks * [Api set: ExcelApi 1.17] * * @eventproperty */ readonly onNameChanged: OfficeExtension.EventHandlers; /** * Occurs when the worksheet protection state is changed. * * @remarks * [Api set: ExcelApi 1.14] * * @eventproperty */ readonly onProtectionChanged: OfficeExtension.EventHandlers; /** * Occurs when the hidden state of one or more rows has changed on a specific worksheet. * * @remarks * [Api set: ExcelApi 1.11] * * @eventproperty */ readonly onRowHiddenChanged: OfficeExtension.EventHandlers; /** * Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. * * @remarks * [Api set: ExcelApi 1.10] * * @eventproperty */ readonly onRowSorted: OfficeExtension.EventHandlers; /** * Occurs when the selection changes on any worksheet. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * Occurs when left-clicked/tapped operation happens in the worksheet collection. This event will not be fired when clicking in the following cases: - The user drags the mouse for multi-selection. - The user selects a cell in the mode when cell arguments are selected for formula references. * * @remarks * [Api set: ExcelApi 1.10] * * @eventproperty */ readonly onSingleClicked: OfficeExtension.EventHandlers; /** * Occurs when the worksheet visibility is changed in the worksheet collection. * * @remarks * [Api set: ExcelApi 1.17] * * @eventproperty */ readonly onVisibilityChanged: OfficeExtension.EventHandlers; /** * 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.WorksheetCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.WorksheetCollectionData; } /** * Represents the protection of a worksheet object. * * @remarks * [Api set: ExcelApi 1.2] */ class WorksheetProtection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the `AllowEditRangeCollection` object found in this worksheet. This is a collection of `AllowEditRange` objects, which work with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly allowEditRanges: Excel.AllowEditRangeCollection; /** * Specifies if protection can be paused for this worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly canPauseProtection: boolean; /** * Specifies if the sheet is password protected. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly isPasswordProtected: boolean; /** * Specifies if worksheet protection is paused. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly isPaused: boolean; /** * Specifies the protection options for the worksheet. * * @remarks * [Api set: ExcelApi 1.2] */ readonly options: Excel.WorksheetProtectionOptions; /** * Specifies if the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.2] */ readonly protected: boolean; /** * Specifies the protection options saved in the worksheet. This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. * * @remarks * [Api set: ExcelApiOnline 1.1] */ readonly savedOptions: Excel.WorksheetProtectionOptions; /** * Specifies if the password can be used to unlock worksheet protection. This method doesn't change the worksheet protection state. If a password is entered but no password is required to unlock worksheet protection, this method will return false. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param password The password to check against the protected worksheet. * @returns Returns `true` if the password can be used to unlock worksheet protection. Otherwise, returns `false`. */ checkPassword(password?: string): OfficeExtension.ClientResult; /** * Pauses worksheet protection for the given worksheet object for the user in the current session. This method does nothing if worksheet protection isn't enabled or is already paused. If the password is incorrect, then this method throws an `InvalidArgument` error and fails to pause protection. This method does not change the protection state if worksheet protection is not enabled or already paused. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param password The password associated with the protected worksheet. */ pauseProtection(password?: string): void; /** * Protects a worksheet. Fails if the worksheet has already been protected. * * @remarks * [Api set: ExcelApi 1.2 for options; 1.7 for password] * * @param options Optional. Sheet protection options. * @param password Optional. Sheet protection password. */ protect(options?: Excel.WorksheetProtectionOptions, password?: string): void; /** * Resumes worksheet protection for the given worksheet object for the user in a given session. Worksheet protection must be paused for this method to work. If worksheet protection is not paused, then this method will not change the protection state of the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ resumeProtection(): void; /** * Changes the password associated with the `WorksheetProtection` object. Setting the password as an empty string ("") or as `null` will remove password protection from the `WorksheetProtection` object. Worksheet protection must be enabled and paused for this method to work properly. If worksheet protection is disabled, this method throws an `InvalidOperation` error and fails to change the password. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the password. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param password The password associated with the `WorksheetProtection` object. */ setPassword(password?: string): void; /** * Unprotects a worksheet. * * @remarks * [Api set: ExcelApi 1.7 for password] * * @param password Sheet protection password. */ unprotect(password?: string): void; /** * Change the worksheet protection options associated with the `WorksheetProtection` object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the worksheet protection options. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param options The options interface associated with the `WorksheetProtection` object. */ updateOptions(options: Excel.WorksheetProtectionOptions): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorksheetProtectionLoadOptions): Excel.WorksheetProtection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.WorksheetProtection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.WorksheetProtection; /** * 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.WorksheetProtection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetProtectionData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.WorksheetProtectionData; } /** * Represents the options in sheet protection. * * @remarks * [Api set: ExcelApi 1.2] */ interface WorksheetProtectionOptions { /** * Represents the worksheet protection option allowing use of the AutoFilter feature. * * @remarks * [Api set: ExcelApi 1.2] */ allowAutoFilter?: boolean; /** * Represents the worksheet protection option allowing deleting of columns. * * @remarks * [Api set: ExcelApi 1.2] */ allowDeleteColumns?: boolean; /** * Represents the worksheet protection option allowing deleting of rows. * * @remarks * [Api set: ExcelApi 1.2] */ allowDeleteRows?: boolean; /** * Represents the worksheet protection option allowing editing of objects. * * @remarks * [Api set: ExcelApi 1.7] */ allowEditObjects?: boolean; /** * Represents the worksheet protection option allowing editing of scenarios. * * @remarks * [Api set: ExcelApi 1.7] */ allowEditScenarios?: boolean; /** * Represents the worksheet protection option allowing formatting of cells. * * @remarks * [Api set: ExcelApi 1.2] */ allowFormatCells?: boolean; /** * Represents the worksheet protection option allowing formatting of columns. * * @remarks * [Api set: ExcelApi 1.2] */ allowFormatColumns?: boolean; /** * Represents the worksheet protection option allowing formatting of rows. * * @remarks * [Api set: ExcelApi 1.2] */ allowFormatRows?: boolean; /** * Represents the worksheet protection option allowing inserting of columns. * * @remarks * [Api set: ExcelApi 1.2] */ allowInsertColumns?: boolean; /** * Represents the worksheet protection option allowing inserting of hyperlinks. * * @remarks * [Api set: ExcelApi 1.2] */ allowInsertHyperlinks?: boolean; /** * Represents the worksheet protection option allowing inserting of rows. * * @remarks * [Api set: ExcelApi 1.2] */ allowInsertRows?: boolean; /** * Represents the worksheet protection option allowing use of the PivotTable feature. * * @remarks * [Api set: ExcelApi 1.2] */ allowPivotTables?: boolean; /** * Represents the worksheet protection option allowing use of the sort feature. * * @remarks * [Api set: ExcelApi 1.2] */ allowSort?: boolean; /** * Represents the worksheet protection option of selection mode. * * @remarks * [Api set: ExcelApi 1.7] */ selectionMode?: Excel.ProtectionSelectionMode | "Normal" | "Unlocked" | "None"; } /** * @remarks * [Api set: ExcelApi 1.7] */ class WorksheetFreezePanes extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Sets the frozen cells in the active worksheet view. The range provided corresponds to cells that will be frozen in the top- and left-most pane. * * @remarks * [Api set: ExcelApi 1.7] * * @param frozenRange A range that represents the cells to be frozen, or `null` to remove all frozen panes. */ freezeAt(frozenRange: Range | string): void; /** * Freeze the first column or columns of the worksheet in place. * * @remarks * [Api set: ExcelApi 1.7] * * @param count Optional number of columns to freeze, or zero to unfreeze all columns */ freezeColumns(count?: number): void; /** * Freeze the top row or rows of the worksheet in place. * * @remarks * [Api set: ExcelApi 1.7] * * @param count Optional number of rows to freeze, or zero to unfreeze all rows */ freezeRows(count?: number): void; /** * Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane. * * @remarks * [Api set: ExcelApi 1.7] */ getLocation(): Excel.Range; /** * Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane. If there is no frozen pane, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.7] */ getLocationOrNullObject(): Excel.Range; /** * Removes all frozen panes in the worksheet. * * @remarks * [Api set: ExcelApi 1.7] */ unfreeze(): void; /** * 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.WorksheetFreezePanes object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetFreezePanesData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): { [key: string]: string; }; } /** * The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. * * @remarks * [Api set: ExcelApi 1.13] */ interface InsertWorksheetOptions { /** * The insert position, in the current workbook, of the new worksheets. See `Excel.WorksheetPositionType` for details. The default position is "End". * * @remarks * [Api set: ExcelApi 1.13] */ positionType?: Excel.WorksheetPositionType | "None" | "Before" | "After" | "Beginning" | "End"; /** * The worksheet in the current workbook that is referenced for the `WorksheetPositionType` parameter. The default is `null`. If the `relativeTo` parameter is not set, worksheets will be inserted based on `positionType`, at the start or end of the current workbook. * * @remarks * [Api set: ExcelApi 1.13] */ relativeTo?: Worksheet | string; /** * The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. * * @remarks * [Api set: ExcelApi 1.13] */ sheetNamesToInsert?: string[]; } /** * Range represents a set of one or more contiguous cells such as a cell, a row, a column, or a block of cells. To learn more about how ranges are used throughout the API, start with {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-core-concepts#ranges | Ranges in the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ class Range extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The collection of `ConditionalFormats` that intersect the range. * * @remarks * [Api set: ExcelApi 1.6] */ readonly conditionalFormats: Excel.ConditionalFormatCollection; /** * Returns a data validation object. * * @remarks * [Api set: ExcelApi 1.8] */ readonly dataValidation: Excel.DataValidation; /** * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.RangeFormat; /** * Represents the range sort of the current range. * * @remarks * [Api set: ExcelApi 1.2] */ readonly sort: Excel.RangeSort; /** * The worksheet containing the current range. * * @remarks * [Api set: ExcelApi 1.1] */ readonly worksheet: Excel.Worksheet; /** * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). * * @remarks * [Api set: ExcelApi 1.1] */ readonly address: string; /** * Represents the range reference for the specified range in the language of the user. * * @remarks * [Api set: ExcelApi 1.1] */ readonly addressLocal: string; /** * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.1] */ readonly cellCount: number; /** * Specifies the total number of columns in the range. * * @remarks * [Api set: ExcelApi 1.1] */ readonly columnCount: number; /** * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ columnHidden: boolean; /** * Specifies the column number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ readonly columnIndex: number; /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulas: any[][]; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulasLocal: any[][]; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.2] */ formulasR1C1: any[][]; /** * Represents if all cells have a spill border. Returns `true` if all cells have a spill border, or `false` if all cells do not have a spill border. Returns `null` if there are cells both with and without spill borders within the range. * * @remarks * [Api set: ExcelApi 1.12] */ readonly hasSpill: boolean; /** * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ readonly height: number; /** * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ readonly hidden: boolean; /** * Represents the hyperlink for the current range. * * @remarks * [Api set: ExcelApi 1.7] */ hyperlink: Excel.RangeHyperlink; /** * Represents if the current range is an entire column. * * @remarks * [Api set: ExcelApi 1.7] */ readonly isEntireColumn: boolean; /** * Represents if the current range is an entire row. * * @remarks * [Api set: ExcelApi 1.7] */ readonly isEntireRow: boolean; /** * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ readonly left: number; /** * Represents the data type state of each cell. * * @remarks * [Api set: ExcelApi 1.9] */ readonly linkedDataTypeState: Excel.LinkedDataTypeState[][]; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. * * @remarks * [Api set: ExcelApi 1.1] */ numberFormat: any[][]; /** * Represents the category of number format of each cell. * * @remarks * [Api set: ExcelApi 1.12] */ readonly numberFormatCategories: Excel.NumberFormatCategory[][]; /** * Represents Excel's number format code for the given range, based on the language settings of the user. Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. Any returned text uses the locally-formatted strings based on the language specified in the system settings. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal: any[][]; /** * Returns the total number of rows in the range. * * @remarks * [Api set: ExcelApi 1.1] */ readonly rowCount: number; /** * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ rowHidden: boolean; /** * Returns the row number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ readonly rowIndex: number; /** * Represents if all the cells would be saved as an array formula. Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. Returns `null` if some cells would be saved as an array formula and some would not be. * * @remarks * [Api set: ExcelApi 1.12] */ readonly savedAsArray: boolean; /** * Represents the style of the current range. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ style: string; /** * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.1] */ readonly text: string[][]; /** * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ readonly top: number; /** * Specifies the type of data in each cell. * * @remarks * [Api set: ExcelApi 1.1] */ readonly valueTypes: Excel.RangeValueType[][]; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values: any[][]; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson: CellValue[][]; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal: CellValue[][]; /** * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Range): void; /** * Fills a range from the current range to the destination range using the specified AutoFill logic. The destination range can be `null` or can extend the source range either horizontally or vertically. Discontiguous ranges are not supported. For more information, see {@link https://support.microsoft.com/office/2e79a709-c814-4b27-8bc2-c4dc84d49464 | Use AutoFill and Flash Fill}. * * @remarks * [Api set: ExcelApi 1.9, ExcelApi Preview for null `destinationRange`] * * @param destinationRange The destination range to AutoFill. If the destination range is `null`, data is filled out based on the surrounding cells (which is the behavior when double-clicking the UI's range fill handle). * @param autoFillType The type of AutoFill. Specifies how the destination range is to be filled, based on the contents of the current range. Default is "FillDefault". */ autoFill(destinationRange?: Range | string, autoFillType?: Excel.AutoFillType): void; /** * Fills a range from the current range to the destination range using the specified AutoFill logic. The destination range can be `null` or can extend the source range either horizontally or vertically. Discontiguous ranges are not supported. For more information, see {@link https://support.microsoft.com/office/2e79a709-c814-4b27-8bc2-c4dc84d49464 | Use AutoFill and Flash Fill}. * * @remarks * [Api set: ExcelApi 1.9, ExcelApi Preview for null `destinationRange`] * * @param destinationRange The destination range to AutoFill. If the destination range is `null`, data is filled out based on the surrounding cells (which is the behavior when double-clicking the UI's range fill handle). * @param autoFillType The type of AutoFill. Specifies how the destination range is to be filled, based on the contents of the current range. Default is "FillDefault". */ autoFill(destinationRange?: Range | string, autoFillType?: "FillDefault" | "FillCopy" | "FillSeries" | "FillFormats" | "FillValues" | "FillDays" | "FillWeekdays" | "FillMonths" | "FillYears" | "LinearTrend" | "GrowthTrend" | "FlashFill"): void; /** * Calculates a range of cells on a worksheet. * * @remarks * [Api set: ExcelApi 1.6] */ calculate(): void; /** * Clear range values, format, fill, border, etc. * * @remarks * [Api set: ExcelApi 1.1] * * @param applyTo Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. */ clear(applyTo?: Excel.ClearApplyTo): void; /** * Clear range values, format, fill, border, etc. * * @remarks * [Api set: ExcelApi 1.1] * * @param applyTo Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. */ clear(applyTo?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"): void; /** * Converts the range cells with data types into text. * * @remarks * [Api set: ExcelApi 1.9] */ convertDataTypeToText(): void; /** * Converts the range cells into linked data types in the worksheet. * * @remarks * [Api set: ExcelApi 1.9] * * @param serviceID The service ID which will be used to query the data. * @param languageCulture Language culture to query the service for. */ convertToLinkedDataType(serviceID: number, languageCulture: string): void; /** * Copies cell data or formatting from the source range or `RangeAreas` to the current range. The destination range can be a different size than the source range or `RangeAreas`. The destination is expanded automatically if it's smaller than the source. Note: Like the copy functionality in the Excel UI, if the destination range is an exact multiple greater than the source range in either rows or columns, then the source content is replicated multiple times. For example, a 2x2 range copy into a 2x6 range will result in 3 copies of the original 2x2 range. * * @remarks * [Api set: ExcelApi 1.9] * * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must be able to be created by removing full rows or columns from a rectangular range. * @param copyType The type of cell data or formatting to copy over. Default is "All". * @param skipBlanks True if to skip blank cells in the source range. Default is false. * @param transpose True if to transpose the cells in the destination range. Default is false. */ copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean): void; /** * Copies cell data or formatting from the source range or `RangeAreas` to the current range. The destination range can be a different size than the source range or `RangeAreas`. The destination is expanded automatically if it's smaller than the source. Note: Like the copy functionality in the Excel UI, if the destination range is an exact multiple greater than the source range in either rows or columns, then the source content is replicated multiple times. For example, a 2x2 range copy into a 2x6 range will result in 3 copies of the original 2x2 range. * * @remarks * [Api set: ExcelApi 1.9] * * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must be able to be created by removing full rows or columns from a rectangular range. * @param copyType The type of cell data or formatting to copy over. Default is "All". * @param skipBlanks True if to skip blank cells in the source range. Default is false. * @param transpose True if to transpose the cells in the destination range. Default is false. */ copyFrom(sourceRange: Range | RangeAreas | string, copyType?: "All" | "Formulas" | "Values" | "Formats" | "Link", skipBlanks?: boolean, transpose?: boolean): void; /** * Deletes the cells associated with the range. * * @remarks * [Api set: ExcelApi 1.1] * * @param shift Specifies which way to shift the cells. See `Excel.DeleteShiftDirection` for details. */ delete(shift: Excel.DeleteShiftDirection): void; /** * Deletes the cells associated with the range. * * @remarks * [Api set: ExcelApi 1.1] * * @param shift Specifies which way to shift the cells. See `Excel.DeleteShiftDirection` for details. */ delete(shift: "Up" | "Left"): void; /** * Finds the given string based on the criteria specified. If the current range is larger than a single cell, then the search will be limited to that range, else the search will cover the entire sheet starting after that cell. * * @remarks * [Api set: ExcelApi 1.9] * * @param text The string to find. * @param criteria Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. * @returns The `Range` object representing the first cell that contains a value matching the search text and criteria. */ find(text: string, criteria: Excel.SearchCriteria): Excel.Range; /** * Finds the given string based on the criteria specified. If the current range is larger than a single cell, then the search will be limited to that range, else the search will cover the entire sheet starting after that cell. If there are no matches, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] * * @param text The string to find. * @param criteria Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. * @returns The `Range` which matched the search criteria. */ findOrNullObject(text: string, criteria: Excel.SearchCriteria): Excel.Range; /** * Does a Flash Fill to the current range. Flash Fill automatically fills data when it senses a pattern, so the range must be a single column range and have data around it in order to find a pattern. * * @remarks * [Api set: ExcelApi 1.9] */ flashFill(): void; /** * Gets a `Range` object with the same top-left cell as the current `Range` object, but with the specified numbers of rows and columns. * * @remarks * [Api set: ExcelApi 1.7] * * @param numRows The number of rows of the new range size. * @param numColumns The number of columns of the new range size. */ getAbsoluteResizedRange(numRows: number, numColumns: number): Excel.Range; /** * Gets the smallest range object that encompasses the given ranges. For example, the `GetBoundingRect` of "B2:C5" and "D10:E15" is "B2:E15". * * @remarks * [Api set: ExcelApi 1.1] * * @param anotherRange The range object, address, or range name. */ getBoundingRect(anotherRange: Range | string): Excel.Range; /** * Gets the range object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it stays within the worksheet grid. The returned cell is located relative to the top left cell of the range. * * @remarks * [Api set: ExcelApi 1.1] * * @param row Row number of the cell to be retrieved. Zero-indexed. * @param column Column number of the cell to be retrieved. Zero-indexed. */ getCell(row: number, column: number): Excel.Range; /** * Returns a 2D array, encapsulating the data for each cell's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellPropertiesLoadOptions An object that represents which cell properties to load. * @returns A 2D array where each item represents the requested properties of the corresponding cell. */ getCellProperties(cellPropertiesLoadOptions: CellPropertiesLoadOptions): OfficeExtension.ClientResult; /** * Gets a column contained in the range. * * @remarks * [Api set: ExcelApi 1.1] * * @param column Column number of the range to be retrieved. Zero-indexed. */ getColumn(column: number): Excel.Range; /** * Returns a single-dimensional array, encapsulating the data for each column's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given column, null will be returned. * * @remarks * [Api set: ExcelApi 1.9] * * @param columnPropertiesLoadOptions An object that represents which column properties to load. * @returns An array where each item represents the requested properties of the corresponding column. */ getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions): OfficeExtension.ClientResult; /** * Gets a certain number of columns to the right of the current `Range` object. * * @remarks * [Api set: ExcelApi 1.2] * * @param count Optional. The number of columns to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. */ getColumnsAfter(count?: number): Excel.Range; /** * Gets a certain number of columns to the left of the current `Range` object. * * @remarks * [Api set: ExcelApi 1.2] * * @param count Optional. The number of columns to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. */ getColumnsBefore(count?: number): Excel.Range; /** * Returns a `WorkbookRangeAreas` object that represents the range containing all the dependent cells of a specified range in the same worksheet or across multiple worksheets. * * @remarks * [Api set: ExcelApi 1.15] */ getDependents(): Excel.WorkbookRangeAreas; /** * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct dependent cells of a specified range in the same worksheet or across multiple worksheets. * * @remarks * [Api set: ExcelApi 1.13] */ getDirectDependents(): Excel.WorkbookRangeAreas; /** * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct precedent cells of a specified range in the same worksheet or across multiple worksheets. * * @remarks * [Api set: ExcelApi 1.12] */ getDirectPrecedents(): Excel.WorkbookRangeAreas; /** * Gets an object that represents the entire column of the range (for example, if the current range represents cells "B4:E11", its `getEntireColumn` is a range that represents columns "B:E"). * * @remarks * [Api set: ExcelApi 1.1] */ getEntireColumn(): Excel.Range; /** * Gets an object that represents the entire row of the range (for example, if the current range represents cells "B4:E11", its `GetEntireRow` is a range that represents rows "4:11"). * * @remarks * [Api set: ExcelApi 1.1] */ getEntireRow(): Excel.Range; /** * Returns a range object that includes the current range and up to the edge of the range, based on the provided direction. This matches the Ctrl+Shift+Arrow key behavior in the Excel on Windows UI. * * @remarks * [Api set: ExcelApi 1.13] * * @param direction The direction from the active cell. * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. */ getExtendedRange(direction: Excel.KeyboardDirection, activeCell?: Range | string): Excel.Range; /** * Returns a range object that includes the current range and up to the edge of the range, based on the provided direction. This matches the Ctrl+Shift+Arrow key behavior in the Excel on Windows UI. * * @remarks * [Api set: ExcelApi 1.13] * * @param direction The direction from the active cell. * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. */ getExtendedRange(direction: "Left" | "Right" | "Up" | "Down", activeCell?: Range | string): Excel.Range; /** * Renders the range as a base64-encoded png image. **Important**: This API is currently unsupported in Excel for Mac. Visit {@link https://github.com/OfficeDev/office-js/issues/235 | OfficeDev/office-js Issue #235} for the current status. * * @remarks * [Api set: ExcelApi 1.7] */ getImage(): OfficeExtension.ClientResult; /** * Gets the range object that represents the rectangular intersection of the given ranges. * * @remarks * [Api set: ExcelApi 1.1] * * @param anotherRange The range object or range address that will be used to determine the intersection of ranges. */ getIntersection(anotherRange: Range | string): Excel.Range; /** * Gets the range object that represents the rectangular intersection of the given ranges. If no intersection is found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param anotherRange The range object or range address that will be used to determine the intersection of ranges. */ getIntersectionOrNullObject(anotherRange: Range | string): Excel.Range; /** * Gets the last cell within the range. For example, the last cell of "B2:D5" is "D5". * * @remarks * [Api set: ExcelApi 1.1] */ getLastCell(): Excel.Range; /** * Gets the last column within the range. For example, the last column of "B2:D5" is "D2:D5". * * @remarks * [Api set: ExcelApi 1.1] */ getLastColumn(): Excel.Range; /** * Gets the last row within the range. For example, the last row of "B2:D5" is "B5:D5". * * @remarks * [Api set: ExcelApi 1.1] */ getLastRow(): Excel.Range; /** * Returns a `RangeAreas` object that represents the merged areas in this range. Note that if the merged areas count in this range is more than 512, then this method will fail to return the result. If the `RangeAreas` object doesn't exist, then this function will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.13] */ getMergedAreasOrNullObject(): Excel.RangeAreas; /** * Gets an object which represents a range that's offset from the specified range. The dimension of the returned range will match this range. If the resulting range is forced outside the bounds of the worksheet grid, an error will be thrown. * * @remarks * [Api set: ExcelApi 1.1] * * @param rowOffset The number of rows (positive, negative, or 0) by which the range is to be offset. Positive values are offset downward, and negative values are offset upward. * @param columnOffset The number of columns (positive, negative, or 0) by which the range is to be offset. Positive values are offset to the right, and negative values are offset to the left. */ getOffsetRange(rowOffset: number, columnOffset: number): Excel.Range; /** * Gets a scoped collection of PivotTables that overlap with the range. * * @remarks * [Api set: ExcelApi 1.12] * * @param fullyContained If `true`, returns only PivotTables that are fully contained within the range bounds. The default value is `false`. * @returns */ getPivotTables(fullyContained?: boolean): Excel.PivotTableScopedCollection; /** * Returns a `WorkbookRangeAreas` object that represents the range containing all the precedent cells of a specified range in the same worksheet or across multiple worksheets. * * @remarks * [Api set: ExcelApi 1.14] */ getPrecedents(): Excel.WorkbookRangeAreas; /** * Returns a range object that is the edge cell of the data region that corresponds to the provided direction. This matches the Ctrl+Arrow key behavior in the Excel on Windows UI. * * @remarks * [Api set: ExcelApi 1.13] * * @param direction The direction from the active cell. * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. */ getRangeEdge(direction: Excel.KeyboardDirection, activeCell?: Range | string): Excel.Range; /** * Returns a range object that is the edge cell of the data region that corresponds to the provided direction. This matches the Ctrl+Arrow key behavior in the Excel on Windows UI. * * @remarks * [Api set: ExcelApi 1.13] * * @param direction The direction from the active cell. * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. */ getRangeEdge(direction: "Left" | "Right" | "Up" | "Down", activeCell?: Range | string): Excel.Range; /** * Gets a `Range` object similar to the current `Range` object, but with its bottom-right corner expanded (or contracted) by some number of rows and columns. * * @remarks * [Api set: ExcelApi 1.2] * * @param deltaRows The number of rows by which to expand the bottom-right corner, relative to the current range. Use a positive number to expand the range, or a negative number to decrease it. * @param deltaColumns The number of columns by which to expand the bottom-right corner, relative to the current range. Use a positive number to expand the range, or a negative number to decrease it. */ getResizedRange(deltaRows: number, deltaColumns: number): Excel.Range; /** * Gets a row contained in the range. * * @remarks * [Api set: ExcelApi 1.1] * * @param row Row number of the range to be retrieved. Zero-indexed. */ getRow(row: number): Excel.Range; /** * Returns a single-dimensional array, encapsulating the data for each row's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given row, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.9] * * @param rowPropertiesLoadOptions An object that represents which row properties to load. * @returns An array where each item represents the requested properties of the corresponding row. */ getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions): OfficeExtension.ClientResult; /** * Gets a certain number of rows above the current `Range` object. * * @remarks * [Api set: ExcelApi 1.2] * * @param count Optional. The number of rows to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. */ getRowsAbove(count?: number): Excel.Range; /** * Gets a certain number of rows below the current `Range` object. * * @remarks * [Api set: ExcelApi 1.2] * * @param count Optional. The number of rows to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. */ getRowsBelow(count?: number): Excel.Range; /** * Gets the `RangeAreas` object, comprising one or more rectangular ranges, that represents all the cells that match the specified type and value. If no special cells are found, an `ItemNotFound` error will be thrown. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; /** * Gets the `RangeAreas` object, comprising one or more rectangular ranges, that represents all the cells that match the specified type and value. If no special cells are found, an `ItemNotFound` error will be thrown. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCells(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; /** * Gets the `RangeAreas` object, comprising one or more ranges, that represents all the cells that match the specified type and value. If no special cells are found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; /** * Gets the `RangeAreas` object, comprising one or more ranges, that represents all the cells that match the specified type and value. If no special cells are found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCellsOrNullObject(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; /** * Gets the range object containing the anchor cell for a cell getting spilled into. Fails if applied to a range with more than one cell. * * @remarks * [Api set: ExcelApi 1.12] */ getSpillParent(): Excel.Range; /** * Gets the range object containing the anchor cell for the cell getting spilled into. If it's not a spilled cell, or more than one cell is given, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.12] */ getSpillParentOrNullObject(): Excel.Range; /** * Gets the range object containing the spill range when called on an anchor cell. Fails if applied to a range with more than one cell. * * @remarks * [Api set: ExcelApi 1.12] */ getSpillingToRange(): Excel.Range; /** * Gets the range object containing the spill range when called on an anchor cell. If the range isn't an anchor cell or the spill range can't be found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.12] */ getSpillingToRangeOrNullObject(): Excel.Range; /** * Returns a `Range` object that represents the surrounding region for the top-left cell in this range. A surrounding region is a range bounded by any combination of blank rows and blank columns relative to this range. * * @remarks * [Api set: ExcelApi 1.7] */ getSurroundingRegion(): Excel.Range; /** * Gets a scoped collection of tables that overlap with the range. * * @remarks * [Api set: ExcelApi 1.9] * * @param fullyContained If `true`, returns only tables that are fully contained within the range bounds. The default value is `false`. */ getTables(fullyContained?: boolean): Excel.TableScopedCollection; /** * Returns the used range of the given range object. If there are no used cells within the range, this function will throw an `ItemNotFound` error. * * @remarks * [Api set: ExcelApi 1.1] * * @param valuesOnly Considers only cells with values as used cells. [Api set: ExcelApi 1.2] */ getUsedRange(valuesOnly?: boolean): Excel.Range; /** * Returns the used range of the given range object. If there are no used cells within the range, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param valuesOnly Considers only cells with values as used cells. */ getUsedRangeOrNullObject(valuesOnly?: boolean): Excel.Range; /** * Represents the visible rows of the current range. * * @remarks * [Api set: ExcelApi 1.3] */ getVisibleView(): Excel.RangeView; /** * Groups columns and rows for an outline. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies how the range can be grouped by rows or columns. * An `InvalidArgument` error is thrown when the group option differs from the range's * `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" * or `range.isEntireColumn` is true and `groupOption` is "ByRows"). */ group(groupOption: Excel.GroupOption): void; /** * Groups columns and rows for an outline. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies how the range can be grouped by rows or columns. * An `InvalidArgument` error is thrown when the group option differs from the range's * `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" * or `range.isEntireColumn` is true and `groupOption` is "ByRows"). */ group(groupOption: "ByRows" | "ByColumns"): void; /** * Hides the details of the row or column group. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies whether to hide the details of grouped rows or grouped columns. */ hideGroupDetails(groupOption: Excel.GroupOption): void; /** * Hides the details of the row or column group. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies whether to hide the details of grouped rows or grouped columns. */ hideGroupDetails(groupOption: "ByRows" | "ByColumns"): void; /** * Inserts a cell or a range of cells into the worksheet in place of this range, and shifts the other cells to make space. Returns a new `Range` object at the now blank space. * * @remarks * [Api set: ExcelApi 1.1] * * @param shift Specifies which way to shift the cells. See `Excel.InsertShiftDirection` for details. */ insert(shift: Excel.InsertShiftDirection): Excel.Range; /** * Inserts a cell or a range of cells into the worksheet in place of this range, and shifts the other cells to make space. Returns a new `Range` object at the now blank space. * * @remarks * [Api set: ExcelApi 1.1] * * @param shift Specifies which way to shift the cells. See `Excel.InsertShiftDirection` for details. */ insert(shift: "Down" | "Right"): Excel.Range; /** * Merge the range cells into one region in the worksheet. * * @remarks * [Api set: ExcelApi 1.2] * * @param across Optional. Set `true` to merge cells in each row of the specified range as separate merged cells. The default value is `false`. */ merge(across?: boolean): void; /** * Moves cell values, formatting, and formulas from current range to the destination range, replacing the old information in those cells. The destination range will be expanded automatically if it is smaller than the current range. Any cells in the destination range that are outside of the original range's area are not changed. * * @remarks * [Api set: ExcelApi 1.11] * * @param destinationRange destinationRange Specifies the range to where the information in this range will be moved. */ moveTo(destinationRange: Range | string): void; /** * Removes duplicate values from the range specified by the columns. * * @remarks * [Api set: ExcelApi 1.9] * * @param columns The columns inside the range that may contain duplicates. At least one column needs to be specified. Zero-indexed. * @param includesHeader True if the input data contains header. Default is false. * @returns The resulting object that contains the number of rows removed and the number of remaining unique rows. */ removeDuplicates(columns: number[], includesHeader: boolean): Excel.RemoveDuplicatesResult; /** * Finds and replaces the given string based on the criteria specified within the current range. * * @remarks * [Api set: ExcelApi 1.9] * * @param text String to find. * @param replacement The string that replaces the original string. * @param criteria Additional replacement criteria. * @returns The number of replacements performed. */ replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult; /** * Selects the specified range in the Excel UI. * * @remarks * [Api set: ExcelApi 1.1] */ select(): void; /** * Updates the range based on a 2D array of cell properties, encapsulating things like font, fill, borders, and alignment. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellPropertiesData A 2D array that represents which properties to set in each cell. */ setCellProperties(cellPropertiesData: SettableCellProperties[][]): void; /** * Updates the range based on a single-dimensional array of column properties, encapsulating things like font, fill, borders, and alignment. * * @remarks * [Api set: ExcelApi 1.9] * * @param columnPropertiesData An array that represents which properties to set in each column. */ setColumnProperties(columnPropertiesData: SettableColumnProperties[]): void; /** * Set a range to be recalculated when the next recalculation occurs. * * @remarks * [Api set: ExcelApi 1.9] */ setDirty(): void; /** * Updates the range based on a single-dimensional array of row properties, encapsulating things like font, fill, borders, and alignment. * * @remarks * [Api set: ExcelApi 1.9] * * @param rowPropertiesData An array that represents which properties to set in each row. */ setRowProperties(rowPropertiesData: SettableRowProperties[]): void; /** * Displays the card for an active cell if it has rich value content. * * @remarks * [Api set: ExcelApi 1.7] */ showCard(): void; /** * Shows the details of the row or column group. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies whether to show the details of grouped rows or grouped columns. */ showGroupDetails(groupOption: Excel.GroupOption): void; /** * Shows the details of the row or column group. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies whether to show the details of grouped rows or grouped columns. */ showGroupDetails(groupOption: "ByRows" | "ByColumns"): void; /** * Ungroups columns and rows for an outline. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies how the range can be ungrouped by rows or columns. */ ungroup(groupOption: Excel.GroupOption): void; /** * Ungroups columns and rows for an outline. * * @remarks * [Api set: ExcelApi 1.10] * * @param groupOption Specifies how the range can be ungrouped by rows or columns. */ ungroup(groupOption: "ByRows" | "ByColumns"): void; /** * Unmerge the range cells into separate cells. * * @remarks * [Api set: ExcelApi 1.2] */ unmerge(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeLoadOptions): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Range; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. */ track(): Excel.Range; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): Excel.Range; /** * 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.Range object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RangeData; } /** * Represents a string reference of the form "SheetName!A1:B5", or a global or local named range. * * @remarks * [Api set: ExcelApi 1.2] */ interface RangeReference { /** * The address of the range, for example "SheetName!A1:B5". * * @remarks * [Api set: ExcelApi 1.2] */ address: string; } /** * Represents the necessary strings to get/set a hyperlink (XHL) object. * * @remarks * [Api set: ExcelApi 1.7] */ interface RangeHyperlink { /** * Represents the URL target for the hyperlink. * * @remarks * [Api set: ExcelApi 1.7] */ address?: string; /** * Represents the document reference target for the hyperlink. * * @remarks * [Api set: ExcelApi 1.7] */ documentReference?: string; /** * Represents the string displayed when hovering over the hyperlink. * * @remarks * [Api set: ExcelApi 1.7] */ screenTip?: string; /** * Represents the string that is displayed in the top left most cell in the range. * * @remarks * [Api set: ExcelApi 1.7] */ textToDisplay?: string; } /** * `RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. To learn how to use discontiguous ranges, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges | Work with multiple ranges simultaneously in Excel add-ins}. * * @remarks * [Api set: ExcelApi 1.9] */ class RangeAreas extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a collection of rectangular ranges that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ readonly areas: Excel.RangeCollection; /** * Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ readonly conditionalFormats: Excel.ConditionalFormatCollection; /** * Returns a data validation object for all ranges in the `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ readonly dataValidation: Excel.DataValidation; /** * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ readonly format: Excel.RangeFormat; /** * Returns the worksheet for the current `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ readonly worksheet: Excel.Worksheet; /** * Returns the `RangeAreas` reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). * * @remarks * [Api set: ExcelApi 1.9] */ readonly address: string; /** * Returns the `RangeAreas` reference in the user locale. * * @remarks * [Api set: ExcelApi 1.9] */ readonly addressLocal: string; /** * Returns the number of rectangular ranges that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ readonly areaCount: number; /** * Returns the number of cells in the `RangeAreas` object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.9] */ readonly cellCount: number; /** * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). * * @remarks * [Api set: ExcelApi 1.9] */ readonly isEntireColumn: boolean; /** * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). * * @remarks * [Api set: ExcelApi 1.9] */ readonly isEntireRow: boolean; /** * Represents the style for all ranges in this `RangeAreas` object. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.9] */ style: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeAreasUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.RangeAreas): void; /** * Calculates all cells in the `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ calculate(): void; /** * Clears values, format, fill, border, and other properties on each of the areas that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] * * @param applyTo Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. Default is "All". */ clear(applyTo?: Excel.ClearApplyTo): void; /** * Clears values, format, fill, border, and other properties on each of the areas that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] * * @param applyTo Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. Default is "All". */ clear(applyTo?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"): void; /** * Converts all cells in the `RangeAreas` with data types into text. * * @remarks * [Api set: ExcelApi 1.9] */ convertDataTypeToText(): void; /** * Converts all cells in the `RangeAreas` into linked data types. * * @remarks * [Api set: ExcelApi 1.9] * * @param serviceID The service ID which will be used to query the data. * @param languageCulture Language culture to query the service for. */ convertToLinkedDataType(serviceID: number, languageCulture: string): void; /** * Copies cell data or formatting from the source range or `RangeAreas` to the current `RangeAreas`. The destination `RangeAreas` can be a different size than the source range or `RangeAreas`. The destination will be expanded automatically if it is smaller than the source. * * @remarks * [Api set: ExcelApi 1.9] * * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must able to be created by removing full rows or columns from a rectangular range. * @param copyType The type of cell data or formatting to copy over. Default is "All". * @param skipBlanks True if to skip blank cells in the source range or `RangeAreas`. Default is false. * @param transpose True if to transpose the cells in the destination `RangeAreas`. Default is false. */ copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean): void; /** * Copies cell data or formatting from the source range or `RangeAreas` to the current `RangeAreas`. The destination `RangeAreas` can be a different size than the source range or `RangeAreas`. The destination will be expanded automatically if it is smaller than the source. * * @remarks * [Api set: ExcelApi 1.9] * * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must able to be created by removing full rows or columns from a rectangular range. * @param copyType The type of cell data or formatting to copy over. Default is "All". * @param skipBlanks True if to skip blank cells in the source range or `RangeAreas`. Default is false. * @param transpose True if to transpose the cells in the destination `RangeAreas`. Default is false. */ copyFrom(sourceRange: Range | RangeAreas | string, copyType?: "All" | "Formulas" | "Values" | "Formats" | "Link", skipBlanks?: boolean, transpose?: boolean): void; /** * Returns a `RangeAreas` object that represents the entire columns of the `RangeAreas` (for example, if the current `RangeAreas` represents cells "B4:E11, H2", it returns a `RangeAreas` that represents columns "B:E, H:H"). * * @remarks * [Api set: ExcelApi 1.9] */ getEntireColumn(): Excel.RangeAreas; /** * Returns a `RangeAreas` object that represents the entire rows of the `RangeAreas` (for example, if the current `RangeAreas` represents cells "B4:E11", it returns a `RangeAreas` that represents rows "4:11"). * * @remarks * [Api set: ExcelApi 1.9] */ getEntireRow(): Excel.RangeAreas; /** * Returns the `RangeAreas` object that represents the intersection of the given ranges or `RangeAreas`. If no intersection is found, an `ItemNotFound` error will be thrown. * * @remarks * [Api set: ExcelApi 1.9] * * @param anotherRange The range, `RangeAreas` object, or range address that will be used to determine the intersection. */ getIntersection(anotherRange: Range | RangeAreas | string): Excel.RangeAreas; /** * Returns the `RangeAreas` object that represents the intersection of the given ranges or `RangeAreas`. If no intersection is found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] * * @param anotherRange The range, `RangeAreas` object, or address that will be used to determine the intersection. */ getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string): Excel.RangeAreas; /** * Returns a `RangeAreas` object that is shifted by the specific row and column offset. The dimension of the returned `RangeAreas` will match the original object. If the resulting `RangeAreas` is forced outside the bounds of the worksheet grid, an error will be thrown. * * @remarks * [Api set: ExcelApi 1.9] * * @param rowOffset The number of rows (positive, negative, or 0) by which the `RangeAreas` is to be offset. Positive values are offset downward, and negative values are offset upward. * @param columnOffset The number of columns (positive, negative, or 0) by which the `RangeAreas` is to be offset. Positive values are offset to the right, and negative values are offset to the left. */ getOffsetRangeAreas(rowOffset: number, columnOffset: number): Excel.RangeAreas; /** * Returns a `RangeAreas` object that represents all the cells that match the specified type and value. Throws an error if no special cells are found that match the criteria. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; /** * Returns a `RangeAreas` object that represents all the cells that match the specified type and value. Throws an error if no special cells are found that match the criteria. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCells(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; /** * Returns a `RangeAreas` object that represents all the cells that match the specified type and value. If no special cells are found that match the criteria, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; /** * Returns a `RangeAreas` object that represents all the cells that match the specified type and value. If no special cells are found that match the criteria, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] * * @param cellType The type of cells to include. * @param cellValueType If `cellType` is either `constants` or `formulas`, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. */ getSpecialCellsOrNullObject(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; /** * Returns a scoped collection of tables that overlap with any range in this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] * * @param fullyContained If `true`, returns only tables that are fully contained within the range bounds. Default is `false`. */ getTables(fullyContained?: boolean): Excel.TableScopedCollection; /** * Returns the used `RangeAreas` that comprises all the used areas of individual rectangular ranges in the `RangeAreas` object. If there are no used cells within the `RangeAreas`, the `ItemNotFound` error will be thrown. * * @remarks * [Api set: ExcelApi 1.9] * * @param valuesOnly Whether to only consider cells with values as used cells. Default is `false`. */ getUsedRangeAreas(valuesOnly?: boolean): Excel.RangeAreas; /** * Returns the used `RangeAreas` that comprises all the used areas of individual rectangular ranges in the `RangeAreas` object. If there are no used cells within the `RangeAreas`, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] * * @param valuesOnly Whether to only consider cells with values as used cells. */ getUsedRangeAreasOrNullObject(valuesOnly?: boolean): Excel.RangeAreas; /** * Sets the `RangeAreas` to be recalculated when the next recalculation occurs. * * @remarks * [Api set: ExcelApi 1.9] */ setDirty(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeAreasLoadOptions): Excel.RangeAreas; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeAreas; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RangeAreas; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. */ track(): Excel.RangeAreas; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): Excel.RangeAreas; /** * 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.RangeAreas object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeAreasData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RangeAreasData; } /** * Represents a collection of one or more rectangular ranges in multiple worksheets. * * @remarks * [Api set: ExcelApi 1.12] */ class WorkbookRangeAreas extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the `RangeAreasCollection` object. Each `RangeAreas` in the collection represent one or more rectangle ranges in one worksheet. * * @remarks * [Api set: ExcelApi 1.12] */ readonly areas: Excel.RangeAreasCollection; /** * Returns ranges that comprise this object in a `RangeCollection` object. * * @remarks * [Api set: ExcelApi 1.12] */ readonly ranges: Excel.RangeCollection; /** * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. * * @remarks * [Api set: ExcelApi 1.12] */ readonly addresses: string[]; /** * Returns the `RangeAreas` object based on worksheet ID or name in the collection. * * @remarks * [Api set: ExcelApi 1.12] * * @param key The name or ID of the worksheet. */ getRangeAreasBySheet(key: string): Excel.RangeAreas; /** * Returns the `RangeAreas` object based on worksheet name or ID in the collection. If the worksheet does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.12] * * @param key The name or ID of the worksheet. */ getRangeAreasOrNullObjectBySheet(key: string): Excel.RangeAreas; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorkbookRangeAreasLoadOptions): Excel.WorkbookRangeAreas; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.WorkbookRangeAreas; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.WorkbookRangeAreas; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. */ track(): Excel.WorkbookRangeAreas; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): Excel.WorkbookRangeAreas; /** * 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.WorkbookRangeAreas object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookRangeAreasData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.WorkbookRangeAreasData; } /** * Represents the search criteria to be used. * * @remarks * [Api set: ExcelApi 1.9] */ interface SearchCriteria { /** * Specifies if the match needs to be complete or partial. A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). Default is `false` (partial). * * @remarks * [Api set: ExcelApi 1.9] */ completeMatch?: boolean; /** * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). * * @remarks * [Api set: ExcelApi 1.9] */ matchCase?: boolean; /** * Specifies the search direction. Default is forward. See `Excel.SearchDirection`. * * @remarks * [Api set: ExcelApi 1.9] */ searchDirection?: Excel.SearchDirection | "Forward" | "Backwards"; } /** * Represents the worksheet search criteria to be used. * * @remarks * [Api set: ExcelApi 1.9] */ interface WorksheetSearchCriteria { /** * Specifies if the match needs to be complete or partial. A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). Default is `false` (partial). * * @remarks * [Api set: ExcelApi 1.9] */ completeMatch?: boolean; /** * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). * * @remarks * [Api set: ExcelApi 1.9] */ matchCase?: boolean; } /** * Represents the replace criteria to be used. * * @remarks * [Api set: ExcelApi 1.9] */ interface ReplaceCriteria { /** * Specifies if the match needs to be complete or partial. A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). Default is `false` (partial). * * @remarks * [Api set: ExcelApi 1.9] */ completeMatch?: boolean; /** * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). * * @remarks * [Api set: ExcelApi 1.9] */ matchCase?: boolean; } /** * Specifies which properties to load on the `format.fill` object. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellPropertiesFillLoadOptions { /** * Specifies whether to load the `color` property. * * @remarks * [Api set: ExcelApi 1.9] */ color?: boolean; /** * Specifies whether to load the `pattern` property. * * @remarks * [Api set: ExcelApi 1.9] */ pattern?: boolean; /** * Specifies whether to load the `patternColor` property. * * @remarks * [Api set: ExcelApi 1.9] */ patternColor?: boolean; /** * Specifies whether to load the `patternTintAndShade` property. * * @remarks * [Api set: ExcelApi 1.9] */ patternTintAndShade?: boolean; /** * Specifies whether to load the `tintAndShade` property. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: boolean; } /** * Specifies which properties to load on the `format.font` object. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellPropertiesFontLoadOptions { /** * Specifies whether to load the `bold` property. * * @remarks * [Api set: ExcelApi 1.9] */ bold?: boolean; /** * Specifies whether to load the `color` property. * * @remarks * [Api set: ExcelApi 1.9] */ color?: boolean; /** * Specifies whether to load the `italic` property. * * @remarks * [Api set: ExcelApi 1.9] */ italic?: boolean; /** * Specifies whether to load the `name` property. * * @remarks * [Api set: ExcelApi 1.9] */ name?: boolean; /** * Specifies whether to load the `size` property. * * @remarks * [Api set: ExcelApi 1.9] */ size?: boolean; /** * Specifies whether to load the `strikethrough` property. * * @remarks * [Api set: ExcelApi 1.9] */ strikethrough?: boolean; /** * Specifies whether to load the `subscript` property. * * @remarks * [Api set: ExcelApi 1.9] */ subscript?: boolean; /** * Specifies whether to load the `superscript` property. * * @remarks * [Api set: ExcelApi 1.9] */ superscript?: boolean; /** * Specifies whether to load the `tintAndShade` property. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: boolean; /** * Specifies whether to load the `underline` property. * * @remarks * [Api set: ExcelApi 1.9] */ underline?: boolean; } /** * Specifies which properties to load on the `format.borders` object. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellPropertiesBorderLoadOptions { /** * Specifies whether to load the `color` property. * * @remarks * [Api set: ExcelApi 1.9] */ color?: boolean; /** * Specifies whether to load the `style` property. * * @remarks * [Api set: ExcelApi 1.9] */ style?: boolean; /** * Specifies whether to load the `tintAndShade` property. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: boolean; /** * Specifies whether to load the `weight` property. * * @remarks * [Api set: ExcelApi 1.9] */ weight?: boolean; } /** * Represents the `format.protection` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.protection` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellPropertiesProtection { /** * Represents the `format.protection.formulaHidden` property. * * @remarks * [Api set: ExcelApi 1.9] */ formulaHidden?: boolean; /** * Represents the `format.protection.locked` property. * * @remarks * [Api set: ExcelApi 1.9] */ locked?: boolean; } /** * Represents the `format.fill` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.fill` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellPropertiesFill { /** * Represents the `format.fill.color` property. * * @remarks * [Api set: ExcelApi 1.9] */ color?: string; /** * Represents the `format.fill.pattern` property. * * @remarks * [Api set: ExcelApi 1.9] */ pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; /** * Represents the `format.fill.patternColor` property. * * @remarks * [Api set: ExcelApi 1.9] */ patternColor?: string; /** * Represents the `format.fill.patternTintAndShade` property. * * @remarks * [Api set: ExcelApi 1.9] */ patternTintAndShade?: number; /** * Represents the `format.fill.tintAndShade` property. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; } /** * Represents the `format.font` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.font` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellPropertiesFont { /** * Represents the `format.font.bold` property. * * @remarks * [Api set: ExcelApi 1.9] */ bold?: boolean; /** * Represents the `format.font.color` property. * * @remarks * [Api set: ExcelApi 1.9] */ color?: string; /** * Represents the `format.font.italic` property. * * @remarks * [Api set: ExcelApi 1.9] */ italic?: boolean; /** * Represents the `format.font.name` property. * * @remarks * [Api set: ExcelApi 1.9] */ name?: string; /** * Represents the `format.font.size` property. * * @remarks * [Api set: ExcelApi 1.9] */ size?: number; /** * Represents the `format.font.strikethrough` property. * * @remarks * [Api set: ExcelApi 1.9] */ strikethrough?: boolean; /** * Represents the `format.font.subscript` property. * * @remarks * [Api set: ExcelApi 1.9] */ subscript?: boolean; /** * Represents the `format.font.superscript` property. * * @remarks * [Api set: ExcelApi 1.9] */ superscript?: boolean; /** * Represents the `format.font.tintAndShade` property. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; /** * Represents the `format.font.underline` property. * * @remarks * [Api set: ExcelApi 1.9] */ underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; } /** * Represents the `format.borders` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.borders` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellBorderCollection { /** * Represents the `format.borders.bottom` property. * * @remarks * [Api set: ExcelApi 1.9] */ bottom?: Excel.CellBorder; /** * Represents the `format.borders.diagonalDown` property. * * @remarks * [Api set: ExcelApi 1.9] */ diagonalDown?: Excel.CellBorder; /** * Represents the `format.borders.diagonalUp` property. * * @remarks * [Api set: ExcelApi 1.9] */ diagonalUp?: Excel.CellBorder; /** * Represents the `format.borders.horizontal` property. * * @remarks * [Api set: ExcelApi 1.9] */ horizontal?: Excel.CellBorder; /** * Represents the `format.borders.left` property. * * @remarks * [Api set: ExcelApi 1.9] */ left?: Excel.CellBorder; /** * Represents the `format.borders.right` property. * * @remarks * [Api set: ExcelApi 1.9] */ right?: Excel.CellBorder; /** * Represents the `format.borders.top` property. * * @remarks * [Api set: ExcelApi 1.9] */ top?: Excel.CellBorder; /** * Represents the `format.borders.vertical` property. * * @remarks * [Api set: ExcelApi 1.9] */ vertical?: Excel.CellBorder; } /** * Represents the properties of a single border returned by `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the border property input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * @remarks * [Api set: ExcelApi 1.9] */ interface CellBorder { /** * Represents the `color` property of a single border. * * @remarks * [Api set: ExcelApi 1.9] */ color?: string; /** * Represents the `style` property of a single border. * * @remarks * [Api set: ExcelApi 1.9] */ style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; /** * Represents the `tintAndShade` property of a single border. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; /** * Represents the `weight` property of a single border. * * @remarks * [Api set: ExcelApi 1.9] */ weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; } /** * RangeView represents a set of visible cells of the parent range. * * @remarks * [Api set: ExcelApi 1.3] */ class RangeView extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents a collection of range views associated with the range. * * @remarks * [Api set: ExcelApi 1.3] */ readonly rows: Excel.RangeViewCollection; /** * Represents the cell addresses of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ readonly cellAddresses: any[][]; /** * The number of visible columns. * * @remarks * [Api set: ExcelApi 1.3] */ readonly columnCount: number; /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulas: any[][]; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasLocal: any[][]; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasR1C1: any[][]; /** * Returns a value that represents the index of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ readonly index: number; /** * Represents Excel's number format code for the given cell. * * @remarks * [Api set: ExcelApi 1.3] */ numberFormat: any[][]; /** * The number of visible rows. * * @remarks * [Api set: ExcelApi 1.3] */ readonly rowCount: number; /** * Text values of the specified range. The text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.3] */ readonly text: string[][]; /** * Represents the type of data of each cell. * * @remarks * [Api set: ExcelApi 1.3] */ readonly valueTypes: Excel.RangeValueType[][]; /** * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. * * @remarks * [Api set: ExcelApi 1.3] */ values: any[][]; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson: CellValue[][]; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal: CellValue[][]; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeViewUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.RangeView): void; /** * Gets the parent range associated with the current `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ getRange(): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeViewLoadOptions): Excel.RangeView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RangeView; /** * 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.RangeView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeViewData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RangeViewData; } /** * Represents a collection of `RangeView` objects. * * @remarks * [Api set: ExcelApi 1.3] */ class RangeViewCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.RangeView[]; /** * Gets the number of `RangeView` objects in the collection. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a `RangeView` row via its index. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.3] * * @param index Index of the visible row. */ getItemAt(index: number): Excel.RangeView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeViewCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeViewCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RangeViewCollection; /** * 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.RangeViewCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeViewCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.RangeViewCollectionData; } /** * Represents a collection of key-value pair setting objects that are part of the workbook. The scope is limited to per file and add-in (task-pane or content) combination. * * @remarks * [Api set: ExcelApi 1.4] */ class SettingCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Setting[]; /** * Sets or adds the specified setting to the workbook. * * @remarks * [Api set: ExcelApi 1.4] * * @param key The key of the new setting. * @param value The value for the new setting. */ add(key: string, value: string | number | boolean | Date | any[] | any): Excel.Setting; /** * Gets the number of settings in the collection. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a setting entry via the key. * * @remarks * [Api set: ExcelApi 1.4] * * @param key Key of the setting. */ getItem(key: string): Excel.Setting; /** * Gets a setting entry via the key. If the setting does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param key The key of the setting. */ getItemOrNullObject(key: string): Excel.Setting; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SettingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SettingCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.SettingCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SettingCollection; /** * Occurs when the settings in the document are changed. * * @remarks * [Api set: ExcelApi 1.4] * * @eventproperty */ readonly onSettingsChanged: OfficeExtension.EventHandlers; /** * 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.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.SettingCollectionData; } /** * Setting represents a key-value pair of a setting persisted to the document (per file, per add-in). These custom key-value pair can be used to store state or lifecycle information needed by the content or task-pane add-in. Note that settings are persisted in the document and hence it is not a place to store any sensitive or protected information such as user information and password. * * @remarks * [Api set: ExcelApi 1.4] */ class Setting extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The key that represents the ID of the setting. * * @remarks * [Api set: ExcelApi 1.4] */ readonly key: string; /** * Represents the value stored for this setting. * * @remarks * [Api set: ExcelApi 1.4] */ value: any; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Setting): void; /** * Deletes the setting. * * @remarks * [Api set: ExcelApi 1.4] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SettingLoadOptions): Excel.Setting; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Setting; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Setting; /** * 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.Setting object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.SettingData; } /** * A collection of all the `NamedItem` objects that are part of the workbook or worksheet, depending on how it was reached. * * @remarks * [Api set: ExcelApi 1.1] */ class NamedItemCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.NamedItem[]; /** * Adds a new name to the collection of the given scope. * * @remarks * [Api set: ExcelApi 1.4] * * @param name The name of the named item. * @param reference The formula or the range that the name will refer to. * @param comment Optional. The comment associated with the named item. * @returns */ add(name: string, reference: Range | string, comment?: string): Excel.NamedItem; /** * Adds a new name to the collection of the given scope using the user's locale for the formula. * * @remarks * [Api set: ExcelApi 1.4] * * @param name The name of the named item. * @param formula The formula in the user's locale that the name will refer to. * @param comment Optional. The comment associated with the named item. * @returns */ addFormulaLocal(name: string, formula: string, comment?: string): Excel.NamedItem; /** * Gets the number of named items in the collection. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a `NamedItem` object using its name. * * @remarks * [Api set: ExcelApi 1.1] * * @param name Nameditem name. */ getItem(name: string): Excel.NamedItem; /** * Gets a `NamedItem` object using its name. If the object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param name Nameditem name. */ getItemOrNullObject(name: string): Excel.NamedItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.NamedItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.NamedItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.NamedItemCollection; /** * 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.NamedItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.NamedItemCollectionData; } /** * Represents a defined name for a range of cells or value. Names can be primitive named objects (as seen in the type below), range object, or a reference to a range. This object can be used to obtain range object associated with names. * * @remarks * [Api set: ExcelApi 1.1] */ class NamedItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns an object containing values and types of the named item. * * @remarks * [Api set: ExcelApi 1.7] */ readonly arrayValues: Excel.NamedItemArrayValues; /** * Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. * * @remarks * [Api set: ExcelApi 1.4] */ readonly worksheet: Excel.Worksheet; /** * Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] */ readonly worksheetOrNullObject: Excel.Worksheet; /** * Specifies the comment associated with this name. * * @remarks * [Api set: ExcelApi 1.4] */ comment: string; /** * The formula of the named item. Formulas always start with an equal sign ("="). * * @remarks * [Api set: ExcelApi 1.7] */ formula: any; /** * The name of the object. * * @remarks * [Api set: ExcelApi 1.1] */ readonly name: string; /** * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. * * @remarks * [Api set: ExcelApi 1.4] */ readonly scope: Excel.NamedItemScope | "Worksheet" | "Workbook"; /** * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. * * @remarks * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ readonly type: Excel.NamedItemType | "String" | "Integer" | "Double" | "Boolean" | "Range" | "Error" | "Array"; /** * Represents the value computed by the name's formula. For a named range, it will return the range address. This API returns the #VALUE! error in the Excel UI if it refers to a user-defined function. * * @remarks * [Api set: ExcelApi 1.1] */ readonly value: any; /** * A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ readonly valueAsJson: CellValue | string; /** * A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ readonly valueAsJsonLocal: CellValue | string; /** * Specifies if the object is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.NamedItemUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.NamedItem): void; /** * Deletes the given name. * * @remarks * [Api set: ExcelApi 1.4] */ delete(): void; /** * Returns the range object that is associated with the name. Throws an error if the named item's type is not a range. * * @remarks * [Api set: ExcelApi 1.1] */ getRange(): Excel.Range; /** * Returns the range object that is associated with the name. If the named item's type is not a range, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] */ getRangeOrNullObject(): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.NamedItemLoadOptions): Excel.NamedItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.NamedItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.NamedItem; /** * 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.NamedItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedItemData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.NamedItemData; } /** * Represents an object containing values and types of a named item. * * @remarks * [Api set: ExcelApi 1.7] */ class NamedItemArrayValues extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the types for each item in the named item array * * @remarks * [Api set: ExcelApi 1.7] */ readonly types: Excel.RangeValueType[][]; /** * Represents the values of each item in the named item array. * * @remarks * [Api set: ExcelApi 1.7] */ readonly values: any[][]; /** * A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ readonly valuesAsJson: CellValue[][]; /** * A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ readonly valuesAsJsonLocal: CellValue[][]; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.NamedItemArrayValuesLoadOptions): Excel.NamedItemArrayValues; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.NamedItemArrayValues; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.NamedItemArrayValues; /** * 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.NamedItemArrayValues object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedItemArrayValuesData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.NamedItemArrayValuesData; } /** * Represents an Office.js binding that is defined in the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ class Binding extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the binding identifier. * * @remarks * [Api set: ExcelApi 1.1] */ readonly id: string; /** * Returns the type of the binding. See `Excel.BindingType` for details. * * @remarks * [Api set: ExcelApi 1.1] */ readonly type: Excel.BindingType | "Range" | "Table" | "Text"; /** * Deletes the binding. * * @remarks * [Api set: ExcelApi 1.3] */ delete(): void; /** * Returns the range represented by the binding. Will throw an error if the binding is not of the correct type. * * @remarks * [Api set: ExcelApi 1.1] */ getRange(): Excel.Range; /** * Returns the table represented by the binding. Will throw an error if the binding is not of the correct type. * * @remarks * [Api set: ExcelApi 1.1] */ getTable(): Excel.Table; /** * Returns the text represented by the binding. Will throw an error if the binding is not of the correct type. * * @remarks * [Api set: ExcelApi 1.1] */ getText(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.BindingLoadOptions): Excel.Binding; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Binding; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Binding; /** * Occurs when data or formatting within the binding is changed. * * @remarks * [Api set: ExcelApi 1.2] * * @eventproperty */ readonly onDataChanged: OfficeExtension.EventHandlers; /** * Occurs when the selected content in the binding is changed. **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. * * @remarks * [Api set: ExcelApi 1.2] * * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * 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.Binding object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.BindingData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.BindingData; } /** * Represents the collection of all the binding objects that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ class BindingCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Binding[]; /** * Returns the number of bindings in the collection. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Add a new binding to a particular Range. * * @remarks * [Api set: ExcelApi 1.3] * * @param range Range to bind the binding to. May be a `Range` object or a string. If string, must contain the full address, including the sheet name * @param bindingType Type of binding. See `Excel.BindingType`. * @param id Name of the binding. */ add(range: Range | string, bindingType: Excel.BindingType, id: string): Excel.Binding; /** * Add a new binding to a particular Range. * * @remarks * [Api set: ExcelApi 1.3] * * @param range Range to bind the binding to. May be a `Range` object or a string. If string, must contain the full address, including the sheet name * @param bindingType Type of binding. See `Excel.BindingType`. * @param id Name of the binding. */ add(range: Range | string, bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; /** * Add a new binding based on a named item in the workbook. If the named item references to multiple areas, the `InvalidReference` error will be returned. * * @remarks * [Api set: ExcelApi 1.3] * * @param name Name from which to create binding. * @param bindingType Type of binding. See `Excel.BindingType`. * @param id Name of the binding. */ addFromNamedItem(name: string, bindingType: Excel.BindingType, id: string): Excel.Binding; /** * Add a new binding based on a named item in the workbook. If the named item references to multiple areas, the `InvalidReference` error will be returned. * * @remarks * [Api set: ExcelApi 1.3] * * @param name Name from which to create binding. * @param bindingType Type of binding. See `Excel.BindingType`. * @param id Name of the binding. */ addFromNamedItem(name: string, bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; /** * Add a new binding based on the current selection. If the selection has multiple areas, the `InvalidReference` error will be returned. * * @remarks * [Api set: ExcelApi 1.3] * * @param bindingType Type of binding. See `Excel.BindingType`. * @param id Name of the binding. */ addFromSelection(bindingType: Excel.BindingType, id: string): Excel.Binding; /** * Add a new binding based on the current selection. If the selection has multiple areas, the `InvalidReference` error will be returned. * * @remarks * [Api set: ExcelApi 1.3] * * @param bindingType Type of binding. See `Excel.BindingType`. * @param id Name of the binding. */ addFromSelection(bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; /** * Gets the number of bindings in the collection. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a binding object by ID. * * @remarks * [Api set: ExcelApi 1.1] * * @param id ID of the binding object to be retrieved. */ getItem(id: string): Excel.Binding; /** * Gets a binding object based on its position in the items array. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Binding; /** * Gets a binding object by ID. If the binding object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param id ID of the binding object to be retrieved. */ getItemOrNullObject(id: string): Excel.Binding; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.BindingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.BindingCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.BindingCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.BindingCollection; /** * 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.BindingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.BindingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.BindingCollectionData; } /** * Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached. * * @remarks * [Api set: ExcelApi 1.1] */ class TableCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Table[]; /** * Returns the number of tables in the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Creates a new table. The range object or source address determines the worksheet under which the table will be added. If the table cannot be added (e.g., because the address is invalid, or the table would overlap with another table), an error will be thrown. * * @remarks * [Api set: ExcelApi 1.1] * * @param address A `Range` object, or a string address or name of the range representing the data source. If the address does not contain a sheet name, the currently-active sheet is used. [Api set: ExcelApi 1.1 / 1.3. Prior to ExcelApi 1.3, this parameter must be a string. Starting with Excel Api 1.3, this parameter may be a Range object or a string.] * @param hasHeaders A boolean value that indicates whether the data being imported has column labels. If the source does not contain headers (i.e., when this property set to `false`), Excel will automatically generate a header and shift the data down by one row. */ add(address: Range | string, hasHeaders: boolean): Excel.Table; /** * Gets the number of tables in the collection. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a table by name or ID. * * @remarks * [Api set: ExcelApi 1.1] * * @param key Name or ID of the table to be retrieved. */ getItem(key: string): Excel.Table; /** * Gets a table based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Table; /** * Gets a table by name or ID. If the table doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param key Name or ID of the table to be retrieved. */ getItemOrNullObject(key: string): Excel.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableCollection; /** * Occurs when a new table is added in a workbook. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onAdded: OfficeExtension.EventHandlers; /** * Occurs when data changes on any table in a workbook, or a worksheet. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; /** * Occurs when the specified table is deleted in a workbook. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onDeleted: OfficeExtension.EventHandlers; /** * 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.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.TableCollectionData; } /** * Represents a scoped collection of tables. For each table its top-left corner is considered its anchor location, and the tables are sorted top-to-bottom and then left-to-right. * * @remarks * [Api set: ExcelApi 1.9] */ class TableScopedCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Table[]; /** * Gets the number of tables in the collection. * * @remarks * [Api set: ExcelApi 1.9] */ getCount(): OfficeExtension.ClientResult; /** * Gets the first table in the collection. The tables in the collection are sorted top-to-bottom and left-to-right, such that top-left table is the first table in the collection. * * @remarks * [Api set: ExcelApi 1.9] */ getFirst(): Excel.Table; /** * Gets a table by name or ID. * * @remarks * [Api set: ExcelApi 1.9] * * @param key Name or ID of the table to be retrieved. */ getItem(key: string): Excel.Table; /** * Gets a table by name or ID. If the table object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] * * @param key Name or ID of the table to be retrieved. */ getItemOrNullObject(key: string): Excel.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableScopedCollection; /** * 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.TableScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.TableScopedCollectionData; } /** * Represents an Excel table. To learn more about the table object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | Work with tables using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ class Table extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the `AutoFilter` object of the table. * * @remarks * [Api set: ExcelApi 1.9] */ readonly autoFilter: Excel.AutoFilter; /** * Represents a collection of all the columns in the table. * * @remarks * [Api set: ExcelApi 1.1] */ readonly columns: Excel.TableColumnCollection; /** * Represents a collection of all the rows in the table. * * @remarks * [Api set: ExcelApi 1.1] */ readonly rows: Excel.TableRowCollection; /** * Represents the sorting for the table. * * @remarks * [Api set: ExcelApi 1.2] */ readonly sort: Excel.TableSort; /** * The worksheet containing the current table. * * @remarks * [Api set: ExcelApi 1.2] */ readonly worksheet: Excel.Worksheet; /** * Specifies if the first column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightFirstColumn: boolean; /** * Specifies if the last column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightLastColumn: boolean; /** * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. * * @remarks * [Api set: ExcelApi 1.1] */ readonly id: string; /** * Returns a numeric ID. * * @remarks * [Api set: ExcelApi 1.8] */ readonly legacyId: string; /** * Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. * * @remarks * [Api set: ExcelApi 1.1] */ name: string; /** * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedColumns: boolean; /** * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedRows: boolean; /** * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. * * @remarks * [Api set: ExcelApi 1.3] */ showFilterButton: boolean; /** * Specifies if the header row is visible. This value can be set to show or remove the header row. * * @remarks * [Api set: ExcelApi 1.1] */ showHeaders: boolean; /** * Specifies if the total row is visible. This value can be set to show or remove the total row. * * @remarks * [Api set: ExcelApi 1.1] */ showTotals: boolean; /** * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.1] */ style: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Table): void; /** * Clears all the filters currently applied on the table. * * @remarks * [Api set: ExcelApi 1.2] */ clearFilters(): void; /** * Converts the table into a normal range of cells. All data is preserved. * * @remarks * [Api set: ExcelApi 1.2] */ convertToRange(): Excel.Range; /** * Deletes the table. * * @remarks * [Api set: ExcelApi 1.1] */ delete(): void; /** * Gets the range object associated with the data body of the table. * * @remarks * [Api set: ExcelApi 1.1] */ getDataBodyRange(): Excel.Range; /** * Gets the range object associated with the header row of the table. * * @remarks * [Api set: ExcelApi 1.1] */ getHeaderRowRange(): Excel.Range; /** * Gets the range object associated with the entire table. * * @remarks * [Api set: ExcelApi 1.1] */ getRange(): Excel.Range; /** * Gets the range object associated with the totals row of the table. * * @remarks * [Api set: ExcelApi 1.1] */ getTotalRowRange(): Excel.Range; /** * Reapplies all the filters currently on the table. * * @remarks * [Api set: ExcelApi 1.2] */ reapplyFilters(): void; /** * Resize the table to the new range. The new range must overlap with the original table range and the headers (or the top of the table) must be in the same row. * * @remarks * [Api set: ExcelApi 1.13] * * @param newRange The range object or range address that will be used to determine the new size of the table. */ resize(newRange: Range | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableLoadOptions): Excel.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Table; /** * Occurs when data in cells changes on a specific table. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; /** * Occurs when the selection changes on a specific table. * * @remarks * [Api set: ExcelApi 1.7] * * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * 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.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TableData; } /** * Represents a collection of all the columns that are part of the table. * * @remarks * [Api set: ExcelApi 1.1] */ class TableColumnCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.TableColumn[]; /** * Returns the number of columns in the table. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Adds a new column to the table. * * @remarks * [Api set: ExcelApi 1.1 requires an index smaller than the total column count; 1.4 allows index to be optional (null or -1) and will append a column at the end; 1.4 allows name parameter at creation time.] * * @param index Optional. Specifies the relative position of the new column. If null or -1, the addition happens at the end. Columns with a higher index will be shifted to the side. Zero-indexed. * @param values Optional. A 2D array of unformatted values of the table column. * @param name Optional. Specifies the name of the new column. If `null`, the default name will be used. */ add(index?: number, values?: Array> | boolean | string | number, name?: string): Excel.TableColumn; /** * Adds a new column to the table. Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. * * @remarks * [Api set: ExcelApi 1.16] * * @param index Optional. Specifies the relative position of the new column. If null or -1, the addition happens at the end. Columns with a higher index will be shifted to the side. Zero-indexed. * @param values Optional. A 2D array of cell values of the table column. * @param name Optional. Specifies the name of the new column. If `null`, the default name will be used. */ addAsJson(index?: number, values?: CellValue[][], name?: string): Excel.TableColumn; /** * Gets the number of columns in the table. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a column object by name or ID. * * @remarks * [Api set: ExcelApi 1.1] * * @param key Column name or ID. */ getItem(key: number | string): Excel.TableColumn; /** * Gets a column based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.TableColumn; /** * Gets a column object by name or ID. If the column doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param key Column name or ID. */ getItemOrNullObject(key: number | string): Excel.TableColumn; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableColumnCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableColumnCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableColumnCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableColumnCollection; /** * 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.TableColumnCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableColumnCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.TableColumnCollectionData; } /** * Represents a column in a table. * * @remarks * [Api set: ExcelApi 1.1] */ class TableColumn extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Retrieves the filter applied to the column. * * @remarks * [Api set: ExcelApi 1.2] */ readonly filter: Excel.Filter; /** * Returns a unique key that identifies the column within the table. * * @remarks * [Api set: ExcelApi 1.1] */ readonly id: number; /** * Returns the index number of the column within the columns collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ readonly index: number; /** * Specifies the name of the table column. * * @remarks * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] */ name: string; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values: any[][]; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson: CellValue[][]; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal: CellValue[][]; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableColumnUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TableColumn): void; /** * Deletes the column from the table. * * @remarks * [Api set: ExcelApi 1.1] */ delete(): void; /** * Gets the range object associated with the data body of the column. * * @remarks * [Api set: ExcelApi 1.1] */ getDataBodyRange(): Excel.Range; /** * Gets the range object associated with the header row of the column. * * @remarks * [Api set: ExcelApi 1.1] */ getHeaderRowRange(): Excel.Range; /** * Gets the range object associated with the entire column. * * @remarks * [Api set: ExcelApi 1.1] */ getRange(): Excel.Range; /** * Gets the range object associated with the totals row of the column. * * @remarks * [Api set: ExcelApi 1.1] */ getTotalRowRange(): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableColumnLoadOptions): Excel.TableColumn; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableColumn; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TableColumn; /** * 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.TableColumn object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableColumnData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TableColumnData; } /** * Represents a collection of all the rows that are part of the table. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents the physical location of the table row, but not the data. That is, if the data is sorted or if new rows are added, a table row will continue to point at the index for which it was created. * * @remarks * [Api set: ExcelApi 1.1] */ class TableRowCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.TableRow[]; /** * Returns the number of rows in the table. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Adds one or more rows to the table. The return object will be the top of the newly added row(s). Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents the physical location of the table row, but not the data. That is, if the data is sorted or if new rows are added, a table row will continue to point at the index for which it was created. * * @remarks * [Api set: ExcelApi 1.1 for adding a single row; 1.4 allows adding of multiple rows; 1.15 for adding `alwaysInsert` parameter.] * * @param index Optional. Specifies the relative position of the new row. If null or -1, the addition happens at the end. Any rows below the inserted row are shifted downwards. Zero-indexed. * @param values Optional. A 2D array of unformatted values of the table row. * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. */ add(index?: number, values?: Array> | boolean | string | number, alwaysInsert?: boolean): Excel.TableRow; /** * Adds one or more rows to the table. The returned object will be the top row of the newly added row or rows. Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents the physical location of the table row, but not the data. That is, if the data is sorted or if new rows are added, a table row will continue to point at the index for which it was created. * * @remarks * [Api set: ExcelApi 1.16] * * @param index Optional. Specifies the relative position of the new row. If null or -1, the addition happens at the end. Any rows below the inserted row are shifted downwards. Zero-indexed. * @param values Optional. A 2D array of cell values of the table row. * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. */ addAsJson(index?: number, values?: CellValue[][], alwaysInsert?: boolean): Excel.TableRow; /** * Delete multiple rows from a table. These rows don't need to be sequential. This method will throw the `InvalidArgument` error if a chosen row has already been deleted or doesn't exist. This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param rows An array of row index numbers or row objects to delete from the table. */ deleteRows(rows: number[] | TableRow[]): void; /** * Delete a specified number of rows from a table, starting at a given index. This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param index The index value of the row to be deleted. Note: Row indexes update each time that a preceding row in the table is deleted, after each delete operation. Ensure that the index of the row that you want to delete hasn't changed between the time that you determined the value and the time that you run the operation. * @param count Number of rows to delete. By default, a single row will be deleted. */ deleteRowsAt(index: number, count?: number): void; /** * Gets the number of rows in the table. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a row based on its position in the collection. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents the physical location of the table row, but not the data. That is, if the data is sorted or if new rows are added, a table row will continue to point at the index for which it was created. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableRowCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableRowCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableRowCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableRowCollection; /** * 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.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.TableRowCollectionData; } /** * Represents a row in a table. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents the physical location of the table row, but not the data. That is, if the data is sorted or if new rows are added, a table row will continue to point at the index for which it was created. * * @remarks * [Api set: ExcelApi 1.1] */ class TableRow extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the index number of the row within the rows collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ readonly index: number; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values: any[][]; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson: CellValue[][]; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal: CellValue[][]; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TableRow): void; /** * Deletes the row from the table. * * @remarks * [Api set: ExcelApi 1.1] */ delete(): void; /** * Returns the range object associated with the entire row. * * @remarks * [Api set: ExcelApi 1.1] */ getRange(): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableRowLoadOptions): Excel.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TableRow; /** * 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.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TableRowData; } /** * Represents the data validation applied to the current range. To learn more about the data validation object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-data-validation | Add data validation to Excel ranges}. * * @remarks * [Api set: ExcelApi 1.8] */ class DataValidation extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Error alert when user enters invalid data. * * @remarks * [Api set: ExcelApi 1.8] */ errorAlert: Excel.DataValidationErrorAlert; /** * Specifies if data validation will be performed on blank cells. Default is `true`. * * @remarks * [Api set: ExcelApi 1.8] */ ignoreBlanks: boolean; /** * Prompt when users select a cell. * * @remarks * [Api set: ExcelApi 1.8] */ prompt: Excel.DataValidationPrompt; /** * Data validation rule that contains different type of data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ rule: Excel.DataValidationRule; /** * Type of the data validation, see `Excel.DataValidationType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ readonly type: Excel.DataValidationType | "None" | "WholeNumber" | "Decimal" | "List" | "Date" | "Time" | "TextLength" | "Custom" | "Inconsistent" | "MixedCriteria"; /** * Represents if all cell values are valid according to the data validation rules. Returns `true` if all cell values are valid, or `false` if all cell values are invalid. Returns `null` if there are both valid and invalid cell values within the range. * * @remarks * [Api set: ExcelApi 1.8] */ readonly valid: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DataValidationUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.DataValidation): void; /** * Clears the data validation from the current range. * * @remarks * [Api set: ExcelApi 1.8] */ clear(): void; /** * Returns a `RangeAreas` object, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will throw an `ItemNotFound` error. * * @remarks * [Api set: ExcelApi 1.9] */ getInvalidCells(): Excel.RangeAreas; /** * Returns a `RangeAreas` object, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will return `null`. * * @remarks * [Api set: ExcelApi 1.9] */ getInvalidCellsOrNullObject(): Excel.RangeAreas; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.DataValidationLoadOptions): Excel.DataValidation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.DataValidation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.DataValidation; /** * 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.DataValidation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataValidationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.DataValidationData; } /** * A data validation rule contains different types of data validation. You can only use one of them at a time according the `Excel.DataValidationType`. * * @remarks * [Api set: ExcelApi 1.8] */ interface DataValidationRule { /** * Custom data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ custom?: Excel.CustomDataValidation; /** * Date data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ date?: Excel.DateTimeDataValidation; /** * Decimal data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ decimal?: Excel.BasicDataValidation; /** * List data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ list?: Excel.ListDataValidation; /** * Text length data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ textLength?: Excel.BasicDataValidation; /** * Time data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ time?: Excel.DateTimeDataValidation; /** * Whole number data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ wholeNumber?: Excel.BasicDataValidation; } /** * Represents the results from `Range.removeDuplicates`. * * @remarks * [Api set: ExcelApi 1.9] */ class RemoveDuplicatesResult extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Number of duplicated rows removed by the operation. * * @remarks * [Api set: ExcelApi 1.9] */ readonly removed: number; /** * Number of remaining unique rows present in the resulting range. * * @remarks * [Api set: ExcelApi 1.9] */ readonly uniqueRemaining: number; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RemoveDuplicatesResultLoadOptions): Excel.RemoveDuplicatesResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RemoveDuplicatesResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RemoveDuplicatesResult; /** * 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.RemoveDuplicatesResult object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RemoveDuplicatesResultData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RemoveDuplicatesResultData; } /** * Represents the basic type data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ interface BasicDataValidation { /** * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. For example, setting formula1 to 10 and operator to GreaterThan means that valid data for the range must be greater than 10. When setting the value, it can be passed in as a number, a range object, or a string formula (where the string is either a stringified number, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * * @remarks * [Api set: ExcelApi 1.8] */ formula1: string | number | Range; /** * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. When setting the value, it can be passed in as a number, a range object, or a string formula (where the string is either a stringified number, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * * @remarks * [Api set: ExcelApi 1.8] */ formula2?: string | number | Range; /** * The operator to use for validating the data. * * @remarks * [Api set: ExcelApi 1.8] */ operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; } /** * Represents the date data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ interface DateTimeDataValidation { /** * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. When setting the value, it can be passed in as a Date, a Range object, or a string formula (where the string is either a stringified date/time in ISO8601 format, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * * @remarks * [Api set: ExcelApi 1.8] */ formula1: string | Date | Range; /** * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. When setting the value, it can be passed in as a Date, a Range object, or a string (where the string is either a stringified date/time in ISO8601 format, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * * @remarks * [Api set: ExcelApi 1.8] */ formula2?: string | Date | Range; /** * The operator to use for validating the data. * * @remarks * [Api set: ExcelApi 1.8] */ operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; } /** * Represents the List data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ interface ListDataValidation { /** * Specifies whether to display the list in a cell drop-down. The default is `true`. * * @remarks * [Api set: ExcelApi 1.8] */ inCellDropDown: boolean; /** * Source of the list for data validation When setting the value, it can be passed in as a `Range` object, or a string that contains a comma-separated number, boolean, or date. * * @remarks * [Api set: ExcelApi 1.8] */ source: string | Range; } /** * Represents the custom data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ interface CustomDataValidation { /** * A custom data validation formula. This creates special input rules, such as preventing duplicates, or limiting the total in a range of cells. * * @remarks * [Api set: ExcelApi 1.8] */ formula: string; } /** * Represents the error alert properties for the data validation. * * @remarks * [Api set: ExcelApi 1.8] */ interface DataValidationErrorAlert { /** * Represents the error alert message. * * @remarks * [Api set: ExcelApi 1.8] */ message: string; /** * Specifies whether to show an error alert dialog when a user enters invalid data. The default is `true`. * * @remarks * [Api set: ExcelApi 1.8] */ showAlert: boolean; /** * The data validation alert type, please see `Excel.DataValidationAlertStyle` for details. * * @remarks * [Api set: ExcelApi 1.8] */ style: Excel.DataValidationAlertStyle | "Stop" | "Warning" | "Information"; /** * Represents the error alert dialog title. * * @remarks * [Api set: ExcelApi 1.8] */ title: string; } /** * Represents the user prompt properties for the data validation. * * @remarks * [Api set: ExcelApi 1.8] */ interface DataValidationPrompt { /** * Specifies the message of the prompt. * * @remarks * [Api set: ExcelApi 1.8] */ message: string; /** * Specifies if a prompt is shown when a user selects a cell with data validation. * * @remarks * [Api set: ExcelApi 1.8] */ showPrompt: boolean; /** * Specifies the title for the prompt. * * @remarks * [Api set: ExcelApi 1.8] */ title: string; } /** * A format object encapsulating the range's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.1] */ class RangeFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Collection of border objects that apply to the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ readonly borders: Excel.RangeBorderCollection; /** * Returns the fill object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ readonly fill: Excel.RangeFill; /** * Returns the font object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ readonly font: Excel.RangeFont; /** * Returns the format protection object for a range. * * @remarks * [Api set: ExcelApi 1.2] */ readonly protection: Excel.FormatProtection; /** * Specifies if text is automatically indented when text alignment is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.9] */ autoIndent: boolean; /** * Specifies the width of all columns within the range. If the column widths are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ columnWidth: number; /** * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * An integer from 0 to 250 that indicates the indent level. * * @remarks * [Api set: ExcelApi 1.9] */ indentLevel: number; /** * The reading order for the range. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ rowHeight: number; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.9] */ shrinkToFit: boolean; /** * The text orientation of all the cells within the range. The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. If the orientation within a range are not uniform, then `null` will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation: number; /** * Determines if the row height of the `Range` object equals the standard height of the sheet. Returns `true` if the row height of the `Range` object equals the standard height of the sheet. Returns `null` if the range contains more than one row and the rows aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardHeight: boolean; /** * Specifies if the column width of the `Range` object equals the standard width of the sheet. Returns `true` if the column width of the `Range` object equals the standard width of the sheet. Returns `null` if the range contains more than one column and the columns aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardWidth: boolean; /** * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting * * @remarks * [Api set: ExcelApi 1.1] */ wrapText: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.RangeFormat): void; /** * Adjusts the indentation of the range formatting. The indent value ranges from 0 to 250 and is measured in characters. * * @remarks * [Api set: ExcelApi 1.11] * * @param amount The number of character spaces by which the current indent is adjusted. This value should be between -250 and 250. * **Note**: If the amount would raise the indent level above 250, the indent level stays with 250. * Similarly, if the amount would lower the indent level below 0, the indent level stays 0. */ adjustIndent(amount: number): void; /** * Changes the width of the columns of the current range to achieve the best fit, based on the current data in the columns. * * @remarks * [Api set: ExcelApi 1.2] */ autofitColumns(): void; /** * Changes the height of the rows of the current range to achieve the best fit, based on the current data in the columns. * * @remarks * [Api set: ExcelApi 1.2] */ autofitRows(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeFormatLoadOptions): Excel.RangeFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RangeFormat; /** * 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.RangeFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RangeFormatData; } /** * Represents the format protection of a range object. * * @remarks * [Api set: ExcelApi 1.2] */ class FormatProtection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. * * @remarks * [Api set: ExcelApi 1.2] */ formulaHidden: boolean; /** * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. * * @remarks * [Api set: ExcelApi 1.2] */ locked: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.FormatProtectionUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.FormatProtection): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.FormatProtectionLoadOptions): Excel.FormatProtection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.FormatProtection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.FormatProtection; /** * 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.FormatProtection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FormatProtectionData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.FormatProtectionData; } /** * Represents the background of a range object. * * @remarks * [Api set: ExcelApi 1.1] */ class RangeFill extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.1] */ color: string; /** * The pattern of a range. See `Excel.FillPattern` for details. LinearGradient and RectangularGradient are not supported. A `null` value indicates that the entire range doesn't have a uniform pattern setting. * * @remarks * [Api set: ExcelApi 1.9] */ pattern: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; /** * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ patternColor: string; /** * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ patternTintAndShade: number; /** * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.RangeFill): void; /** * Resets the range background. * * @remarks * [Api set: ExcelApi 1.1] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeFillLoadOptions): Excel.RangeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RangeFill; /** * 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.RangeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeFillData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RangeFillData; } /** * Represents the border of an object. * * @remarks * [Api set: ExcelApi 1.1] */ class RangeBorder extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.1] */ color: string; /** * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.1] */ readonly sideIndex: Excel.BorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight" | "InsideVertical" | "InsideHorizontal" | "DiagonalDown" | "DiagonalUp"; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ style: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; /** * Specifies a double that lightens or darkens a color for the range border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the border doesn't have a uniform `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade: number; /** * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. * * @remarks * [Api set: ExcelApi 1.1] */ weight: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.RangeBorder): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeBorderLoadOptions): Excel.RangeBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RangeBorder; /** * 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.RangeBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeBorderData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RangeBorderData; } /** * Represents the border objects that make up the range border. * * @remarks * [Api set: ExcelApi 1.1] */ class RangeBorderCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.RangeBorder[]; /** * Number of border objects in the collection. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Specifies a double that lightens or darkens a color for range borders. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the entire border collection doesn't have a uniform `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade: number; /** * Gets a border object using its name. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the border object to be retrieved. See `Excel.BorderIndex` for details. */ getItem(index: Excel.BorderIndex): Excel.RangeBorder; /** * Gets a border object using its name. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the border object to be retrieved. See `Excel.BorderIndex` for details. */ getItem(index: "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight" | "InsideVertical" | "InsideHorizontal" | "DiagonalDown" | "DiagonalUp"): Excel.RangeBorder; /** * Gets a border object using its index. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.RangeBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeBorderCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeBorderCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RangeBorderCollection; /** * 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.RangeBorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeBorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.RangeBorderCollectionData; } /** * This object represents the font attributes (font name, font size, color, etc.) for an object. * * @remarks * [Api set: ExcelApi 1.1] */ class RangeFont extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the bold status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ bold: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color: string; /** * Specifies the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic: boolean; /** * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name: string; /** * Font size. * * @remarks * [Api set: ExcelApi 1.1] */ size: number; /** * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. * * @remarks * [Api set: ExcelApi 1.9] */ strikethrough: boolean; /** * Specifies the subscript status of font. Returns `true` if all the fonts of the range are subscript. Returns `false` if all the fonts of the range are superscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ subscript: boolean; /** * Specifies the superscript status of font. Returns `true` if all the fonts of the range are superscript. Returns `false` if all the fonts of the range are subscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ superscript: boolean; /** * Specifies a double that lightens or darkens a color for the range font. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the entire range doesn't have a uniform font `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade: number; /** * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeFontUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.RangeFont): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeFontLoadOptions): Excel.RangeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RangeFont; /** * 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.RangeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeFontData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RangeFontData; } /** * A collection of all the chart objects on a worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Chart[]; /** * Returns the number of charts in the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Creates a new chart. * * @remarks * [Api set: ExcelApi 1.1] * * @param type Represents the type of a chart. See `Excel.ChartType` for details. * @param sourceData The `Range` object corresponding to the source data. * @param seriesBy Optional. Specifies the way columns or rows are used as data series on the chart. See `Excel.ChartSeriesBy` for details. */ add(type: Excel.ChartType, sourceData: Range, seriesBy?: Excel.ChartSeriesBy): Excel.Chart; /** * Creates a new chart. * * @remarks * [Api set: ExcelApi 1.1] * * @param type Represents the type of a chart. See `Excel.ChartType` for details. * @param sourceData The `Range` object corresponding to the source data. * @param seriesBy Optional. Specifies the way columns or rows are used as data series on the chart. See `Excel.ChartSeriesBy` for details. */ add(type: "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel", sourceData: Range, seriesBy?: "Auto" | "Columns" | "Rows"): Excel.Chart; /** * Returns the number of charts in the worksheet. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a chart using its name. If there are multiple charts with the same name, the first one will be returned. * * @remarks * [Api set: ExcelApi 1.1] * * @param name Name of the chart to be retrieved. */ getItem(name: string): Excel.Chart; /** * Gets a chart based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Chart; /** * Gets a chart using its name. If there are multiple charts with the same name, the first one will be returned. If the chart doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param name Name of the chart to be retrieved. */ getItemOrNullObject(name: string): Excel.Chart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ChartCollection; /** * Occurs when a chart is activated. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onActivated: OfficeExtension.EventHandlers; /** * Occurs when a new chart is added to the worksheet. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onAdded: OfficeExtension.EventHandlers; /** * Occurs when a chart is deactivated. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onDeactivated: OfficeExtension.EventHandlers; /** * Occurs when a chart is deleted. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onDeleted: OfficeExtension.EventHandlers; /** * 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.ChartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ChartCollectionData; } /** * Represents a chart object in a workbook. To learn more about the chart object model, see {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | Work with charts using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ class Chart extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents chart axes. * * @remarks * [Api set: ExcelApi 1.1] */ readonly axes: Excel.ChartAxes; /** * Represents the data labels on the chart. * * @remarks * [Api set: ExcelApi 1.1] */ readonly dataLabels: Excel.ChartDataLabels; /** * Encapsulates the format properties for the chart area. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartAreaFormat; /** * Represents the legend for the chart. * * @remarks * [Api set: ExcelApi 1.1] */ readonly legend: Excel.ChartLegend; /** * Encapsulates the options for a pivot chart. * * @remarks * [Api set: ExcelApi 1.9] */ readonly pivotOptions: Excel.ChartPivotOptions; /** * Represents the plot area for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ readonly plotArea: Excel.ChartPlotArea; /** * Represents either a single series or collection of series in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ readonly series: Excel.ChartSeriesCollection; /** * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * @remarks * [Api set: ExcelApi 1.1] */ readonly title: Excel.ChartTitle; /** * The worksheet containing the current chart. * * @remarks * [Api set: ExcelApi 1.2] */ readonly worksheet: Excel.Worksheet; /** * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. * * @remarks * [Api set: ExcelApi 1.8] */ categoryLabelLevel: number; /** * Specifies the type of the chart. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; /** * Specifies the way that blank cells are plotted on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ displayBlanksAs: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; /** * Specifies the height, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ height: number; /** * The unique ID of chart. * * @remarks * [Api set: ExcelApi 1.7] */ readonly id: string; /** * The distance, in points, from the left side of the chart to the worksheet origin. * * @remarks * [Api set: ExcelApi 1.1] */ left: number; /** * Specifies the name of a chart object. * * @remarks * [Api set: ExcelApi 1.1] */ name: string; /** * Specifies the way columns or rows are used as data series on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotBy: Excel.ChartPlotBy | "Rows" | "Columns"; /** * True if only visible cells are plotted. False if both visible and hidden cells are plotted. * * @remarks * [Api set: ExcelApi 1.8] */ plotVisibleOnly: boolean; /** * Specifies a chart series name level enumeration constant, referring to the level of the source series names. * * @remarks * [Api set: ExcelApi 1.8] */ seriesNameLevel: number; /** * Specifies whether to display all field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.7] */ showAllFieldButtons: boolean; /** * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * * @remarks * [Api set: ExcelApi 1.8] */ showDataLabelsOverMaximum: boolean; /** * Specifies the chart style for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ style: number; /** * Specifies the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). * * @remarks * [Api set: ExcelApi 1.1] */ top: number; /** * Specifies the width, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Chart): void; /** * Activates the chart in the Excel UI. * * @remarks * [Api set: ExcelApi 1.9] */ activate(): void; /** * Deletes the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ delete(): void; /** * Gets the data table on the chart. If the chart doesn't allow a data table, it will throw an exception. * * @remarks * [Api set: ExcelApi 1.14] */ getDataTable(): Excel.ChartDataTable; /** * Gets the data table on the chart. If the chart doesn't allow a data table, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] */ getDataTableOrNullObject(): Excel.ChartDataTable; /** * Renders the chart as a base64-encoded image by scaling the chart to fit the specified dimensions. The aspect ratio is preserved as part of the resizing. * * @remarks * [Api set: ExcelApi 1.2] * * @param height Optional. The desired height of the resulting image. * @param width Optional. The desired width of the resulting image. * @param fittingMode Optional. The method used to scale the chart to the specified dimensions (if both height and width are set). */ getImage(width?: number, height?: number, fittingMode?: Excel.ImageFittingMode): OfficeExtension.ClientResult; /** * Renders the chart as a base64-encoded image by scaling the chart to fit the specified dimensions. The aspect ratio is preserved as part of the resizing. * * @remarks * [Api set: ExcelApi 1.2] * * @param height Optional. The desired height of the resulting image. * @param width Optional. The desired width of the resulting image. * @param fittingMode Optional. The method used to scale the chart to the specified dimensions (if both height and width are set). */ getImage(width?: number, height?: number, fittingMode?: "Fit" | "FitAndCenter" | "Fill"): OfficeExtension.ClientResult; /** * Resets the source data for the chart. * * @remarks * [Api set: ExcelApi 1.1] * * @param sourceData The range object corresponding to the source data. * @param seriesBy Specifies the way columns or rows are used as data series on the chart. Can be one of the following: Auto (default), Rows, and Columns. See `Excel.ChartSeriesBy` for details. */ setData(sourceData: Range, seriesBy?: Excel.ChartSeriesBy): void; /** * Resets the source data for the chart. * * @remarks * [Api set: ExcelApi 1.1] * * @param sourceData The range object corresponding to the source data. * @param seriesBy Specifies the way columns or rows are used as data series on the chart. Can be one of the following: Auto (default), Rows, and Columns. See `Excel.ChartSeriesBy` for details. */ setData(sourceData: Range, seriesBy?: "Auto" | "Columns" | "Rows"): void; /** * Positions the chart relative to cells on the worksheet. * * @remarks * [Api set: ExcelApi 1.1] * * @param startCell The start cell. This is where the chart will be moved to. The start cell is the top-left or top-right cell, depending on the user's right-to-left display settings. * @param endCell Optional. The end cell. If specified, the chart's width and height will be set to fully cover up this cell/range. */ setPosition(startCell: Range | string, endCell?: Range | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartLoadOptions): Excel.Chart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Chart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Chart; /** * Occurs when the chart is activated. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onActivated: OfficeExtension.EventHandlers; /** * Occurs when the chart is deactivated. * * @remarks * [Api set: ExcelApi 1.8] * * @eventproperty */ readonly onDeactivated: OfficeExtension.EventHandlers; /** * 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.Chart object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartData; } /** * Encapsulates the options for the pivot chart. * * @remarks * [Api set: ExcelApi 1.9] */ class ChartPivotOptions extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies whether to display the axis field buttons on a PivotChart. The `showAxisFieldButtons` property corresponds to the "Show Axis Field Buttons" command on the "Field Buttons" drop-down list of the "Analyze" tab, which is available when a PivotChart is selected. * * @remarks * [Api set: ExcelApi 1.9] */ showAxisFieldButtons: boolean; /** * Specifies whether to display the legend field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showLegendFieldButtons: boolean; /** * Specifies whether to display the report filter field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showReportFilterFieldButtons: boolean; /** * Specifies whether to display the show value field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showValueFieldButtons: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartPivotOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartPivotOptions): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartPivotOptionsLoadOptions): Excel.ChartPivotOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartPivotOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartPivotOptions; /** * 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.ChartPivotOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPivotOptionsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartPivotOptionsData; } /** * Encapsulates the format properties for the overall chart area. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartAreaFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the border format of chart area, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ readonly border: Excel.ChartBorder; /** * Represents the fill format of an object, which includes background formatting information. * * @remarks * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * Represents the font attributes (font name, font size, color, etc.) for the current object. * * @remarks * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** * Specifies the color scheme of the chart. * * @remarks * [Api set: ExcelApi 1.9] */ colorScheme: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; /** * Specifies if the chart area of the chart has rounded corners. * * @remarks * [Api set: ExcelApi 1.9] */ roundedCorners: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartAreaFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartAreaFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartAreaFormatLoadOptions): Excel.ChartAreaFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartAreaFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartAreaFormat; /** * 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.ChartAreaFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAreaFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartAreaFormatData; } /** * Represents a collection of chart series. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartSeriesCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartSeries[]; /** * Returns the number of series in the collection. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Add a new series to the collection. The new added series is not visible until values, x-axis values, or bubble sizes for it are set (depending on chart type). * * @remarks * [Api set: ExcelApi 1.7] * * @param name Optional. Name of the series. * @param index Optional. Index value of the series to be added. Zero-indexed. */ add(name?: string, index?: number): Excel.ChartSeries; /** * Returns the number of series in the collection. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Retrieves a series based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.ChartSeries; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartSeriesCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartSeriesCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartSeriesCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ChartSeriesCollection; /** * 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.ChartSeriesCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartSeriesCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ChartSeriesCollectionData; } /** * Represents a series in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartSeries extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Encapsulates the bin options for histogram charts and pareto charts. * * @remarks * [Api set: ExcelApi 1.9] */ readonly binOptions: Excel.ChartBinOptions; /** * Encapsulates the options for the box and whisker charts. * * @remarks * [Api set: ExcelApi 1.9] */ readonly boxwhiskerOptions: Excel.ChartBoxwhiskerOptions; /** * Represents a collection of all data labels in the series. * * @remarks * [Api set: ExcelApi 1.8] */ readonly dataLabels: Excel.ChartDataLabels; /** * Represents the formatting of a chart series, which includes fill and line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartSeriesFormat; /** * Encapsulates the options for a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ readonly mapOptions: Excel.ChartMapOptions; /** * Returns a collection of all points in the series. * * @remarks * [Api set: ExcelApi 1.1] */ readonly points: Excel.ChartPointsCollection; /** * The collection of trendlines in the series. * * @remarks * [Api set: ExcelApi 1.7] */ readonly trendlines: Excel.ChartTrendlineCollection; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ readonly xErrorBars: Excel.ChartErrorBars; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ readonly yErrorBars: Excel.ChartErrorBars; /** * Specifies the group for the specified series. * * @remarks * [Api set: ExcelApi 1.8] */ axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; /** * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. * * @remarks * [Api set: ExcelApi 1.9] */ bubbleScale: number; /** * Represents the chart type of a series. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; /** * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws an `InvalidArgument` error on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ doughnutHoleSize: number; /** * Specifies the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). * * @remarks * [Api set: ExcelApi 1.8] */ explosion: number; /** * Specifies if the series is filtered. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ filtered: boolean; /** * Specifies the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. * * @remarks * [Api set: ExcelApi 1.8] */ firstSliceAngle: number; /** * Represents the gap width of a chart series. Only valid on bar and column charts, as well as specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ gapWidth: number; /** * Specifies the color for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumColor: string; /** * Specifies the type for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumValue: number; /** * Specifies the color for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointColor: string; /** * Specifies the type for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointValue: number; /** * Specifies the color for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumColor: string; /** * Specifies the type for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumValue: number; /** * Specifies the series gradient style of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ gradientStyle: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; /** * Specifies if the series has data labels. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabels: boolean; /** * Specifies the fill color for negative data points in a series. * * @remarks * [Api set: ExcelApi 1.9] */ invertColor: string; /** * True if Excel inverts the pattern in the item when it corresponds to a negative number. * * @remarks * [Api set: ExcelApi 1.8] */ invertIfNegative: boolean; /** * Specifies the marker background color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor: string; /** * Specifies the marker foreground color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor: string; /** * Specifies the marker size of a chart series. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize: number; /** * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; /** * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name: string; /** * Specifies how bars and columns are positioned. Can be a value between -100 and 100. Applies only to 2-D bar and 2-D column charts. * * @remarks * [Api set: ExcelApi 1.8] */ overlap: number; /** * Specifies the series parent label strategy area for a treemap chart. * * @remarks * [Api set: ExcelApi 1.9] */ parentLabelStrategy: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; /** * Specifies the plot order of a chart series within the chart group. * * @remarks * [Api set: ExcelApi 1.7] */ plotOrder: number; /** * Specifies the size of the secondary section of either a pie-of-pie chart or a bar-of-pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. * * @remarks * [Api set: ExcelApi 1.8] */ secondPlotSize: number; /** * Specifies whether connector lines are shown in waterfall charts. * * @remarks * [Api set: ExcelApi 1.9] */ showConnectorLines: boolean; /** * Specifies whether leader lines are displayed for each data label in the series. * * @remarks * [Api set: ExcelApi 1.9] */ showLeaderLines: boolean; /** * Specifies if the series has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow: boolean; /** * Specifies if the series is smooth. Only applicable to line and scatter charts. * * @remarks * [Api set: ExcelApi 1.7] */ smooth: boolean; /** * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. * * @remarks * [Api set: ExcelApi 1.8] */ splitType: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; /** * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. * * @remarks * [Api set: ExcelApi 1.9] */ splitValue: number; /** * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. * * @remarks * [Api set: ExcelApi 1.8] */ varyByCategories: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartSeriesUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartSeries): void; /** * Deletes the chart series. * * @remarks * [Api set: ExcelApi 1.7] */ delete(): void; /** * Gets the string representation of the data source of the chart series. The string representation could be information such as a cell address. * * @remarks * [Api set: ExcelApi 1.15] * * @param dimension The dimension of the axis where the data is from. */ getDimensionDataSourceString(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; /** * Gets the string representation of the data source of the chart series. The string representation could be information such as a cell address. * * @remarks * [Api set: ExcelApi 1.15] * * @param dimension The dimension of the axis where the data is from. */ getDimensionDataSourceString(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; /** * Gets the data source type of the chart series. * * @remarks * [Api set: ExcelApi 1.15] * * @param dimension The dimension of the axis where the data is from. */ getDimensionDataSourceType(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; /** * Gets the data source type of the chart series. * * @remarks * [Api set: ExcelApi 1.15] * * @param dimension The dimension of the axis where the data is from. */ getDimensionDataSourceType(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; /** * Gets the values from a single dimension of the chart series. These could be either category values or data values, depending on the dimension specified and how the data is mapped for the chart series. * * @remarks * [Api set: ExcelApi 1.12] * * @param dimension The dimension of the axis where the data is from. */ getDimensionValues(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; /** * Gets the values from a single dimension of the chart series. These could be either category values or data values, depending on the dimension specified and how the data is mapped for the chart series. * * @remarks * [Api set: ExcelApi 1.12] * * @param dimension The dimension of the axis where the data is from. */ getDimensionValues(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; /** * Sets the bubble sizes for a chart series. Only works for bubble charts. * * @remarks * [Api set: ExcelApi 1.7] * * @param sourceData The `Range` object corresponding to the source data. */ setBubbleSizes(sourceData: Range): void; /** * Sets the values for a chart series. For scatter charts, it refers to y-axis values. * * @remarks * [Api set: ExcelApi 1.7] * * @param sourceData The `Range` object corresponding to the source data. */ setValues(sourceData: Range): void; /** * Sets the values of the x-axis for a chart series. * * @remarks * [Api set: ExcelApi 1.7] * * @param sourceData The `Range` object corresponding to the source data. */ setXAxisValues(sourceData: Range): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartSeriesLoadOptions): Excel.ChartSeries; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartSeries; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartSeries; /** * 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.ChartSeries object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartSeriesData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartSeriesData; } /** * Encapsulates the format properties for the chart series * * @remarks * [Api set: ExcelApi 1.1] */ class ChartSeriesFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the fill format of a chart series, which includes background formatting information. * * @remarks * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * Represents line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly line: Excel.ChartLineFormat; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartSeriesFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartSeriesFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartSeriesFormatLoadOptions): Excel.ChartSeriesFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartSeriesFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartSeriesFormat; /** * 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.ChartSeriesFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartSeriesFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartSeriesFormatData; } /** * A collection of all the chart points within a series inside a chart. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartPointsCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartPoint[]; /** * Returns the number of chart points in the series. * * @remarks * [Api set: ExcelApi 1.1] */ readonly count: number; /** * Returns the number of chart points in the series. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Retrieve a point based on its position within the series. * * @remarks * [Api set: ExcelApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.ChartPoint; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartPointsCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartPointsCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartPointsCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ChartPointsCollection; /** * 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.ChartPointsCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPointsCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ChartPointsCollectionData; } /** * Represents a point of a series in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartPoint extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the data label of a chart point. * * @remarks * [Api set: ExcelApi 1.7] */ readonly dataLabel: Excel.ChartDataLabel; /** * Encapsulates the format properties chart point. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartPointFormat; /** * Represents whether a data point has a data label. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabel: boolean; /** * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor: string; /** * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor: string; /** * Represents marker size of a data point. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize: number; /** * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; /** * Returns the value of a chart point. * * @remarks * [Api set: ExcelApi 1.1] */ readonly value: any; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartPointUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartPoint): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartPointLoadOptions): Excel.ChartPoint; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartPoint; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartPoint; /** * 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.ChartPoint object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPointData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartPointData; } /** * Represents the formatting object for chart points. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartPointFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the border format of a chart data point, which includes color, style, and weight information. * * @remarks * [Api set: ExcelApi 1.7] */ readonly border: Excel.ChartBorder; /** * Represents the fill format of a chart, which includes background formatting information. * * @remarks * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartPointFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartPointFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartPointFormatLoadOptions): Excel.ChartPointFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartPointFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartPointFormat; /** * 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.ChartPointFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPointFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartPointFormatData; } /** * Represents the chart axes. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartAxes extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the category axis in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ readonly categoryAxis: Excel.ChartAxis; /** * Represents the series axis of a 3-D chart. * * @remarks * [Api set: ExcelApi 1.1] */ readonly seriesAxis: Excel.ChartAxis; /** * Represents the value axis in an axis. * * @remarks * [Api set: ExcelApi 1.1] */ readonly valueAxis: Excel.ChartAxis; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartAxesUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartAxes): void; /** * Returns the specific axis identified by type and group. * * @remarks * [Api set: ExcelApi 1.7] * * @param type Specifies the axis type. See `Excel.ChartAxisType` for details. * @param group Optional. Specifies the axis group. See `Excel.ChartAxisGroup` for details. */ getItem(type: Excel.ChartAxisType, group?: Excel.ChartAxisGroup): Excel.ChartAxis; /** * Returns the specific axis identified by type and group. * * @remarks * [Api set: ExcelApi 1.7] * * @param type Specifies the axis type. See `Excel.ChartAxisType` for details. * @param group Optional. Specifies the axis group. See `Excel.ChartAxisGroup` for details. */ getItem(type: "Invalid" | "Category" | "Value" | "Series", group?: "Primary" | "Secondary"): Excel.ChartAxis; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartAxesLoadOptions): Excel.ChartAxes; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartAxes; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartAxes; /** * 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.ChartAxes object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxesData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartAxesData; } /** * Represents a single axis in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartAxis extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the formatting of a chart object, which includes line and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartAxisFormat; /** * Returns an object that represents the major gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ readonly majorGridlines: Excel.ChartGridlines; /** * Returns an object that represents the minor gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ readonly minorGridlines: Excel.ChartGridlines; /** * Represents the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ readonly title: Excel.ChartAxisTitle; /** * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. * * @remarks * [Api set: ExcelApi 1.8] */ alignment: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; /** * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. * * @remarks * [Api set: ExcelApi 1.7] */ readonly axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; /** * Specifies the base unit for the specified category axis. * * @remarks * [Api set: ExcelApi 1.7] */ baseTimeUnit: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Specifies the category axis type. * * @remarks * [Api set: ExcelApi 1.7] */ categoryType: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; /** * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. * * @remarks * [Api set: ExcelApi 1.7] */ readonly customDisplayUnit: number; /** * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. * * @remarks * [Api set: ExcelApi 1.7] */ displayUnit: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; /** * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ readonly height: number; /** * Specifies if the value axis crosses the category axis between categories. * * @remarks * [Api set: ExcelApi 1.8] */ isBetweenCategories: boolean; /** * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ readonly left: number; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat: boolean; /** * Specifies the base of the logarithm when using logarithmic scales. * * @remarks * [Api set: ExcelApi 1.7] */ logBase: number; /** * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ majorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; /** * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ majorTimeUnitScale: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ majorUnit: any; /** * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ maximum: any; /** * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minimum: any; /** * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ minorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; /** * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ minorTimeUnitScale: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minorUnit: any; /** * Specifies if an axis is multilevel. * * @remarks * [Api set: ExcelApi 1.8] */ multiLevel: boolean; /** * Specifies the format code for the axis tick label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat: string; /** * Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. * * @remarks * [Api set: ExcelApi 1.8] */ offset: number; /** * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. * * @remarks * [Api set: ExcelApi 1.8] */ position: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; /** * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. * * @remarks * [Api set: ExcelApi 1.8] */ readonly positionAt: number; /** * Specifies if Excel plots data points from last to first. * * @remarks * [Api set: ExcelApi 1.7] */ reversePlotOrder: boolean; /** * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ scaleType: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; /** * Specifies if the axis display unit label is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showDisplayUnitLabel: boolean; /** * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation: any; /** * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelPosition: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; /** * Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelSpacing: any; /** * Specifies the number of categories or series between tick marks. * * @remarks * [Api set: ExcelApi 1.7] */ tickMarkSpacing: number; /** * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ readonly top: number; /** * Specifies the axis type. See `Excel.ChartAxisType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ readonly type: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; /** * Specifies if the axis is visible. * * @remarks * [Api set: ExcelApi 1.7] */ visible: boolean; /** * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartAxisUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartAxis): void; /** * Sets all the category names for the specified axis. * * @remarks * [Api set: ExcelApi 1.7] * * @param sourceData The `Range` object corresponding to the source data. */ setCategoryNames(sourceData: Range): void; /** * Sets the axis display unit to a custom value. * * @remarks * [Api set: ExcelApi 1.7] * * @param value Custom value of the display unit. */ setCustomDisplayUnit(value: number): void; /** * Sets the specified axis position where the other axis crosses. * * @remarks * [Api set: ExcelApi 1.8] * * @param value Custom value of the crossing point. */ setPositionAt(value: number): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartAxisLoadOptions): Excel.ChartAxis; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartAxis; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartAxis; /** * 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.ChartAxis object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartAxisData; } /** * Encapsulates the format properties for the chart axis. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartAxisFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies chart fill formatting. * * @remarks * [Api set: ExcelApi 1.8] */ readonly fill: Excel.ChartFill; /** * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. * * @remarks * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** * Specifies chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly line: Excel.ChartLineFormat; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartAxisFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartAxisFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartAxisFormatLoadOptions): Excel.ChartAxisFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartAxisFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartAxisFormat; /** * 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.ChartAxisFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartAxisFormatData; } /** * Represents the title of a chart axis. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartAxisTitle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the formatting of the chart axis title. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartAxisTitleFormat; /** * Specifies the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ text: string; /** * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.12] */ textOrientation: number; /** * Specifies if the axis title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartAxisTitleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartAxisTitle): void; /** * A string value that represents the formula of chart axis title using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] * * @param formula A string that represents the formula to set. */ setFormula(formula: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartAxisTitleLoadOptions): Excel.ChartAxisTitle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartAxisTitle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartAxisTitle; /** * 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.ChartAxisTitle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisTitleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartAxisTitleData; } /** * Represents the chart axis title formatting. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartAxisTitleFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the chart axis title's border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ readonly border: Excel.ChartBorder; /** * Specifies the chart axis title's fill formatting. * * @remarks * [Api set: ExcelApi 1.8] */ readonly fill: Excel.ChartFill; /** * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. * * @remarks * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartAxisTitleFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartAxisTitleFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions): Excel.ChartAxisTitleFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartAxisTitleFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartAxisTitleFormat; /** * 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.ChartAxisTitleFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisTitleFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartAxisTitleFormatData; } /** * Represents a collection of all the data labels on a chart point. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartDataLabels extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the format of chart data labels, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartDataLabelFormat; /** * Specifies if data labels automatically generate appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText: boolean; /** * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when the `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat: boolean; /** * Specifies the format code for data labels. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat: string; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; /** * String representing the separator used for the data labels on a chart. * * @remarks * [Api set: ExcelApi 1.1] */ separator: string; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showBubbleSize: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showCategoryName: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showLegendKey: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showPercentage: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showSeriesName: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showValue: boolean; /** * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation: number; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of the data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartDataLabelsUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartDataLabels): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartDataLabelsLoadOptions): Excel.ChartDataLabels; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartDataLabels; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartDataLabels; /** * 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.ChartDataLabels object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataLabelsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartDataLabelsData; } /** * Represents the data label of a chart point. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartDataLabel extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the format of chart data label. * * @remarks * [Api set: ExcelApi 1.8] */ readonly format: Excel.ChartDataLabelFormat; /** * Specifies if the data label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText: boolean; /** * String value that represents the formula of chart data label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula: string; /** * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ readonly height: number; /** * Represents the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left: number; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat: boolean; /** * String value that represents the format code for data label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat: string; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; /** * String representing the separator used for the data label on a chart. * * @remarks * [Api set: ExcelApi 1.7] */ separator: string; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showBubbleSize: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showCategoryName: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showLegendKey: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showPercentage: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showSeriesName: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showValue: boolean; /** * String representing the text of the data label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text: string; /** * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation: number; /** * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top: number; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartDataLabelUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartDataLabel): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartDataLabelLoadOptions): Excel.ChartDataLabel; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartDataLabel; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartDataLabel; /** * 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.ChartDataLabel object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataLabelData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartDataLabelData; } /** * Encapsulates the format properties for the chart data labels. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartDataLabelFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ readonly border: Excel.ChartBorder; /** * Represents the fill format of the current chart data label. * * @remarks * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * Represents the font attributes (such as font name, font size, and color) for a chart data label. * * @remarks * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartDataLabelFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartDataLabelFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartDataLabelFormatLoadOptions): Excel.ChartDataLabelFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartDataLabelFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartDataLabelFormat; /** * 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.ChartDataLabelFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataLabelFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartDataLabelFormatData; } /** * Represents the data table object of a chart. * * @remarks * [Api set: ExcelApi 1.14] */ class ChartDataTable extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the format of a chart data table, which includes fill, font, and border format. * * @remarks * [Api set: ExcelApi 1.14] */ readonly format: Excel.ChartDataTableFormat; /** * Specifies whether to display the horizontal border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showHorizontalBorder: boolean; /** * Specifies whether to show the legend key of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showLegendKey: boolean; /** * Specifies whether to display the outline border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showOutlineBorder: boolean; /** * Specifies whether to display the vertical border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showVerticalBorder: boolean; /** * Specifies whether to show the data table of the chart. * * @remarks * [Api set: ExcelApi 1.14] */ visible: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartDataTableUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartDataTable): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartDataTableLoadOptions): Excel.ChartDataTable; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartDataTable; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartDataTable; /** * 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.ChartDataTable object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataTableData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartDataTableData; } /** * Represents the format of a chart data table. * * @remarks * [Api set: ExcelApi 1.14] */ class ChartDataTableFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the border format of chart data table, which includes color, line style, and weight. * * @remarks * [Api set: ExcelApi 1.14] */ readonly border: Excel.ChartBorder; /** * Represents the fill format of an object, which includes background formatting information. * * @remarks * [Api set: ExcelApi 1.14] */ readonly fill: Excel.ChartFill; /** * Represents the font attributes (such as font name, font size, and color) for the current object. * * @remarks * [Api set: ExcelApi 1.14] */ readonly font: Excel.ChartFont; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartDataTableFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartDataTableFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartDataTableFormatLoadOptions): Excel.ChartDataTableFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartDataTableFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartDataTableFormat; /** * 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.ChartDataTableFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataTableFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartDataTableFormatData; } /** * This object represents the attributes for a chart's error bars. * * @remarks * [Api set: ExcelApi 1.9] */ class ChartErrorBars extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the formatting type of the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ readonly format: Excel.ChartErrorBarsFormat; /** * Specifies if error bars have an end style cap. * * @remarks * [Api set: ExcelApi 1.9] */ endStyleCap: boolean; /** * Specifies which parts of the error bars to include. * * @remarks * [Api set: ExcelApi 1.9] */ include: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; /** * The type of range marked by the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ type: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; /** * Specifies whether the error bars are displayed. * * @remarks * [Api set: ExcelApi 1.9] */ visible: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartErrorBarsUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartErrorBars): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartErrorBarsLoadOptions): Excel.ChartErrorBars; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartErrorBars; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartErrorBars; /** * 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.ChartErrorBars object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartErrorBarsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartErrorBarsData; } /** * Encapsulates the format properties for chart error bars. * * @remarks * [Api set: ExcelApi 1.9] */ class ChartErrorBarsFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the chart line formatting. * * @remarks * [Api set: ExcelApi 1.9] */ readonly line: Excel.ChartLineFormat; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartErrorBarsFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartErrorBarsFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions): Excel.ChartErrorBarsFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartErrorBarsFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartErrorBarsFormat; /** * 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.ChartErrorBarsFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartErrorBarsFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartErrorBarsFormatData; } /** * Represents major or minor gridlines on a chart axis. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartGridlines extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the formatting of chart gridlines. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartGridlinesFormat; /** * Specifies if the axis gridlines are visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartGridlinesUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartGridlines): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartGridlinesLoadOptions): Excel.ChartGridlines; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartGridlines; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartGridlines; /** * 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.ChartGridlines object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartGridlinesData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartGridlinesData; } /** * Encapsulates the format properties for chart gridlines. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartGridlinesFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly line: Excel.ChartLineFormat; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartGridlinesFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartGridlinesFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartGridlinesFormatLoadOptions): Excel.ChartGridlinesFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartGridlinesFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartGridlinesFormat; /** * 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.ChartGridlinesFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartGridlinesFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartGridlinesFormatData; } /** * Represents the legend in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartLegend extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the formatting of a chart legend, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartLegendFormat; /** * Represents a collection of legendEntries in the legend. * * @remarks * [Api set: ExcelApi 1.7] */ readonly legendEntries: Excel.ChartLegendEntryCollection; /** * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height: number; /** * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left: number; /** * Specifies if the chart legend should overlap with the main body of the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay: boolean; /** * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; /** * Specifies if the legend has a shadow on the chart. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow: boolean; /** * Specifies the top of a chart legend. * * @remarks * [Api set: ExcelApi 1.7] */ top: number; /** * Specifies if the chart legend is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible: boolean; /** * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartLegendUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartLegend): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartLegendLoadOptions): Excel.ChartLegend; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartLegend; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartLegend; /** * 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.ChartLegend object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartLegendData; } /** * Represents the legend entry in `legendEntryCollection`. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartLegendEntry extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the height of the legend entry on the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ readonly height: number; /** * Specifies the index of the legend entry in the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ readonly index: number; /** * Specifies the left value of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ readonly left: number; /** * Specifies the top of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ readonly top: number; /** * Represents the visibility of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.7] */ visible: boolean; /** * Represents the width of the legend entry on the chart Legend. * * @remarks * [Api set: ExcelApi 1.8] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartLegendEntryUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartLegendEntry): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartLegendEntryLoadOptions): Excel.ChartLegendEntry; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartLegendEntry; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartLegendEntry; /** * 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.ChartLegendEntry object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendEntryData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartLegendEntryData; } /** * Represents a collection of legend entries. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartLegendEntryCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartLegendEntry[]; /** * Returns the number of legend entries in the collection. * * @remarks * [Api set: ExcelApi 1.7] */ getCount(): OfficeExtension.ClientResult; /** * Returns a legend entry at the given index. * * @remarks * [Api set: ExcelApi 1.7] * * @param index Index of the legend entry to be retrieved. */ getItemAt(index: number): Excel.ChartLegendEntry; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartLegendEntryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartLegendEntryCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartLegendEntryCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ChartLegendEntryCollection; /** * 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.ChartLegendEntryCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendEntryCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ChartLegendEntryCollectionData; } /** * Encapsulates the format properties of a chart legend. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartLegendFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ readonly border: Excel.ChartBorder; /** * Represents the fill format of an object, which includes background formatting information. * * @remarks * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * Represents the font attributes such as font name, font size, and color of a chart legend. * * @remarks * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartLegendFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartLegendFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartLegendFormatLoadOptions): Excel.ChartLegendFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartLegendFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartLegendFormat; /** * 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.ChartLegendFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartLegendFormatData; } /** * Encapsulates the properties for a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ class ChartMapOptions extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the series map labels strategy of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ labelStrategy: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; /** * Specifies the series mapping level of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ level: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; /** * Specifies the series projection type of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ projectionType: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartMapOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartMapOptions): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartMapOptionsLoadOptions): Excel.ChartMapOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartMapOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartMapOptions; /** * 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.ChartMapOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartMapOptionsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartMapOptionsData; } /** * Represents a chart title object of a chart. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartTitle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the formatting of a chart title, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartTitleFormat; /** * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ readonly height: number; /** * Specifies the horizontal alignment for chart title. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left: number; /** * Specifies if the chart title will overlay the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay: boolean; /** * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position: Excel.ChartTitlePosition | "Automatic" | "Top" | "Bottom" | "Left" | "Right"; /** * Represents a boolean value that determines if the chart title has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow: boolean; /** * Specifies the chart's title text. * * @remarks * [Api set: ExcelApi 1.1] */ text: string; /** * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation: number; /** * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ top: number; /** * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Specifies if the chart title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible: boolean; /** * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartTitleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartTitle): void; /** * Get the substring of a chart title. Line break '\n' counts one character. * * @remarks * [Api set: ExcelApi 1.7] * * @param start Start position of substring to be retrieved. Zero-indexed. * @param length Length of the substring to be retrieved. */ getSubstring(start: number, length: number): Excel.ChartFormatString; /** * Sets a string value that represents the formula of chart title using A1-style notation. * * @remarks * [Api set: ExcelApi 1.7] * * @param formula A string that represents the formula to set. */ setFormula(formula: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartTitleLoadOptions): Excel.ChartTitle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartTitle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartTitle; /** * 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.ChartTitle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTitleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartTitleData; } /** * Represents the substring in chart related objects that contain text, like a `ChartTitle` object or `ChartAxisTitle` object. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartFormatString extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the font attributes, such as font name, font size, and color of a chart characters object. * * @remarks * [Api set: ExcelApi 1.7] */ readonly font: Excel.ChartFont; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartFormatStringUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartFormatString): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartFormatStringLoadOptions): Excel.ChartFormatString; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartFormatString; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartFormatString; /** * 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.ChartFormatString object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartFormatStringData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartFormatStringData; } /** * Provides access to the formatting options for a chart title. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartTitleFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the border format of chart title, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ readonly border: Excel.ChartBorder; /** * Represents the fill format of an object, which includes background formatting information. * * @remarks * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * Represents the font attributes (such as font name, font size, and color) for an object. * * @remarks * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartTitleFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartTitleFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartTitleFormatLoadOptions): Excel.ChartTitleFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartTitleFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartTitleFormat; /** * 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.ChartTitleFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTitleFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartTitleFormatData; } /** * Represents the fill formatting for a chart element. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartFill extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Clears the fill color of a chart element. * * @remarks * [Api set: ExcelApi 1.1] */ clear(): void; /** * Gets the uniform color fill formatting of a chart element. * * @remarks * [Api set: ExcelApi 1.16] */ getSolidColor(): OfficeExtension.ClientResult; /** * Sets the fill formatting of a chart element to a uniform color. * * @remarks * [Api set: ExcelApi 1.1] * * @param color HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). */ setSolidColor(color: string): void; /** * 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.ChartFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartFillData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): { [key: string]: string; }; } /** * Represents the border formatting of a chart element. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartBorder extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of borders in the chart. * * @remarks * [Api set: ExcelApi 1.7] */ color: string; /** * Represents the line style of the border. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; /** * Represents weight of the border, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartBorder): void; /** * Clear the border format of a chart element. * * @remarks * [Api set: ExcelApi 1.8] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartBorderLoadOptions): Excel.ChartBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartBorder; /** * 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.ChartBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartBorderData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartBorderData; } /** * Encapsulates the bin options for histogram charts and pareto charts. * * @remarks * [Api set: ExcelApi 1.9] */ class ChartBinOptions extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies if bin overflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowOverflow: boolean; /** * Specifies if bin underflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowUnderflow: boolean; /** * Specifies the bin count of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ count: number; /** * Specifies the bin overflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ overflowValue: number; /** * Specifies the bin's type for a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ type: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; /** * Specifies the bin underflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ underflowValue: number; /** * Specifies the bin width value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartBinOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartBinOptions): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartBinOptionsLoadOptions): Excel.ChartBinOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartBinOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartBinOptions; /** * 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.ChartBinOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartBinOptionsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartBinOptionsData; } /** * Represents the properties of a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ class ChartBoxwhiskerOptions extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies if the quartile calculation type of a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ quartileCalculation: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; /** * Specifies if inner points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showInnerPoints: boolean; /** * Specifies if the mean line is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanLine: boolean; /** * Specifies if the mean marker is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanMarker: boolean; /** * Specifies if outlier points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showOutlierPoints: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartBoxwhiskerOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartBoxwhiskerOptions): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions): Excel.ChartBoxwhiskerOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartBoxwhiskerOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartBoxwhiskerOptions; /** * 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.ChartBoxwhiskerOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartBoxwhiskerOptionsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartBoxwhiskerOptionsData; } /** * Encapsulates the formatting options for line elements. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartLineFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of lines in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ color: string; /** * Represents the line style. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; /** * Represents weight of the line, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartLineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartLineFormat): void; /** * Clears the line format of a chart element. * * @remarks * [Api set: ExcelApi 1.1] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartLineFormatLoadOptions): Excel.ChartLineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartLineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartLineFormat; /** * 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.ChartLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLineFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartLineFormatData; } /** * This object represents the font attributes (such as font name, font size, and color) for a chart object. * * @remarks * [Api set: ExcelApi 1.1] */ class ChartFont extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the bold status of font. * * @remarks * [Api set: ExcelApi 1.1] */ bold: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color: string; /** * Represents the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic: boolean; /** * Font name (e.g., "Calibri") * * @remarks * [Api set: ExcelApi 1.1] */ name: string; /** * Size of the font (e.g., 11) * * @remarks * [Api set: ExcelApi 1.1] */ size: number; /** * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline: Excel.ChartUnderlineStyle | "None" | "Single"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartFontUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartFont): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartFontLoadOptions): Excel.ChartFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartFont; /** * 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.ChartFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartFontData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartFontData; } /** * This object represents the attributes for a chart trendline object. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartTrendline extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the formatting of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ readonly format: Excel.ChartTrendlineFormat; /** * Represents the label of a chart trendline. * * @remarks * [Api set: ExcelApi 1.8] */ readonly label: Excel.ChartTrendlineLabel; /** * Represents the number of periods that the trendline extends backward. * * @remarks * [Api set: ExcelApi 1.8] */ backwardPeriod: number; /** * Represents the number of periods that the trendline extends forward. * * @remarks * [Api set: ExcelApi 1.8] */ forwardPeriod: number; /** * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ intercept: any; /** * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. * * @remarks * [Api set: ExcelApi 1.7] */ movingAveragePeriod: number; /** * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string * * @remarks * [Api set: ExcelApi 1.7] */ name: string; /** * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. * * @remarks * [Api set: ExcelApi 1.7] */ polynomialOrder: number; /** * True if the equation for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showEquation: boolean; /** * True if the r-squared value for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showRSquared: boolean; /** * Represents the type of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ type: Excel.ChartTrendlineType | "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartTrendlineUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartTrendline): void; /** * Delete the trendline object. * * @remarks * [Api set: ExcelApi 1.7] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartTrendlineLoadOptions): Excel.ChartTrendline; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartTrendline; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartTrendline; /** * 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.ChartTrendline object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartTrendlineData; } /** * Represents a collection of chart trendlines. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartTrendlineCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartTrendline[]; /** * Adds a new trendline to trendline collection. * * @remarks * [Api set: ExcelApi 1.7] * * @param type Specifies the trendline type. The default value is "Linear". See `Excel.ChartTrendline` for details. */ add(type?: Excel.ChartTrendlineType): Excel.ChartTrendline; /** * Adds a new trendline to trendline collection. * * @remarks * [Api set: ExcelApi 1.7] * * @param type Specifies the trendline type. The default value is "Linear". See `Excel.ChartTrendline` for details. */ add(type?: "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"): Excel.ChartTrendline; /** * Returns the number of trendlines in the collection. * * @remarks * [Api set: ExcelApi 1.7] */ getCount(): OfficeExtension.ClientResult; /** * Gets a trendline object by index, which is the insertion order in the items array. * * @remarks * [Api set: ExcelApi 1.7] * * @param index Represents the insertion order in the items array. */ getItem(index: number): Excel.ChartTrendline; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartTrendlineCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartTrendlineCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartTrendlineCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ChartTrendlineCollection; /** * 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.ChartTrendlineCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ChartTrendlineCollectionData; } /** * Represents the format properties for the chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ class ChartTrendlineFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.7] */ readonly line: Excel.ChartLineFormat; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartTrendlineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartTrendlineFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartTrendlineFormatLoadOptions): Excel.ChartTrendlineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartTrendlineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartTrendlineFormat; /** * 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.ChartTrendlineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartTrendlineFormatData; } /** * This object represents the attributes for a chart trendline label object. * * @remarks * [Api set: ExcelApi 1.8] */ class ChartTrendlineLabel extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The format of the chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ readonly format: Excel.ChartTrendlineLabelFormat; /** * Specifies if the trendline label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText: boolean; /** * String value that represents the formula of the chart trendline label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula: string; /** * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ readonly height: number; /** * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left: number; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat: boolean; /** * String value that represents the format code for the trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat: string; /** * String representing the text of the trendline label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text: string; /** * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation: number; /** * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top: number; /** * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartTrendlineLabelUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartTrendlineLabel): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartTrendlineLabelLoadOptions): Excel.ChartTrendlineLabel; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartTrendlineLabel; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartTrendlineLabel; /** * 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.ChartTrendlineLabel object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineLabelData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartTrendlineLabelData; } /** * Encapsulates the format properties for the chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ class ChartTrendlineLabelFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ readonly border: Excel.ChartBorder; /** * Specifies the fill format of the current chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ readonly fill: Excel.ChartFill; /** * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ readonly font: Excel.ChartFont; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartTrendlineLabelFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartTrendlineLabelFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions): Excel.ChartTrendlineLabelFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartTrendlineLabelFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartTrendlineLabelFormat; /** * 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.ChartTrendlineLabelFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineLabelFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartTrendlineLabelFormatData; } /** * This object represents the attributes for a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ class ChartPlotArea extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the formatting of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ readonly format: Excel.ChartPlotAreaFormat; /** * Specifies the height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ height: number; /** * Specifies the inside height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideHeight: number; /** * Specifies the inside left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideLeft: number; /** * Specifies the inside top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideTop: number; /** * Specifies the inside width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideWidth: number; /** * Specifies the left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ left: number; /** * Specifies the position of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ position: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; /** * Specifies the top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ top: number; /** * Specifies the width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartPlotAreaUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartPlotArea): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartPlotAreaLoadOptions): Excel.ChartPlotArea; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartPlotArea; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartPlotArea; /** * 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.ChartPlotArea object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPlotAreaData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartPlotAreaData; } /** * Represents the format properties for a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ class ChartPlotAreaFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the border attributes of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ readonly border: Excel.ChartBorder; /** * Specifies the fill format of an object, which includes background formatting information. * * @remarks * [Api set: ExcelApi 1.8] */ readonly fill: Excel.ChartFill; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ChartPlotAreaFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ChartPlotAreaFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions): Excel.ChartPlotAreaFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ChartPlotAreaFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartPlotAreaFormat; /** * 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.ChartPlotAreaFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPlotAreaFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ChartPlotAreaFormatData; } /** * Manages sorting operations on `Range` objects. * * @remarks * [Api set: ExcelApi 1.2] */ class RangeSort extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Perform a sort operation. * * @remarks * [Api set: ExcelApi 1.2] * * @param fields The list of conditions to sort on. * @param matchCase Optional. Whether to have the casing impact string ordering. * @param hasHeaders Optional. Whether the range has a header. * @param orientation Optional. Whether the operation is sorting rows or columns. * @param method Optional. The ordering method used for Chinese characters. */ apply(fields: Excel.SortField[], matchCase?: boolean, hasHeaders?: boolean, orientation?: Excel.SortOrientation, method?: Excel.SortMethod): void; /** * Perform a sort operation. * * @remarks * [Api set: ExcelApi 1.2] * * @param fields The list of conditions to sort on. * @param matchCase Optional. Whether to have the casing impact string ordering. * @param hasHeaders Optional. Whether the range has a header. * @param orientation Optional. Whether the operation is sorting rows or columns. * @param method Optional. The ordering method used for Chinese characters. */ apply(fields: Excel.SortField[], matchCase?: boolean, hasHeaders?: boolean, orientation?: "Rows" | "Columns", method?: "PinYin" | "StrokeCount"): void; /** * 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.RangeSort object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeSortData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): { [key: string]: string; }; } /** * Manages sorting operations on `Table` objects. * * @remarks * [Api set: ExcelApi 1.2] */ class TableSort extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the current conditions used to last sort the table. * * @remarks * [Api set: ExcelApi 1.2] */ readonly fields: Excel.SortField[]; /** * Specifies if the casing impacts the last sort of the table. * * @remarks * [Api set: ExcelApi 1.2] */ readonly matchCase: boolean; /** * Represents the Chinese character ordering method last used to sort the table. * * @remarks * [Api set: ExcelApi 1.2] */ readonly method: Excel.SortMethod | "PinYin" | "StrokeCount"; /** * Perform a sort operation. * * @remarks * [Api set: ExcelApi 1.2] * * @param fields The list of conditions to sort on. * @param matchCase Optional. Whether to have the casing impact string ordering. * @param method Optional. The ordering method used for Chinese characters. */ apply(fields: Excel.SortField[], matchCase?: boolean, method?: Excel.SortMethod): void; /** * Perform a sort operation. * * @remarks * [Api set: ExcelApi 1.2] * * @param fields The list of conditions to sort on. * @param matchCase Optional. Whether to have the casing impact string ordering. * @param method Optional. The ordering method used for Chinese characters. */ apply(fields: Excel.SortField[], matchCase?: boolean, method?: "PinYin" | "StrokeCount"): void; /** * Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. * * @remarks * [Api set: ExcelApi 1.2] */ clear(): void; /** * Reapplies the current sorting parameters to the table. * * @remarks * [Api set: ExcelApi 1.2] */ reapply(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableSortLoadOptions): Excel.TableSort; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableSort; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TableSort; /** * 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.TableSort object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableSortData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TableSortData; } /** * Represents a condition in a sorting operation. * * @remarks * [Api set: ExcelApi 1.2] */ interface SortField { /** * Specifies if the sorting is done in an ascending fashion. * * @remarks * [Api set: ExcelApi 1.2] */ ascending?: boolean; /** * Specifies the color that is the target of the condition if the sorting is on font or cell color. * * @remarks * [Api set: ExcelApi 1.2] */ color?: string; /** * Represents additional sorting options for this field. * * @remarks * [Api set: ExcelApi 1.2] */ dataOption?: Excel.SortDataOption | "Normal" | "TextAsNumber"; /** * Specifies the icon that is the target of the condition, if the sorting is on the cell's icon. * * @remarks * [Api set: ExcelApi 1.2] */ icon?: Excel.Icon; /** * Specifies the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row). * * @remarks * [Api set: ExcelApi 1.2] */ key: number; /** * Specifies the type of sorting of this condition. * * @remarks * [Api set: ExcelApi 1.2] */ sortOn?: Excel.SortOn | "Value" | "CellColor" | "FontColor" | "Icon"; /** * Specifies the subfield that is the target property name of a rich value to sort on. * * @remarks * [Api set: ExcelApi 1.9] */ subField?: string; } /** * Manages the filtering of a table's column. * * @remarks * [Api set: ExcelApi 1.2] */ class Filter extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The currently applied filter on the given column. * * @remarks * [Api set: ExcelApi 1.2] */ readonly criteria: Excel.FilterCriteria; /** * Apply the given filter criteria on the given column. * * @remarks * [Api set: ExcelApi 1.2] * * @param criteria The criteria to apply. */ apply(criteria: Excel.FilterCriteria): void; /** * Apply a "Bottom Item" filter to the column for the given number of elements. * * @remarks * [Api set: ExcelApi 1.2] * * @param count The number of elements from the bottom to show. */ applyBottomItemsFilter(count: number): void; /** * Apply a "Bottom Percent" filter to the column for the given percentage of elements. * * @remarks * [Api set: ExcelApi 1.2] * * @param percent The percentage of elements from the bottom to show. */ applyBottomPercentFilter(percent: number): void; /** * Apply a "Cell Color" filter to the column for the given color. * * @remarks * [Api set: ExcelApi 1.2] * * @param color The background color of the cells to show. */ applyCellColorFilter(color: string): void; /** * Apply an "Icon" filter to the column for the given criteria strings. * * @remarks * [Api set: ExcelApi 1.2] * * @param criteria1 The first criteria string. * @param criteria2 Optional. The second criteria string. * @param oper Optional. The operator that describes how the two criteria are joined. */ applyCustomFilter(criteria1: string, criteria2?: string, oper?: Excel.FilterOperator): void; /** * Apply an "Icon" filter to the column for the given criteria strings. * * @remarks * [Api set: ExcelApi 1.2] * * @param criteria1 The first criteria string. * @param criteria2 Optional. The second criteria string. * @param oper Optional. The operator that describes how the two criteria are joined. */ applyCustomFilter(criteria1: string, criteria2?: string, oper?: "And" | "Or"): void; /** * Apply a "Dynamic" filter to the column. * * @remarks * [Api set: ExcelApi 1.2] * * @param criteria The dynamic criteria to apply. */ applyDynamicFilter(criteria: Excel.DynamicFilterCriteria): void; /** * Apply a "Dynamic" filter to the column. * * @remarks * [Api set: ExcelApi 1.2] * * @param criteria The dynamic criteria to apply. */ applyDynamicFilter(criteria: "Unknown" | "AboveAverage" | "AllDatesInPeriodApril" | "AllDatesInPeriodAugust" | "AllDatesInPeriodDecember" | "AllDatesInPeriodFebruray" | "AllDatesInPeriodJanuary" | "AllDatesInPeriodJuly" | "AllDatesInPeriodJune" | "AllDatesInPeriodMarch" | "AllDatesInPeriodMay" | "AllDatesInPeriodNovember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodSeptember" | "BelowAverage" | "LastMonth" | "LastQuarter" | "LastWeek" | "LastYear" | "NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" | "ThisMonth" | "ThisQuarter" | "ThisWeek" | "ThisYear" | "Today" | "Tomorrow" | "YearToDate" | "Yesterday"): void; /** * Apply a "Font Color" filter to the column for the given color. * * @remarks * [Api set: ExcelApi 1.2] * * @param color The font color of the cells to show. */ applyFontColorFilter(color: string): void; /** * Apply an "Icon" filter to the column for the given icon. * * @remarks * [Api set: ExcelApi 1.2] * * @param icon The icons of the cells to show. */ applyIconFilter(icon: Excel.Icon): void; /** * Apply a "Top Item" filter to the column for the given number of elements. * * @remarks * [Api set: ExcelApi 1.2] * * @param count The number of elements from the top to show. */ applyTopItemsFilter(count: number): void; /** * Apply a "Top Percent" filter to the column for the given percentage of elements. * * @remarks * [Api set: ExcelApi 1.2] * * @param percent The percentage of elements from the top to show. */ applyTopPercentFilter(percent: number): void; /** * Apply a "Values" filter to the column for the given values. * * @remarks * [Api set: ExcelApi 1.2] * * @param values The list of values to show. This must be an array of strings or an array of `Excel.FilterDateTime` objects. */ applyValuesFilter(values: Array): void; /** * Clear the filter on the given column. * * @remarks * [Api set: ExcelApi 1.2] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.FilterLoadOptions): Excel.Filter; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Filter; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Filter; /** * 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.Filter object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FilterData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.FilterData; } /** * Represents the filtering criteria applied to a column. * * @remarks * [Api set: ExcelApi 1.2] */ interface FilterCriteria { /** * The HTML color string used to filter cells. Used with `cellColor` and `fontColor` filtering. * * @remarks * [Api set: ExcelApi 1.2] */ color?: string; /** * The first criterion used to filter data. Used as an operator in the case of `custom` filtering. For example ">50" for numbers greater than 50, or "=*s" for values ending in "s". Used as a number in the case of top/bottom items/percents (e.g., "5" for the top 5 items if `filterOn` is set to `topItems`). * * @remarks * [Api set: ExcelApi 1.2] */ criterion1?: string; /** * The second criterion used to filter data. Only used as an operator in the case of `custom` filtering. * * @remarks * [Api set: ExcelApi 1.2] */ criterion2?: string; /** * The dynamic criteria from the `Excel.DynamicFilterCriteria` set to apply on this column. Used with `dynamic` filtering. * * @remarks * [Api set: ExcelApi 1.2] */ dynamicCriteria?: Excel.DynamicFilterCriteria | "Unknown" | "AboveAverage" | "AllDatesInPeriodApril" | "AllDatesInPeriodAugust" | "AllDatesInPeriodDecember" | "AllDatesInPeriodFebruray" | "AllDatesInPeriodJanuary" | "AllDatesInPeriodJuly" | "AllDatesInPeriodJune" | "AllDatesInPeriodMarch" | "AllDatesInPeriodMay" | "AllDatesInPeriodNovember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodSeptember" | "BelowAverage" | "LastMonth" | "LastQuarter" | "LastWeek" | "LastYear" | "NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" | "ThisMonth" | "ThisQuarter" | "ThisWeek" | "ThisYear" | "Today" | "Tomorrow" | "YearToDate" | "Yesterday"; /** * The property used by the filter to determine whether the values should stay visible. * * @remarks * [Api set: ExcelApi 1.2] */ filterOn: Excel.FilterOn | "BottomItems" | "BottomPercent" | "CellColor" | "Dynamic" | "FontColor" | "Values" | "TopItems" | "TopPercent" | "Icon" | "Custom"; /** * The icon used to filter cells. Used with `icon` filtering. * * @remarks * [Api set: ExcelApi 1.2] */ icon?: Excel.Icon; /** * The operator used to combine criterion 1 and 2 when using `custom` filtering. * * @remarks * [Api set: ExcelApi 1.2] */ operator?: Excel.FilterOperator | "And" | "Or"; /** * The property used by the filter to do a rich filter on rich values. * * @remarks * [Api set: ExcelApi 1.9] */ subField?: string; /** * The set of values to be used as part of `values` filtering. * * @remarks * [Api set: ExcelApi 1.2] */ values?: Array; } /** * Represents how to filter a date when filtering on values. * * @remarks * [Api set: ExcelApi 1.2] */ interface FilterDatetime { /** * The date in ISO8601 format used to filter data. * * @remarks * [Api set: ExcelApi 1.2] */ date: string; /** * How specific the date should be used to keep data. For example, if the date is 2005-04-02 and the specificity is set to "month", the filter operation will keep all rows with a date in the month of April 2005. * * @remarks * [Api set: ExcelApi 1.2] */ specificity: Excel.FilterDatetimeSpecificity | "Year" | "Month" | "Day" | "Hour" | "Minute" | "Second"; } /** * Represents the `AutoFilter` object. AutoFilter turns the values in Excel column into specific filters based on the cell contents. * * @remarks * [Api set: ExcelApi 1.9] */ class AutoFilter extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * An array that holds all the filter criteria in the autofiltered range. * * @remarks * [Api set: ExcelApi 1.9] */ readonly criteria: Excel.FilterCriteria[]; /** * Specifies if the AutoFilter is enabled. * * @remarks * [Api set: ExcelApi 1.9] */ readonly enabled: boolean; /** * Specifies if the AutoFilter has filter criteria. * * @remarks * [Api set: ExcelApi 1.9] */ readonly isDataFiltered: boolean; /** * Applies the AutoFilter to a range. This filters the column if column index and filter criteria are specified. * * @remarks * [Api set: ExcelApi 1.9] * * @param range The range on which the AutoFilter will apply. * @param columnIndex The zero-based column index to which the AutoFilter is applied. * @param criteria The filter criteria. */ apply(range: Range | string, columnIndex?: number, criteria?: Excel.FilterCriteria): void; /** * Clears the column filter criteria of the AutoFilter. * * @remarks * [Api set: ExcelApi 1.14] * * @param columnIndex The zero-based column index, which represents which column filter needs to be cleared. * If the index value is not supported (for example, if the value is a negative number, or if the value is greater than the number of available columns in the range), * then an `InvalidArgument` error will be thrown. */ clearColumnCriteria(columnIndex: number): void; /** * Clears the filter criteria and sort state of the AutoFilter. * * @remarks * [Api set: ExcelApi 1.9] */ clearCriteria(): void; /** * Returns the `Range` object that represents the range to which the AutoFilter applies. * * @remarks * [Api set: ExcelApi 1.9] */ getRange(): Excel.Range; /** * Returns the `Range` object that represents the range to which the AutoFilter applies. If there is no `Range` object associated with the AutoFilter, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] */ getRangeOrNullObject(): Excel.Range; /** * Applies the specified AutoFilter object currently on the range. * * @remarks * [Api set: ExcelApi 1.9] */ reapply(): void; /** * Removes the AutoFilter for the range. * * @remarks * [Api set: ExcelApi 1.9] */ remove(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.AutoFilterLoadOptions): Excel.AutoFilter; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.AutoFilter; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.AutoFilter; /** * 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.AutoFilter object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AutoFilterData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.AutoFilterData; } /** * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. * * @remarks * [Api set: ExcelApi 1.11] */ class CultureInfo extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.12] */ readonly datetimeFormat: Excel.DatetimeFormatInfo; /** * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.11] */ readonly numberFormat: Excel.NumberFormatInfo; /** * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ readonly name: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CultureInfoLoadOptions): Excel.CultureInfo; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CultureInfo; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.CultureInfo; /** * 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.CultureInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CultureInfoData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.CultureInfoData; } /** * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.11] */ class NumberFormatInfo extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the currency symbol for currency values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.17] */ readonly currencySymbol: string; /** * Gets the string used as the decimal separator for numeric values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ readonly numberDecimalSeparator: string; /** * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ readonly numberGroupSeparator: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.NumberFormatInfoLoadOptions): Excel.NumberFormatInfo; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.NumberFormatInfo; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.NumberFormatInfo; /** * 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.NumberFormatInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NumberFormatInfoData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.NumberFormatInfoData; } /** * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.12] */ class DatetimeFormatInfo extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the string used as the date separator. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ readonly dateSeparator: string; /** * Gets the format string for a long date value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ readonly longDatePattern: string; /** * Gets the format string for a long time value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ readonly longTimePattern: string; /** * Gets the format string for a short date value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ readonly shortDatePattern: string; /** * Gets the string used as the time separator. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ readonly timeSeparator: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.DatetimeFormatInfoLoadOptions): Excel.DatetimeFormatInfo; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.DatetimeFormatInfo; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.DatetimeFormatInfo; /** * 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.DatetimeFormatInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DatetimeFormatInfoData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.DatetimeFormatInfoData; } /** * Represents a cell icon. * * @remarks * [Api set: ExcelApi 1.2] */ interface Icon { /** * Specifies the index of the icon in the given set. * * @remarks * [Api set: ExcelApi 1.2] */ index: number; /** * Specifies the set that the icon is part of. * * @remarks * [Api set: ExcelApi 1.2] */ set: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; } /** * A scoped collection of custom XML parts. A scoped collection is the result of some operation (e.g., filtering by namespace). A scoped collection cannot be scoped any further. * * @remarks * [Api set: ExcelApi 1.5] */ class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.CustomXmlPart[]; /** * Gets the number of CustomXML parts in this collection. * * @remarks * [Api set: ExcelApi 1.5] */ getCount(): OfficeExtension.ClientResult; /** * Gets a custom XML part based on its ID. * * @remarks * [Api set: ExcelApi 1.5] * * @param id ID of the object to be retrieved. */ getItem(id: string): Excel.CustomXmlPart; /** * Gets a custom XML part based on its ID. If the `CustomXmlPart` does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.5] * * @param id ID of the object to be retrieved. */ getItemOrNullObject(id: string): Excel.CustomXmlPart; /** * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. * * @remarks * [Api set: ExcelApi 1.5] */ getOnlyItem(): Excel.CustomXmlPart; /** * If the collection contains exactly one item, this method returns it. Otherwise, this method returns `null`. * * @remarks * [Api set: ExcelApi 1.5] */ getOnlyItemOrNullObject(): Excel.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CustomXmlPartScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.CustomXmlPartScopedCollection; /** * 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.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.CustomXmlPartScopedCollectionData; } /** * A collection of custom XML parts. * * @remarks * [Api set: ExcelApi 1.5] */ class CustomXmlPartCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.CustomXmlPart[]; /** * Adds a new custom XML part to the workbook. * * @remarks * [Api set: ExcelApi 1.5] * * @param xml XML content. Must be a valid XML fragment. */ add(xml: string): Excel.CustomXmlPart; /** * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. * * @remarks * [Api set: ExcelApi 1.5] * * @param namespaceUri This must be a fully qualified schema URI; for example, "http://schemas.contoso.com/review/1.0". */ getByNamespace(namespaceUri: string): Excel.CustomXmlPartScopedCollection; /** * Gets the number of custom XML parts in the collection. * * @remarks * [Api set: ExcelApi 1.5] */ getCount(): OfficeExtension.ClientResult; /** * Gets a custom XML part based on its ID. * * @remarks * [Api set: ExcelApi 1.5] * * @param id ID of the object to be retrieved. */ getItem(id: string): Excel.CustomXmlPart; /** * Gets a custom XML part based on its ID. If the `CustomXmlPart` does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.5] * * @param id ID of the object to be retrieved. */ getItemOrNullObject(id: string): Excel.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CustomXmlPartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CustomXmlPartCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.CustomXmlPartCollection; /** * 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.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.CustomXmlPartCollectionData; } /** * Represents a custom XML part object in a workbook. * * @remarks * [Api set: ExcelApi 1.5] */ class CustomXmlPart extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The custom XML part's ID. * * @remarks * [Api set: ExcelApi 1.5] */ readonly id: string; /** * The custom XML part's namespace URI. * * @remarks * [Api set: ExcelApi 1.5] */ readonly namespaceUri: string; /** * Deletes the custom XML part. * * @remarks * [Api set: ExcelApi 1.5] */ delete(): void; /** * Gets the custom XML part's full XML content. * * @remarks * [Api set: ExcelApi 1.5] */ getXml(): OfficeExtension.ClientResult; /** * Sets the custom XML part's full XML content. * * @remarks * [Api set: ExcelApi 1.5] * * @param xml XML content for the part. */ setXml(xml: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CustomXmlPartLoadOptions): Excel.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.CustomXmlPart; /** * 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.CustomXmlPart object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.CustomXmlPartData; } /** * Represents a scoped collection of PivotTables. The PivotTables are sorted based on the location of the PivotTable's top-left corner. They are ordered top-to-bottom and then left-to-right. * * @remarks * [Api set: ExcelApi 1.12] */ class PivotTableScopedCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotTable[]; /** * Gets the number of PivotTables in the collection. * * @remarks * [Api set: ExcelApi 1.12] */ getCount(): OfficeExtension.ClientResult; /** * Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that top-left table is the first PivotTable in the collection. * * @remarks * [Api set: ExcelApi 1.12] */ getFirst(): Excel.PivotTable; /** * Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that the top-left table is the first PivotTable in the collection. If the collection is empty, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.15] */ getFirstOrNullObject(): Excel.PivotTable; /** * Gets a PivotTable by name. * * @remarks * [Api set: ExcelApi 1.12] * * @param key Name of the PivotTable to be retrieved. */ getItem(key: string): Excel.PivotTable; /** * Gets a PivotTable by name. If the PivotTable does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.12] * * @param name Name of the PivotTable to be retrieved. */ getItemOrNullObject(name: string): Excel.PivotTable; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotTableScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotTableScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotTableScopedCollection; /** * 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.PivotTableScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.PivotTableScopedCollectionData; } /** * Represents a collection of all the PivotTables that are part of the workbook or worksheet. * * @remarks * [Api set: ExcelApi 1.3] */ class PivotTableCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotTable[]; /** * Add a PivotTable based on the specified source data and insert it at the top-left cell of the destination range. * * @remarks * [Api set: ExcelApi 1.8] * * @param name The name of the new PivotTable. * @param source The source data for the new PivotTable, this can either be a range (or string address including the worksheet name) or a table. * @param destination The cell in the upper-left corner of the PivotTable report's destination range (the range on the worksheet where the resulting report will be placed). * @returns Returns the newly inserted PivotTable. */ add(name: string, source: Range | string | Table, destination: Range | string): Excel.PivotTable; /** * Gets the number of pivot tables in the collection. * * @remarks * [Api set: ExcelApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a PivotTable by name. * * @remarks * [Api set: ExcelApi 1.3] * * @param name Name of the PivotTable to be retrieved. */ getItem(name: string): Excel.PivotTable; /** * Gets a PivotTable by name. If the PivotTable does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] * * @param name Name of the PivotTable to be retrieved. */ getItemOrNullObject(name: string): Excel.PivotTable; /** * Refreshes all the pivot tables in the collection. * * @remarks * [Api set: ExcelApi 1.3] */ refreshAll(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotTableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotTableCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotTableCollection; /** * 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.PivotTableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.PivotTableCollectionData; } /** * Represents an Excel PivotTable. To learn more about the PivotTable object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | Work with PivotTables using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.3] */ class PivotTable extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The Column Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ readonly columnHierarchies: Excel.RowColumnPivotHierarchyCollection; /** * The Data Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ readonly dataHierarchies: Excel.DataPivotHierarchyCollection; /** * The Filter Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ readonly filterHierarchies: Excel.FilterPivotHierarchyCollection; /** * The Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ readonly hierarchies: Excel.PivotHierarchyCollection; /** * The PivotLayout describing the layout and visual structure of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ readonly layout: Excel.PivotLayout; /** * The Row Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ readonly rowHierarchies: Excel.RowColumnPivotHierarchyCollection; /** * The worksheet containing the current PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ readonly worksheet: Excel.Worksheet; /** * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. * * @remarks * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * * @remarks * [Api set: ExcelApi 1.9] */ enableDataValueEditing: boolean; /** * ID of the PivotTable. * * @remarks * [Api set: ExcelApi 1.5] */ readonly id: string; /** * Name of the PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ name: string; /** * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. * * @remarks * [Api set: ExcelApi 1.13] */ refreshOnOpen: boolean; /** * Specifies if the PivotTable uses custom lists when sorting. * * @remarks * [Api set: ExcelApi 1.9] */ useCustomSortLists: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PivotTableUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PivotTable): void; /** * Deletes the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ delete(): void; /** * Returns the string representation of the data source for the PivotTable. This method currently supports string representations for table and range objects. Otherwise, it returns an empty string. * * @remarks * [Api set: ExcelApi 1.15] */ getDataSourceString(): OfficeExtension.ClientResult; /** * Gets the type of the data source for the PivotTable. * * @remarks * [Api set: ExcelApi 1.15] */ getDataSourceType(): OfficeExtension.ClientResult; /** * Refreshes the PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ refresh(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotTableLoadOptions): Excel.PivotTable; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotTable; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PivotTable; /** * 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.PivotTable object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PivotTableData; } /** * Represents the visual layout of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ class PivotLayout extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The alt text description of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextDescription: string; /** * The alt text title of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextTitle: string; /** * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. * * @remarks * [Api set: ExcelApi 1.9] */ autoFormat: boolean; /** * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. By default, this is an empty string. * * @remarks * [Api set: ExcelApi 1.13] */ emptyCellText: string; /** * Specifies if the field list can be shown in the UI. * * @remarks * [Api set: ExcelApi 1.10] */ enableFieldList: boolean; /** * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. Note that the value of `emptyCellText` persists when this property is set to `false`. * * @remarks * [Api set: ExcelApi 1.13] */ fillEmptyCells: boolean; /** * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. * * @remarks * [Api set: ExcelApi 1.8] */ layoutType: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; /** * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * @remarks * [Api set: ExcelApi 1.9] */ preserveFormatting: boolean; /** * Specifies if the PivotTable report shows grand totals for columns. * * @remarks * [Api set: ExcelApi 1.8] */ showColumnGrandTotals: boolean; /** * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). * * @remarks * [Api set: ExcelApi 1.13] */ showFieldHeaders: boolean; /** * Specifies if the PivotTable report shows grand totals for rows. * * @remarks * [Api set: ExcelApi 1.8] */ showRowGrandTotals: boolean; /** * This property indicates the `SubtotalLocationType` of all fields on the PivotTable. If fields have different states, this will be `null`. * * @remarks * [Api set: ExcelApi 1.8] */ subtotalLocation: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PivotLayoutUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PivotLayout): void; /** * Sets whether or not to display a blank line after each item. This is set at the global level for the PivotTable and applied to individual PivotFields. This function overwrites the setting for all fields in the PivotTable to the value of `display` parameter. * * @remarks * [Api set: ExcelApi 1.13] * * @param display True turns on the blank-line display setting. False turns it off. */ displayBlankLineAfterEachItem(display: boolean): void; /** * Returns the range where the PivotTable's column labels reside. * * @remarks * [Api set: ExcelApi 1.8] */ getColumnLabelRange(): Excel.Range; /** * Returns the range where the PivotTable's data values reside. * * @remarks * [Api set: ExcelApi 1.8] */ getDataBodyRange(): Excel.Range; /** * Gets the DataHierarchy that is used to calculate the value in a specified range within the PivotTable. * * @remarks * [Api set: ExcelApi 1.9] * * @param cell A single cell within the PivotTable data body. * @returns The DataPivotHierarchy object used to calculate the value in the specified cell. */ getDataHierarchy(cell: Range | string): Excel.DataPivotHierarchy; /** * Returns the range of the PivotTable's filter area. * * @remarks * [Api set: ExcelApi 1.8] */ getFilterAxisRange(): Excel.Range; /** * Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable. * * @remarks * [Api set: ExcelApi 1.9] * * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." * @param cell A single cell within the PivotTable's data body. * @returns A PivotItemCollection of the PivotItems that are used to calculate the values in the specified row. */ getPivotItems(axis: Excel.PivotAxis, cell: Range | string): Excel.PivotItemCollection; /** * Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable. * * @remarks * [Api set: ExcelApi 1.9] * * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." * @param cell A single cell within the PivotTable's data body. * @returns A PivotItemCollection of the PivotItems that are used to calculate the values in the specified row. */ getPivotItems(axis: "Unknown" | "Row" | "Column" | "Data" | "Filter", cell: Range | string): Excel.PivotItemCollection; /** * Returns the range the PivotTable exists on, excluding the filter area. * * @remarks * [Api set: ExcelApi 1.8] */ getRange(): Excel.Range; /** * Returns the range where the PivotTable's row labels reside. * * @remarks * [Api set: ExcelApi 1.8] */ getRowLabelRange(): Excel.Range; /** * Sets the "repeat all item labels" setting across all fields in the PivotTable. * * @remarks * [Api set: ExcelApi 1.13] * * @param repeatLabels True turns on the label-repetition display setting. False turns it off. */ repeatAllItemLabels(repeatLabels: boolean): void; /** * Sets the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. * * @remarks * [Api set: ExcelApi 1.9] * * @param cell A single cell to use get the criteria from for applying the autosort. * @param sortBy The direction of the sort. */ setAutoSortOnCell(cell: Range | string, sortBy: Excel.SortBy): void; /** * Sets the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. * * @remarks * [Api set: ExcelApi 1.9] * * @param cell A single cell to use get the criteria from for applying the autosort. * @param sortBy The direction of the sort. */ setAutoSortOnCell(cell: Range | string, sortBy: "Ascending" | "Descending"): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotLayoutLoadOptions): Excel.PivotLayout; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotLayout; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PivotLayout; /** * 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.PivotLayout object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotLayoutData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PivotLayoutData; } /** * Represents a collection of all the PivotHierarchies that are part of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ class PivotHierarchyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotHierarchy[]; /** * Gets the number of pivot hierarchies in the collection. * * @remarks * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * Gets a PivotHierarchy by its name or ID. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the PivotHierarchy to be retrieved. */ getItem(name: string): Excel.PivotHierarchy; /** * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the PivotHierarchy to be retrieved. */ getItemOrNullObject(name: string): Excel.PivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotHierarchyCollection; /** * 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.PivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.PivotHierarchyCollectionData; } /** * Represents the Excel PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ class PivotHierarchy extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the PivotFields associated with the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly fields: Excel.PivotFieldCollection; /** * ID of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly id: string; /** * Name of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PivotHierarchy): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotHierarchyLoadOptions): Excel.PivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PivotHierarchy; /** * 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.PivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PivotHierarchyData; } /** * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ class RowColumnPivotHierarchyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.RowColumnPivotHierarchy[]; /** * Adds the PivotHierarchy to the current axis. If the hierarchy is present elsewhere on the row, column, or filter axis, it will be removed from that location. * * @remarks * [Api set: ExcelApi 1.8] */ add(pivotHierarchy: Excel.PivotHierarchy): Excel.RowColumnPivotHierarchy; /** * Gets the number of pivot hierarchies in the collection. * * @remarks * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * Gets a RowColumnPivotHierarchy by its name or ID. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the RowColumnPivotHierarchy to be retrieved. */ getItem(name: string): Excel.RowColumnPivotHierarchy; /** * Gets a RowColumnPivotHierarchy by name. If the RowColumnPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the RowColumnPivotHierarchy to be retrieved. */ getItemOrNullObject(name: string): Excel.RowColumnPivotHierarchy; /** * Removes the PivotHierarchy from the current axis. * * @remarks * [Api set: ExcelApi 1.8] */ remove(rowColumnPivotHierarchy: Excel.RowColumnPivotHierarchy): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RowColumnPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RowColumnPivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RowColumnPivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RowColumnPivotHierarchyCollection; /** * 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.RowColumnPivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RowColumnPivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.RowColumnPivotHierarchyCollectionData; } /** * Represents the Excel RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ class RowColumnPivotHierarchy extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the PivotFields associated with the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly fields: Excel.PivotFieldCollection; /** * ID of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly id: string; /** * Name of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name: string; /** * Position of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RowColumnPivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.RowColumnPivotHierarchy): void; /** * Reset the RowColumnPivotHierarchy back to its default values. * * @remarks * [Api set: ExcelApi 1.8] */ setToDefault(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RowColumnPivotHierarchyLoadOptions): Excel.RowColumnPivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RowColumnPivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.RowColumnPivotHierarchy; /** * 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.RowColumnPivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RowColumnPivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.RowColumnPivotHierarchyData; } /** * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ class FilterPivotHierarchyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.FilterPivotHierarchy[]; /** * Adds the PivotHierarchy to the current axis. If the hierarchy is present elsewhere on the row, column, or filter axis, it will be removed from that location. * * @remarks * [Api set: ExcelApi 1.8] */ add(pivotHierarchy: Excel.PivotHierarchy): Excel.FilterPivotHierarchy; /** * Gets the number of pivot hierarchies in the collection. * * @remarks * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * Gets a FilterPivotHierarchy by its name or ID. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the FilterPivotHierarchy to be retrieved. */ getItem(name: string): Excel.FilterPivotHierarchy; /** * Gets a FilterPivotHierarchy by name. If the FilterPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the FilterPivotHierarchy to be retrieved. */ getItemOrNullObject(name: string): Excel.FilterPivotHierarchy; /** * Removes the PivotHierarchy from the current axis. * * @remarks * [Api set: ExcelApi 1.8] */ remove(filterPivotHierarchy: Excel.FilterPivotHierarchy): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.FilterPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.FilterPivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.FilterPivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.FilterPivotHierarchyCollection; /** * 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.FilterPivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FilterPivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.FilterPivotHierarchyCollectionData; } /** * Represents the Excel FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ class FilterPivotHierarchy extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the PivotFields associated with the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly fields: Excel.PivotFieldCollection; /** * Determines whether to allow multiple filter items. * * @remarks * [Api set: ExcelApi 1.8] */ enableMultipleFilterItems: boolean; /** * ID of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly id: string; /** * Name of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name: string; /** * Position of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.FilterPivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.FilterPivotHierarchy): void; /** * Reset the FilterPivotHierarchy back to its default values. * * @remarks * [Api set: ExcelApi 1.8] */ setToDefault(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.FilterPivotHierarchyLoadOptions): Excel.FilterPivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.FilterPivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.FilterPivotHierarchy; /** * 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.FilterPivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FilterPivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.FilterPivotHierarchyData; } /** * Represents a collection of DataPivotHierarchy items associated with the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ class DataPivotHierarchyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.DataPivotHierarchy[]; /** * Adds the PivotHierarchy to the current axis. * * @remarks * [Api set: ExcelApi 1.8] */ add(pivotHierarchy: Excel.PivotHierarchy): Excel.DataPivotHierarchy; /** * Gets the number of pivot hierarchies in the collection. * * @remarks * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * Gets a DataPivotHierarchy by its name or ID. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the DataPivotHierarchy to be retrieved. */ getItem(name: string): Excel.DataPivotHierarchy; /** * Gets a DataPivotHierarchy by name. If the DataPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the DataPivotHierarchy to be retrieved. */ getItemOrNullObject(name: string): Excel.DataPivotHierarchy; /** * Removes the PivotHierarchy from the current axis. * * @remarks * [Api set: ExcelApi 1.8] */ remove(DataPivotHierarchy: Excel.DataPivotHierarchy): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.DataPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DataPivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.DataPivotHierarchyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.DataPivotHierarchyCollection; /** * 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.DataPivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataPivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.DataPivotHierarchyCollectionData; } /** * Represents the Excel DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ class DataPivotHierarchy extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the PivotFields associated with the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly field: Excel.PivotField; /** * ID of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ readonly id: string; /** * Name of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name: string; /** * Number format of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat: string; /** * Position of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position: number; /** * Specifies if the data should be shown as a specific summary calculation. * * @remarks * [Api set: ExcelApi 1.8] */ showAs: Excel.ShowAsRule; /** * Specifies if all items of the DataPivotHierarchy are shown. * * @remarks * [Api set: ExcelApi 1.8] */ summarizeBy: Excel.AggregationFunction | "Unknown" | "Automatic" | "Sum" | "Count" | "Average" | "Max" | "Min" | "Product" | "CountNumbers" | "StandardDeviation" | "StandardDeviationP" | "Variance" | "VarianceP"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DataPivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.DataPivotHierarchy): void; /** * Reset the DataPivotHierarchy back to its default values. * * @remarks * [Api set: ExcelApi 1.8] */ setToDefault(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.DataPivotHierarchyLoadOptions): Excel.DataPivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.DataPivotHierarchy; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.DataPivotHierarchy; /** * 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.DataPivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataPivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.DataPivotHierarchyData; } /** * @remarks * [Api set: ExcelApi 1.8] */ interface ShowAsRule { /** * The PivotField to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. * * @remarks * [Api set: ExcelApi 1.8] */ baseField?: Excel.PivotField; /** * The item to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. * * @remarks * [Api set: ExcelApi 1.8] */ baseItem?: Excel.PivotItem; /** * The `ShowAs` calculation to use for the PivotField. See `Excel.ShowAsCalculation` for details. * * @remarks * [Api set: ExcelApi 1.8] */ calculation: Excel.ShowAsCalculation | "Unknown" | "None" | "PercentOfGrandTotal" | "PercentOfRowTotal" | "PercentOfColumnTotal" | "PercentOfParentRowTotal" | "PercentOfParentColumnTotal" | "PercentOfParentTotal" | "PercentOf" | "RunningTotal" | "PercentRunningTotal" | "DifferenceFrom" | "PercentDifferenceFrom" | "RankAscending" | "RankDecending" | "Index"; } /** * Represents a collection of all the PivotFields that are part of a PivotTable's hierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ class PivotFieldCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotField[]; /** * Gets the number of pivot fields in the collection. * * @remarks * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * Gets a PivotField by its name or ID. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the PivotField to be retrieved. */ getItem(name: string): Excel.PivotField; /** * Gets a PivotField by name. If the PivotField does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the PivotField to be retrieved. */ getItemOrNullObject(name: string): Excel.PivotField; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotFieldCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotFieldCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotFieldCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotFieldCollection; /** * 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.PivotFieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotFieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.PivotFieldCollectionData; } /** * Represents the Excel PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ class PivotField extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the PivotItems associated with the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ readonly items: Excel.PivotItemCollection; /** * ID of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ readonly id: string; /** * Name of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ name: string; /** * Determines whether to show all items of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ showAllItems: boolean; /** * Subtotals of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ subtotals: Excel.Subtotals; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PivotFieldUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PivotField): void; /** * Sets one or more of the field's current PivotFilters and applies them to the field. If the provided filters are invalid or cannot be applied, an exception is thrown. * * @remarks * [Api set: ExcelApi 1.12] * * @param filter A configured specific PivotFilter, or a PivotFilters interface containing multiple configured filters. */ applyFilter(filter: Excel.PivotFilters): void; /** * Clears all criteria from all of the field's filters. This removes any active filtering on the field. * * @remarks * [Api set: ExcelApi 1.12] */ clearAllFilters(): void; /** * Clears all existing criteria from the field's filter of the given type (if one is currently applied). * * @remarks * [Api set: ExcelApi 1.12] * * @param filterType The type of filter on the field of which to clear all criteria. */ clearFilter(filterType: Excel.PivotFilterType): void; /** * Clears all existing criteria from the field's filter of the given type (if one is currently applied). * * @remarks * [Api set: ExcelApi 1.12] * * @param filterType The type of filter on the field of which to clear all criteria. */ clearFilter(filterType: "Unknown" | "Value" | "Manual" | "Label" | "Date"): void; /** * Gets all filters currently applied on the field. * * @remarks * [Api set: ExcelApi 1.12] * @returns A PivotFilters interface with all active filters. */ getFilters(): OfficeExtension.ClientResult; /** * Checks if there are any applied filters on the field. * * @remarks * [Api set: ExcelApi 1.12] * * @param filterType The filter type to check. If no type is provided, this method will check if any filter is applied. * @returns True if the field has a filter of type `filterType` applied. If `filterType` is not specified, `true` is returned if the field has any applied filters. */ isFiltered(filterType?: Excel.PivotFilterType): OfficeExtension.ClientResult; /** * Checks if there are any applied filters on the field. * * @remarks * [Api set: ExcelApi 1.12] * * @param filterType The filter type to check. If no type is provided, this method will check if any filter is applied. * @returns True if the field has a filter of type `filterType` applied. If `filterType` is not specified, `true` is returned if the field has any applied filters. */ isFiltered(filterType?: "Unknown" | "Value" | "Manual" | "Label" | "Date"): OfficeExtension.ClientResult; /** * Sorts the PivotField. If a DataPivotHierarchy is specified, then sort will be applied based on it, if not sort will be based on the PivotField itself. * * @remarks * [Api set: ExcelApi 1.8] * * @param sortBy Specifies if the sorting is done in ascending or descending order. */ sortByLabels(sortBy: SortBy): void; /** * Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when there are multiple values from the same DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.9] * * @param sortBy Specifies if the sorting is done in ascending or descending order. * @param valuesHierarchy Specifies the values hierarchy on the data axis to be used for sorting. * @param pivotItemScope The items that should be used for the scope of the sorting. These will be the * items that make up the row or column that you want to sort on. If a string is used instead of a PivotItem, * the string represents the ID of the PivotItem. If there are no items other than data hierarchy on the axis * you want to sort on, this can be empty. */ sortByValues(sortBy: Excel.SortBy, valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; /** * Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when there are multiple values from the same DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.9] * * @param sortBy Specifies if the sorting is done in ascending or descending order. * @param valuesHierarchy Specifies the values hierarchy on the data axis to be used for sorting. * @param pivotItemScope The items that should be used for the scope of the sorting. These will be the * items that make up the row or column that you want to sort on. If a string is used instead of a PivotItem, * the string represents the ID of the PivotItem. If there are no items other than data hierarchy on the axis * you want to sort on, this can be empty. */ sortByValues(sortBy: "Ascending" | "Descending", valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotFieldLoadOptions): Excel.PivotField; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotField; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PivotField; /** * 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.PivotField object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotFieldData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PivotFieldData; } /** * Represents a collection of all the PivotItems related to their parent PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ class PivotItemCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotItem[]; /** * Gets the number of PivotItems in the collection. * * @remarks * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * Gets a PivotItem by its name or ID. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the PivotItem to be retrieved. */ getItem(name: string): Excel.PivotItem; /** * Gets a PivotItem by name. If the PivotItem does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.8] * * @param name Name of the PivotItem to be retrieved. */ getItemOrNullObject(name: string): Excel.PivotItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotItemCollection; /** * 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.PivotItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.PivotItemCollectionData; } /** * Represents the Excel PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ class PivotItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * ID of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ readonly id: string; /** * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. * * @remarks * [Api set: ExcelApi 1.8] */ isExpanded: boolean; /** * Name of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ name: string; /** * Specifies if the PivotItem is visible. * * @remarks * [Api set: ExcelApi 1.8] */ visible: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PivotItemUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PivotItem): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotItemLoadOptions): Excel.PivotItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PivotItem; /** * 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.PivotItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotItemData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PivotItemData; } /** * Subtotals for the Pivot Field. * * @remarks * [Api set: ExcelApi 1.8] */ interface Subtotals { /** * If `Automatic` is set to `true`, then all other values will be ignored when setting the `Subtotals`. * * @remarks * [Api set: ExcelApi 1.8] */ automatic?: boolean; average?: boolean; count?: boolean; countNumbers?: boolean; max?: boolean; min?: boolean; product?: boolean; standardDeviation?: boolean; standardDeviationP?: boolean; sum?: boolean; variance?: boolean; varianceP?: boolean; } /** * Represents the criteria for the top/bottom values filter. * * @remarks * [Api set: ExcelApi 1.9] */ enum PivotFilterTopBottomCriterion { /** * @remarks * [Api set: ExcelApi 1.9] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.9] */ topItems = "TopItems", /** * @remarks * [Api set: ExcelApi 1.9] */ topPercent = "TopPercent", /** * @remarks * [Api set: ExcelApi 1.9] */ topSum = "TopSum", /** * @remarks * [Api set: ExcelApi 1.9] */ bottomItems = "BottomItems", /** * @remarks * [Api set: ExcelApi 1.9] */ bottomPercent = "BottomPercent", /** * @remarks * [Api set: ExcelApi 1.9] */ bottomSum = "BottomSum" } /** * Represents the sort direction. * * @remarks * [Api set: ExcelApi 1.8] */ enum SortBy { /** * Ascending sort. Smallest to largest or A to Z. * @remarks * [Api set: ExcelApi 1.8] */ ascending = "Ascending", /** * Descending sort. Largest to smallest or Z to A. * @remarks * [Api set: ExcelApi 1.8] */ descending = "Descending" } /** * Aggregation function for the `DataPivotHierarchy`. * * @remarks * [Api set: ExcelApi 1.8] */ enum AggregationFunction { /** * Aggregation function is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.8] */ unknown = "Unknown", /** * Excel will automatically select the aggregation based on the data items. * @remarks * [Api set: ExcelApi 1.8] */ automatic = "Automatic", /** * Aggregate using the sum of the data, equivalent to the SUM function. * @remarks * [Api set: ExcelApi 1.8] */ sum = "Sum", /** * Aggregate using the count of items in the data, equivalent to the COUNTA function. * @remarks * [Api set: ExcelApi 1.8] */ count = "Count", /** * Aggregate using the average of the data, equivalent to the AVERAGE function. * @remarks * [Api set: ExcelApi 1.8] */ average = "Average", /** * Aggregate using the maximum value of the data, equivalent to the MAX function. * @remarks * [Api set: ExcelApi 1.8] */ max = "Max", /** * Aggregate using the minimum value of the data, equivalent to the MIN function. * @remarks * [Api set: ExcelApi 1.8] */ min = "Min", /** * Aggregate using the product of the data, equivalent to the PRODUCT function. * @remarks * [Api set: ExcelApi 1.8] */ product = "Product", /** * Aggregate using the count of numbers in the data, equivalent to the COUNT function. * @remarks * [Api set: ExcelApi 1.8] */ countNumbers = "CountNumbers", /** * Aggregate using the standard deviation of the data, equivalent to the STDEV function. * @remarks * [Api set: ExcelApi 1.8] */ standardDeviation = "StandardDeviation", /** * Aggregate using the standard deviation of the data, equivalent to the STDEVP function. * @remarks * [Api set: ExcelApi 1.8] */ standardDeviationP = "StandardDeviationP", /** * Aggregate using the variance of the data, equivalent to the VAR function. * @remarks * [Api set: ExcelApi 1.8] */ variance = "Variance", /** * Aggregate using the variance of the data, equivalent to the VARP function. * @remarks * [Api set: ExcelApi 1.8] */ varianceP = "VarianceP" } /** * The ShowAs calculation function for the DataPivotField. * * @remarks * [Api set: ExcelApi 1.8] */ enum ShowAsCalculation { /** * Calculation is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.8] */ unknown = "Unknown", /** * No calculation is applied. * @remarks * [Api set: ExcelApi 1.8] */ none = "None", /** * Percent of the grand total. * @remarks * [Api set: ExcelApi 1.8] */ percentOfGrandTotal = "PercentOfGrandTotal", /** * Percent of the row total. * @remarks * [Api set: ExcelApi 1.8] */ percentOfRowTotal = "PercentOfRowTotal", /** * Percent of the column total. * @remarks * [Api set: ExcelApi 1.8] */ percentOfColumnTotal = "PercentOfColumnTotal", /** * Percent of the row total for the specified Base field. * @remarks * [Api set: ExcelApi 1.8] */ percentOfParentRowTotal = "PercentOfParentRowTotal", /** * Percent of the column total for the specified Base field. * @remarks * [Api set: ExcelApi 1.8] */ percentOfParentColumnTotal = "PercentOfParentColumnTotal", /** * Percent of the grand total for the specified Base field. * @remarks * [Api set: ExcelApi 1.8] */ percentOfParentTotal = "PercentOfParentTotal", /** * Percent of the specified Base field and Base item. * @remarks * [Api set: ExcelApi 1.8] */ percentOf = "PercentOf", /** * Running total of the specified Base field. * @remarks * [Api set: ExcelApi 1.8] */ runningTotal = "RunningTotal", /** * Percent running total of the specified Base field. * @remarks * [Api set: ExcelApi 1.8] */ percentRunningTotal = "PercentRunningTotal", /** * Difference from the specified Base field and Base item. * @remarks * [Api set: ExcelApi 1.8] */ differenceFrom = "DifferenceFrom", /** * Difference from the specified Base field and Base item. * @remarks * [Api set: ExcelApi 1.8] */ percentDifferenceFrom = "PercentDifferenceFrom", /** * Ascending rank of the specified Base field. * @remarks * [Api set: ExcelApi 1.8] */ rankAscending = "RankAscending", /** * Descending rank of the specified Base field. * @remarks * [Api set: ExcelApi 1.8] */ rankDecending = "RankDecending", /** * Calculates the values as follows: ((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total)) * @remarks * [Api set: ExcelApi 1.8] */ index = "Index" } /** * Represents the axis from which to get the PivotItems. * * @remarks * [Api set: ExcelApi 1.9] */ enum PivotAxis { /** * The axis or region is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.9] */ unknown = "Unknown", /** * The row axis. * @remarks * [Api set: ExcelApi 1.9] */ row = "Row", /** * The column axis. * @remarks * [Api set: ExcelApi 1.9] */ column = "Column", /** * The data axis. * @remarks * [Api set: ExcelApi 1.9] */ data = "Data", /** * The filter axis. * @remarks * [Api set: ExcelApi 1.9] */ filter = "Filter" } /** * Represents a worksheet-level custom property. * * @remarks * [Api set: ExcelApi 1.12] */ class WorksheetCustomProperty extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) * * @remarks * [Api set: ExcelApi 1.12] */ readonly key: string; /** * Gets or sets the value of the custom property. * * @remarks * [Api set: ExcelApi 1.12] */ value: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.WorksheetCustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.WorksheetCustomProperty): void; /** * Deletes the custom property. * * @remarks * [Api set: ExcelApi 1.12] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorksheetCustomPropertyLoadOptions): Excel.WorksheetCustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.WorksheetCustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.WorksheetCustomProperty; /** * 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.WorksheetCustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.WorksheetCustomPropertyData; } /** * Contains the collection of worksheet-level custom property. * * @remarks * [Api set: ExcelApi 1.12] */ class WorksheetCustomPropertyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.WorksheetCustomProperty[]; /** * Adds a new custom property that maps to the provided key. This overwrites existing custom properties with that key. * * @remarks * [Api set: ExcelApi 1.12] * * @param key The key that identifies the custom property object. It is case-insensitive.The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) * @param value The value of this custom property. */ add(key: string, value: string): Excel.WorksheetCustomProperty; /** * Gets the number of custom properties on this worksheet. * * @remarks * [Api set: ExcelApi 1.12] */ getCount(): OfficeExtension.ClientResult; /** * Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. * * @remarks * [Api set: ExcelApi 1.12] * * @param key The key that identifies the custom property object. It is case-insensitive. */ getItem(key: string): Excel.WorksheetCustomProperty; /** * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.12] * * @param key The key that identifies the custom property object. It is case-insensitive. */ getItemOrNullObject(key: string): Excel.WorksheetCustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.WorksheetCustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCustomPropertyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.WorksheetCustomPropertyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.WorksheetCustomPropertyCollection; /** * 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.WorksheetCustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.WorksheetCustomPropertyCollectionData; } /** * Represents workbook properties. * * @remarks * [Api set: ExcelApi 1.7] */ class DocumentProperties extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of custom properties of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ readonly custom: Excel.CustomPropertyCollection; /** * The author of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ author: string; /** * The category of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ category: string; /** * The comments of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ comments: string; /** * The company of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ company: string; /** * Gets the creation date of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ readonly creationDate: Date; /** * The keywords of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ keywords: string; /** * Gets the last author of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ readonly lastAuthor: string; /** * The manager of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ manager: string; /** * Gets the revision number of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ revisionNumber: number; /** * The subject of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ subject: string; /** * The title of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ title: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.DocumentProperties): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.DocumentPropertiesLoadOptions): Excel.DocumentProperties; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.DocumentProperties; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.DocumentProperties; /** * 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.DocumentProperties object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.DocumentPropertiesData; } /** * Represents a custom property. * * @remarks * [Api set: ExcelApi 1.7] */ class CustomProperty extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ readonly key: string; /** * The type of the value used for the custom property. * * @remarks * [Api set: ExcelApi 1.7] */ readonly type: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; /** * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ value: any; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.CustomProperty): void; /** * Deletes the custom property. * * @remarks * [Api set: ExcelApi 1.7] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CustomPropertyLoadOptions): Excel.CustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.CustomProperty; /** * 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.CustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.CustomPropertyData; } /** * Contains the collection of custom properties. * * @remarks * [Api set: ExcelApi 1.7] */ class CustomPropertyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.CustomProperty[]; /** * Creates a new or sets an existing custom property. * * @remarks * [Api set: ExcelApi 1.7] * * @param key Required. The custom property's key, which is case-insensitive. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). * @param value Required. The custom property's value. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). */ add(key: string, value: any): Excel.CustomProperty; /** * Deletes all custom properties in this collection. * * @remarks * [Api set: ExcelApi 1.7] */ deleteAll(): void; /** * Gets the count of custom properties. * * @remarks * [Api set: ExcelApi 1.7] */ getCount(): OfficeExtension.ClientResult; /** * Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. * * @remarks * [Api set: ExcelApi 1.7] * * @param key The key that identifies the custom property object. */ getItem(key: string): Excel.CustomProperty; /** * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.7] * * @param key Required. The key that identifies the custom property object. */ getItemOrNullObject(key: string): Excel.CustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomPropertyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CustomPropertyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.CustomPropertyCollection; /** * 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.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.CustomPropertyCollectionData; } /** * Represents a collection of all the conditional formats that are overlap the range. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalFormatCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ConditionalFormat[]; /** * Adds a new conditional format to the collection at the first/top priority. * * @remarks * [Api set: ExcelApi 1.6] * * @param type The type of conditional format being added. See `Excel.ConditionalFormatType` for details. */ add(type: Excel.ConditionalFormatType): Excel.ConditionalFormat; /** * Adds a new conditional format to the collection at the first/top priority. * * @remarks * [Api set: ExcelApi 1.6] * * @param type The type of conditional format being added. See `Excel.ConditionalFormatType` for details. */ add(type: "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"): Excel.ConditionalFormat; /** * Clears all conditional formats active on the current specified range. * * @remarks * [Api set: ExcelApi 1.6] */ clearAll(): void; /** * Returns the number of conditional formats in the workbook. * * @remarks * [Api set: ExcelApi 1.6] */ getCount(): OfficeExtension.ClientResult; /** * Returns a conditional format for the given ID. * * @remarks * [Api set: ExcelApi 1.6] * * @param id The ID of the conditional format. * @returns Conditional format object. */ getItem(id: string): Excel.ConditionalFormat; /** * Returns a conditional format at the given index. * * @remarks * [Api set: ExcelApi 1.6] * * @param index Index of the conditional formats to be retrieved. */ getItemAt(index: number): Excel.ConditionalFormat; /** * Returns a conditional format identified by its ID. If the conditional format object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] * * @param id The ID of the conditional format. */ getItemOrNullObject(id: string): Excel.ConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalFormatCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalFormatCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalFormatCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ConditionalFormatCollection; /** * 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.ConditionalFormatCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalFormatCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ConditionalFormatCollectionData; } /** * An object encapsulating a conditional format's range, format, rule, and other properties. To learn more about the conditional formatting object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-conditional-formatting | Apply conditional formatting to Excel ranges}. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly cellValue: Excel.CellValueConditionalFormat; /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly cellValueOrNullObject: Excel.CellValueConditionalFormat; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly colorScale: Excel.ColorScaleConditionalFormat; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly colorScaleOrNullObject: Excel.ColorScaleConditionalFormat; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly custom: Excel.CustomConditionalFormat; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly customOrNullObject: Excel.CustomConditionalFormat; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ readonly dataBar: Excel.DataBarConditionalFormat; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ readonly dataBarOrNullObject: Excel.DataBarConditionalFormat; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly iconSet: Excel.IconSetConditionalFormat; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ readonly iconSetOrNullObject: Excel.IconSetConditionalFormat; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ readonly preset: Excel.PresetCriteriaConditionalFormat; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ readonly presetOrNullObject: Excel.PresetCriteriaConditionalFormat; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ readonly textComparison: Excel.TextConditionalFormat; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ readonly textComparisonOrNullObject: Excel.TextConditionalFormat; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ readonly topBottom: Excel.TopBottomConditionalFormat; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ readonly topBottomOrNullObject: Excel.TopBottomConditionalFormat; /** * The priority of the conditional format in the current `ConditionalFormatCollection`. * * @remarks * [Api set: ExcelApi 1.6] */ readonly id: string; /** * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than the bounds will get and set to the maximum (or minimum if negative) priority. Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. * * @remarks * [Api set: ExcelApi 1.6] */ priority: number; /** * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. * * @remarks * [Api set: ExcelApi 1.6] */ stopIfTrue: boolean; /** * A type of conditional format. Only one can be set at a time. * * @remarks * [Api set: ExcelApi 1.6] */ readonly type: Excel.ConditionalFormatType | "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalFormat): void; /** * Change the conditional format rule type to cell value. * * @remarks * [Api set: ExcelApi 1.17] * * @param properties The properties to set for the cell value conditional format rule. */ changeRuleToCellValue(properties: Excel.ConditionalCellValueRule): void; /** * Change the conditional format rule type to color scale. * * @remarks * [Api set: ExcelApi 1.17] */ changeRuleToColorScale(): void; /** * Change the conditional format rule type to text comparison. * * @remarks * [Api set: ExcelApi 1.17] * * @param properties The properties to set for the text comparison conditional format rule. */ changeRuleToContainsText(properties: Excel.ConditionalTextComparisonRule): void; /** * Change the conditional format rule type to custom. * * @remarks * [Api set: ExcelApi 1.17] * * @param formula The formula to set for the custom conditional format rule. */ changeRuleToCustom(formula: string): void; /** * Change the conditional format rule type to data bar. * * @remarks * [Api set: ExcelApi 1.17] */ changeRuleToDataBar(): void; /** * Change the conditional format rule type to icon set. * * @remarks * [Api set: ExcelApi 1.17] */ changeRuleToIconSet(): void; /** * Change the conditional format rule type to preset criteria. * * @remarks * [Api set: ExcelApi 1.17] * * @param properties The properties to set for the preset criteria conditional format rule. */ changeRuleToPresetCriteria(properties: Excel.ConditionalPresetCriteriaRule): void; /** * Change the conditional format rule type to top/bottom. * * @remarks * [Api set: ExcelApi 1.17] * * @param properties The properties to set for the top/bottom conditional format rule. */ changeRuleToTopBottom(properties: Excel.ConditionalTopBottomRule): void; /** * Deletes this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ delete(): void; /** * Returns the range the conditonal format is applied to. Throws an error if the conditional format is applied to multiple ranges. * * @remarks * [Api set: ExcelApi 1.6] */ getRange(): Excel.Range; /** * Returns the range to which the conditonal format is applied. If the conditional format is applied to multiple ranges, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.6] */ getRangeOrNullObject(): Excel.Range; /** * Returns the `RangeAreas`, comprising one or more rectangular ranges, to which the conditonal format is applied. * * @remarks * [Api set: ExcelApi 1.9] */ getRanges(): Excel.RangeAreas; /** * Set the ranges that the conditonal format rule is applied to. * * @remarks * [Api set: ExcelApi 1.17] * * @param ranges Collection of one or more ranges for this rule to be applied to. */ setRanges(ranges: Range | RangeAreas | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalFormatLoadOptions): Excel.ConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalFormat; /** * 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.ConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalFormatData; } /** * Represents an Excel conditional data bar type. * * @remarks * [Api set: ExcelApi 1.6] */ class DataBarConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Representation of all values to the left of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ readonly negativeFormat: Excel.ConditionalDataBarNegativeFormat; /** * Representation of all values to the right of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ readonly positiveFormat: Excel.ConditionalDataBarPositiveFormat; /** * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no axis is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ axisColor: string; /** * Representation of how the axis is determined for an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ axisFormat: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; /** * Specifies the direction that the data bar graphic should be based on. * * @remarks * [Api set: ExcelApi 1.6] */ barDirection: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; /** * The rule for what constitutes the lower bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ lowerBoundRule: Excel.ConditionalDataBarRule; /** * If `true`, hides the values from the cells where the data bar is applied. * * @remarks * [Api set: ExcelApi 1.6] */ showDataBarOnly: boolean; /** * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ upperBoundRule: Excel.ConditionalDataBarRule; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DataBarConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.DataBarConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.DataBarConditionalFormatLoadOptions): Excel.DataBarConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.DataBarConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.DataBarConditionalFormat; /** * 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.DataBarConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataBarConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.DataBarConditionalFormatData; } /** * Represents a conditional format for the positive side of the data bar. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalDataBarPositiveFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor: string; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor: string; /** * Specifies if the data bar has a gradient. * * @remarks * [Api set: ExcelApi 1.6] */ gradientFill: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalDataBarPositiveFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalDataBarPositiveFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions): Excel.ConditionalDataBarPositiveFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalDataBarPositiveFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalDataBarPositiveFormat; /** * 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.ConditionalDataBarPositiveFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalDataBarPositiveFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalDataBarPositiveFormatData; } /** * Represents a conditional format for the negative side of the data bar. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalDataBarNegativeFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor: string; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor: string; /** * Specifies if the negative data bar has the same border color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor: boolean; /** * Specifies if the negative data bar has the same fill color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveFillColor: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalDataBarNegativeFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalDataBarNegativeFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions): Excel.ConditionalDataBarNegativeFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalDataBarNegativeFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalDataBarNegativeFormat; /** * 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.ConditionalDataBarNegativeFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalDataBarNegativeFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalDataBarNegativeFormatData; } /** * Represents a rule-type for a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalDataBarRule { /** * The formula, if required, on which to evaluate the data bar rule. * * @remarks * [Api set: ExcelApi 1.6] */ formula?: string; /** * The type of rule for the data bar. * * @remarks * [Api set: ExcelApi 1.6] */ type: Excel.ConditionalFormatRuleType | "Invalid" | "Automatic" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; } /** * Represents a custom conditional format type. * * @remarks * [Api set: ExcelApi 1.6] */ class CustomConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * Specifies the `Rule` object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ readonly rule: Excel.ConditionalFormatRule; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CustomConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.CustomConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CustomConditionalFormatLoadOptions): Excel.CustomConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CustomConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.CustomConditionalFormat; /** * 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.CustomConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.CustomConditionalFormatData; } /** * Represents a rule, for all traditional rule/format pairings. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalFormatRule extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The formula, if required, on which to evaluate the conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ formula: string; /** * The formula, if required, on which to evaluate the conditional format rule in the user's language. * * @remarks * [Api set: ExcelApi 1.6] */ formulaLocal: string; /** * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. * * @remarks * [Api set: ExcelApi 1.6] */ formulaR1C1: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalFormatRuleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalFormatRule): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalFormatRuleLoadOptions): Excel.ConditionalFormatRule; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalFormatRule; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalFormatRule; /** * 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.ConditionalFormatRule object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalFormatRuleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalFormatRuleData; } /** * Represents an icon set criteria for conditional formatting. * * @remarks * [Api set: ExcelApi 1.6] */ class IconSetConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * An array of criteria and icon sets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. * * @remarks * [Api set: ExcelApi 1.6] */ criteria: Excel.ConditionalIconCriterion[]; /** * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. * * @remarks * [Api set: ExcelApi 1.6] */ reverseIconOrder: boolean; /** * If `true`, hides the values and only shows icons. * * @remarks * [Api set: ExcelApi 1.6] */ showIconOnly: boolean; /** * If set, displays the icon set option for the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ style: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.IconSetConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.IconSetConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.IconSetConditionalFormatLoadOptions): Excel.IconSetConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.IconSetConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.IconSetConditionalFormat; /** * 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.IconSetConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.IconSetConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.IconSetConditionalFormatData; } /** * Represents an icon criterion which contains a type, value, an operator, and an optional custom icon, if not using an icon set. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalIconCriterion { /** * The custom icon for the current criterion, if different from the default icon set, else `null` will be returned. * * @remarks * [Api set: ExcelApi 1.6] */ customIcon?: Excel.Icon; /** * A number or a formula depending on the type. * * @remarks * [Api set: ExcelApi 1.6] */ formula: string; /** * `greaterThan` or `greaterThanOrEqual` for each of the rule types for the icon conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ operator: Excel.ConditionalIconCriterionOperator | "Invalid" | "GreaterThan" | "GreaterThanOrEqual"; /** * What the icon conditional formula should be based on. * * @remarks * [Api set: ExcelApi 1.6] */ type: Excel.ConditionalFormatIconRuleType | "Invalid" | "Number" | "Percent" | "Formula" | "Percentile"; } /** * Represents the color scale criteria for conditional formatting. * * @remarks * [Api set: ExcelApi 1.6] */ class ColorScaleConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The criteria of the color scale. Midpoint is optional when using a two point color scale. * * @remarks * [Api set: ExcelApi 1.6] */ criteria: Excel.ConditionalColorScaleCriteria; /** * If `true`, the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). * * @remarks * [Api set: ExcelApi 1.6] */ readonly threeColorScale: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ColorScaleConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ColorScaleConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions): Excel.ColorScaleConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ColorScaleConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ColorScaleConditionalFormat; /** * 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.ColorScaleConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ColorScaleConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ColorScaleConditionalFormatData; } /** * Represents the criteria of the color scale. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalColorScaleCriteria { /** * The maximum point of the color scale criterion. * * @remarks * [Api set: ExcelApi 1.6] */ maximum: Excel.ConditionalColorScaleCriterion; /** * The midpoint of the color scale criterion, if the color scale is a 3-color scale. * * @remarks * [Api set: ExcelApi 1.6] */ midpoint?: Excel.ConditionalColorScaleCriterion; /** * The minimum point of the color scale criterion. * * @remarks * [Api set: ExcelApi 1.6] */ minimum: Excel.ConditionalColorScaleCriterion; } /** * Represents a color scale criterion which contains a type, value, and a color. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalColorScaleCriterion { /** * HTML color code representation of the color scale color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.6] */ color?: string; /** * A number, a formula, or `null` (if `type` is `lowestValue`). * * @remarks * [Api set: ExcelApi 1.6] */ formula?: string; /** * What the criterion conditional formula should be based on. * * @remarks * [Api set: ExcelApi 1.6] */ type: Excel.ConditionalFormatColorCriterionType | "Invalid" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; } /** * Represents a top/bottom conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ class TopBottomConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * The criteria of the top/bottom conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalTopBottomRule; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TopBottomConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TopBottomConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions): Excel.TopBottomConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TopBottomConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TopBottomConditionalFormat; /** * 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.TopBottomConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TopBottomConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TopBottomConditionalFormatData; } /** * Represents the rule of the top/bottom conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalTopBottomRule { /** * The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. * * @remarks * [Api set: ExcelApi 1.6] */ rank: number; /** * Format values based on the top or bottom rank. * * @remarks * [Api set: ExcelApi 1.6] */ type: Excel.ConditionalTopBottomCriterionType | "Invalid" | "TopItems" | "TopPercent" | "BottomItems" | "BottomPercent"; } /** * Represents the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. * * @remarks * [Api set: ExcelApi 1.6] */ class PresetCriteriaConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalPresetCriteriaRule; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PresetCriteriaConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PresetCriteriaConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions): Excel.PresetCriteriaConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PresetCriteriaConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PresetCriteriaConditionalFormat; /** * 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.PresetCriteriaConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PresetCriteriaConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PresetCriteriaConditionalFormatData; } /** * Represents the preset criteria conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalPresetCriteriaRule { /** * The criterion of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ criterion: Excel.ConditionalFormatPresetCriterion | "Invalid" | "Blanks" | "NonBlanks" | "Errors" | "NonErrors" | "Yesterday" | "Today" | "Tomorrow" | "LastSevenDays" | "LastWeek" | "ThisWeek" | "NextWeek" | "LastMonth" | "ThisMonth" | "NextMonth" | "AboveAverage" | "BelowAverage" | "EqualOrAboveAverage" | "EqualOrBelowAverage" | "OneStdDevAboveAverage" | "OneStdDevBelowAverage" | "TwoStdDevAboveAverage" | "TwoStdDevBelowAverage" | "ThreeStdDevAboveAverage" | "ThreeStdDevBelowAverage" | "UniqueValues" | "DuplicateValues"; } /** * Represents a specific text conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ class TextConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalTextComparisonRule; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TextConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TextConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TextConditionalFormatLoadOptions): Excel.TextConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TextConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TextConditionalFormat; /** * 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.TextConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TextConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TextConditionalFormatData; } /** * Represents a cell value conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalTextComparisonRule { /** * The operator of the text conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ operator: Excel.ConditionalTextOperator | "Invalid" | "Contains" | "NotContains" | "BeginsWith" | "EndsWith"; /** * The text value of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ text: string; } /** * Represents a cell value conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ class CellValueConditionalFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * Specifies the rule object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalCellValueRule; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CellValueConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.CellValueConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CellValueConditionalFormatLoadOptions): Excel.CellValueConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CellValueConditionalFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.CellValueConditionalFormat; /** * 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.CellValueConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CellValueConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.CellValueConditionalFormatData; } /** * Represents a cell value conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalCellValueRule { /** * The formula, if required, on which to evaluate the conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ formula1: string; /** * The formula, if required, on which to evaluate the conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ formula2?: string; /** * The operator of the cell value conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ operator: Excel.ConditionalCellValueOperator | "Invalid" | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqual" | "LessThanOrEqual"; } /** * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalRangeFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Collection of border objects that apply to the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ readonly borders: Excel.ConditionalRangeBorderCollection; /** * Returns the fill object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ readonly fill: Excel.ConditionalRangeFill; /** * Returns the font object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ readonly font: Excel.ConditionalRangeFont; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. Cleared if `null` is passed in. * * @remarks * [Api set: ExcelApi 1.6] */ numberFormat: any; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalRangeFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalRangeFormat): void; /** * Remove the format properties from a conditional format rule. This creates a rule with no format settings. * * @remarks * [Api set: ExcelApi 1.17] */ clearFormat(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalRangeFormatLoadOptions): Excel.ConditionalRangeFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalRangeFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalRangeFormat; /** * 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.ConditionalRangeFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalRangeFormatData; } /** * This object represents the font attributes (font style, color, etc.) for an object. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalRangeFont extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies if the font is bold. * * @remarks * [Api set: ExcelApi 1.6] */ bold: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.6] */ color: string; /** * Specifies if the font is italic. * * @remarks * [Api set: ExcelApi 1.6] */ italic: boolean; /** * Specifies the strikethrough status of the font. * * @remarks * [Api set: ExcelApi 1.6] */ strikethrough: boolean; /** * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ underline: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalRangeFontUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalRangeFont): void; /** * Resets the font formats. * * @remarks * [Api set: ExcelApi 1.6] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalRangeFontLoadOptions): Excel.ConditionalRangeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalRangeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalRangeFont; /** * 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.ConditionalRangeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeFontData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalRangeFontData; } /** * Represents the background of a conditional range object. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalRangeFill extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalRangeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalRangeFill): void; /** * Resets the fill. * * @remarks * [Api set: ExcelApi 1.6] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalRangeFillLoadOptions): Excel.ConditionalRangeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalRangeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalRangeFill; /** * 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.ConditionalRangeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeFillData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalRangeFillData; } /** * Represents the border of an object. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorder extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color: string; /** * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.6] */ readonly sideIndex: Excel.ConditionalRangeBorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight"; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ style: Excel.ConditionalRangeBorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ConditionalRangeBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ConditionalRangeBorder): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalRangeBorderLoadOptions): Excel.ConditionalRangeBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalRangeBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ConditionalRangeBorder; /** * 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.ConditionalRangeBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeBorderData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ConditionalRangeBorderData; } /** * Represents the border objects that make up range border. * * @remarks * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorderCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the bottom border. * * @remarks * [Api set: ExcelApi 1.6] */ readonly bottom: Excel.ConditionalRangeBorder; /** * Gets the left border. * * @remarks * [Api set: ExcelApi 1.6] */ readonly left: Excel.ConditionalRangeBorder; /** * Gets the right border. * * @remarks * [Api set: ExcelApi 1.6] */ readonly right: Excel.ConditionalRangeBorder; /** * Gets the top border. * * @remarks * [Api set: ExcelApi 1.6] */ readonly top: Excel.ConditionalRangeBorder; /** Gets the loaded child items in this collection. */ readonly items: Excel.ConditionalRangeBorder[]; /** * Number of border objects in the collection. * * @remarks * [Api set: ExcelApi 1.6] */ readonly count: number; /** * Gets a border object using its name. * * @remarks * [Api set: ExcelApi 1.6] * * @param index Index value of the border object to be retrieved. See `Excel.ConditionalRangeBorderIndex` for details. */ getItem(index: Excel.ConditionalRangeBorderIndex): Excel.ConditionalRangeBorder; /** * Gets a border object using its name. * * @remarks * [Api set: ExcelApi 1.6] * * @param index Index value of the border object to be retrieved. See `Excel.ConditionalRangeBorderIndex` for details. */ getItem(index: "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight"): Excel.ConditionalRangeBorder; /** * Gets a border object using its index. * * @remarks * [Api set: ExcelApi 1.6] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.ConditionalRangeBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalRangeBorderCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ConditionalRangeBorderCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ConditionalRangeBorderCollection; /** * 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.ConditionalRangeBorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeBorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ConditionalRangeBorderCollectionData; } /** * An object encapsulating a style's format and other properties. * * @remarks * [Api set: ExcelApi 1.7] */ class Style extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * A collection of four border objects that represent the style of the four borders. * * @remarks * [Api set: ExcelApi 1.7] */ readonly borders: Excel.RangeBorderCollection; /** * The fill of the style. * * @remarks * [Api set: ExcelApi 1.7] */ readonly fill: Excel.RangeFill; /** * A `Font` object that represents the font of the style. * * @remarks * [Api set: ExcelApi 1.7] */ readonly font: Excel.RangeFont; /** * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.8] */ autoIndent: boolean; /** * Specifies if the style is a built-in style. * * @remarks * [Api set: ExcelApi 1.7] */ readonly builtIn: boolean; /** * Specifies if the formula will be hidden when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ formulaHidden: boolean; /** * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeAlignment: boolean; /** * Specifies if the style includes the color, color index, line style, and weight border properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeBorder: boolean; /** * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeFont: boolean; /** * Specifies if the style includes the number format property. * * @remarks * [Api set: ExcelApi 1.7] */ includeNumber: boolean; /** * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. * * @remarks * [Api set: ExcelApi 1.7] */ includePatterns: boolean; /** * Specifies if the style includes the formula hidden and locked protection properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeProtection: boolean; /** * An integer from 0 to 250 that indicates the indent level for the style. * * @remarks * [Api set: ExcelApi 1.7] */ indentLevel: number; /** * Specifies if the object is locked when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ locked: boolean; /** * The name of the style. * * @remarks * [Api set: ExcelApi 1.7] */ readonly name: string; /** * The format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormat: string; /** * The localized format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal: string; /** * The reading order for the style. * * @remarks * [Api set: ExcelApi 1.7] */ readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.7] */ shrinkToFit: boolean; /** * The text orientation for the style. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation: number; /** * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * Specifies if Excel wraps the text in the object. * * @remarks * [Api set: ExcelApi 1.7] */ wrapText: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Style): void; /** * Deletes this style. * * @remarks * [Api set: ExcelApi 1.7] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.StyleLoadOptions): Excel.Style; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Style; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Style; /** * 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.Style object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.StyleData; } /** * Represents a collection of all the styles. * * @remarks * [Api set: ExcelApi 1.7] */ class StyleCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Style[]; /** * Adds a new style to the collection. * * @remarks * [Api set: ExcelApi 1.7] * * @param name Name of the style to be added. */ add(name: string): void; /** * Gets the number of styles in the collection. * * @remarks * [Api set: ExcelApi 1.9] */ getCount(): OfficeExtension.ClientResult; /** * Gets a `Style` by name. * * @remarks * [Api set: ExcelApi 1.7] * * @param name Name of the style to be retrieved. */ getItem(name: string): Excel.Style; /** * Gets a style based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.9] * * @param index Index value of the style object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Style; /** * Gets a style by name. If the style object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] * * @param name Name of the style to be retrieved. */ getItemOrNullObject(name: string): Excel.Style; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.StyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.StyleCollection; /** * 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.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.StyleCollectionData; } /** * Represents a collection of table styles. * * @remarks * [Api set: ExcelApi 1.10] */ class TableStyleCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.TableStyle[]; /** * Creates a blank `TableStyle` with the specified name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name The unique name for the new table style. Will throw an `InvalidArgument` error if the name is already in use. * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. * @returns The newly created `TableStyle`. */ add(name: string, makeUniqueName?: boolean): Excel.TableStyle; /** * Gets the number of table styles in the collection. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Gets the default table style for the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * @returns The `TableStyle` object that is the current default table style. */ getDefault(): Excel.TableStyle; /** * Gets a `TableStyle` by name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the table style to be retrieved. * @returns The `TableStyle` object whose name matches the input. */ getItem(name: string): Excel.TableStyle; /** * Gets a `TableStyle` by name. If the table style does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the table style to be retrieved. * @returns The `TableStyle` object whose name matches the input. */ getItemOrNullObject(name: string): Excel.TableStyle; /** * Sets the default table style for use in the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * * @param newDefaultStyle The `TableStyle` object, or name of the `TableStyle` object, that should be the new default. */ setDefault(newDefaultStyle: TableStyle | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableStyleCollection; /** * 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.TableStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.TableStyleCollectionData; } /** * Represents a table style, which defines the style elements by region of the table. * * @remarks * [Api set: ExcelApi 1.10] */ class TableStyle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the name of the table style. * * @remarks * [Api set: ExcelApi 1.10] */ name: string; /** * Specifies if this `TableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readonly readOnly: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TableStyle): void; /** * Deletes the table style. * * @remarks * [Api set: ExcelApi 1.10] */ delete(): void; /** * Creates a duplicate of this table style with copies of all the style elements. * * @remarks * [Api set: ExcelApi 1.10] * @returns The new `TableStyle` object that has been duplicated from this table style. */ duplicate(): Excel.TableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TableStyleLoadOptions): Excel.TableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TableStyle; /** * 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.TableStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TableStyleData; } /** * Represents a collection of PivotTable styles. * * @remarks * [Api set: ExcelApi 1.10] */ class PivotTableStyleCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotTableStyle[]; /** * Creates a blank `PivotTableStyle` with the specified name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name The unique name for the new PivotTable style. Will throw an `InvalidArgument` error if the name is already in use. * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. * @returns The newly created `PivotTableStyle`. */ add(name: string, makeUniqueName?: boolean): Excel.PivotTableStyle; /** * Gets the number of PivotTable styles in the collection. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Gets the default PivotTable style for the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * @returns The `PivotTableStyle` object that is the current default PivotTable style. */ getDefault(): Excel.PivotTableStyle; /** * Gets a `PivotTableStyle` by name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the PivotTable style to be retrieved. * @returns The `PivotTableStyle` object whose name matches the input. */ getItem(name: string): Excel.PivotTableStyle; /** * Gets a `PivotTableStyle` by name. If the `PivotTableStyle` does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the PivotTable style to be retrieved. * @returns The `PivotTableStyle` object whose name matches the input. */ getItemOrNullObject(name: string): Excel.PivotTableStyle; /** * Sets the default PivotTable style for use in the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * * @param newDefaultStyle The `PivotTableStyle` object, or name of the `PivotTableStyle` object, that should be the new default. */ setDefault(newDefaultStyle: PivotTableStyle | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotTableStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotTableStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotTableStyleCollection; /** * 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.PivotTableStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.PivotTableStyleCollectionData; } /** * Represents a PivotTable style, which defines style elements by PivotTable region. * * @remarks * [Api set: ExcelApi 1.10] */ class PivotTableStyle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the name of the PivotTable style. * * @remarks * [Api set: ExcelApi 1.10] */ name: string; /** * Specifies if this `PivotTableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readonly readOnly: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PivotTableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PivotTableStyle): void; /** * Deletes the PivotTable style. * * @remarks * [Api set: ExcelApi 1.10] */ delete(): void; /** * Creates a duplicate of this PivotTable style with copies of all the style elements. * * @remarks * [Api set: ExcelApi 1.10] * @returns The new `PivotTableStyle` object that has been duplicated from this PivotTable style. */ duplicate(): Excel.PivotTableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PivotTableStyleLoadOptions): Excel.PivotTableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PivotTableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PivotTableStyle; /** * 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.PivotTableStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableStyleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PivotTableStyleData; } /** * Represents a collection of `SlicerStyle` objects. * * @remarks * [Api set: ExcelApi 1.10] */ class SlicerStyleCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.SlicerStyle[]; /** * Creates a blank slicer style with the specified name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name The unique name for the new slicer style. Will throw an `InvalidArgument` exception if the name is already in use. * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. * @returns The newly created `SlicerStyle`. */ add(name: string, makeUniqueName?: boolean): Excel.SlicerStyle; /** * Gets the number of slicer styles in the collection. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Gets the default `SlicerStyle` for the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * @returns The `SlicerStyle` object that is the current default slicer style. */ getDefault(): Excel.SlicerStyle; /** * Gets a `SlicerStyle` by name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the slicer style to be retrieved. * @returns The `SlicerStyle` object whose name matches the input. */ getItem(name: string): Excel.SlicerStyle; /** * Gets a `SlicerStyle` by name. If the slicer style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the slicer style to be retrieved. * @returns The `SlicerStyle` object whose name matches the input. */ getItemOrNullObject(name: string): Excel.SlicerStyle; /** * Sets the default slicer style for use in the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * * @param newDefaultStyle The `SlicerStyle` object, or name of the `SlicerStyle` object, that should be the new default. */ setDefault(newDefaultStyle: SlicerStyle | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SlicerStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.SlicerStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerStyleCollection; /** * 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.SlicerStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.SlicerStyleCollectionData; } /** * Represents a slicer style, which defines style elements by region of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ class SlicerStyle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the name of the slicer style. * * @remarks * [Api set: ExcelApi 1.10] */ name: string; /** * Specifies if this `SlicerStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readonly readOnly: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.SlicerStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.SlicerStyle): void; /** * Deletes the slicer style. * * @remarks * [Api set: ExcelApi 1.10] */ delete(): void; /** * Creates a duplicate of this slicer style with copies of all the style elements. * * @remarks * [Api set: ExcelApi 1.10] * @returns The new `SlicerStyle` object that has been duplicated from this slicer style. */ duplicate(): Excel.SlicerStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SlicerStyleLoadOptions): Excel.SlicerStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.SlicerStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.SlicerStyle; /** * 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.SlicerStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerStyleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.SlicerStyleData; } /** * Represents a collection of timeline styles. * * @remarks * [Api set: ExcelApi 1.10] */ class TimelineStyleCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.TimelineStyle[]; /** * Creates a blank `TimelineStyle` with the specified name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name The unique name for the new timeline style. Will throw an `InvalidArgument` error if the name is already in use. * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. * @returns The newly created `TimelineStyle`. */ add(name: string, makeUniqueName?: boolean): Excel.TimelineStyle; /** * Gets the number of timeline styles in the collection. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Gets the default timeline style for the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * @returns The `TimelineStyle` object that is the current default timeline style. */ getDefault(): Excel.TimelineStyle; /** * Gets a `TimelineStyle` by name. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the timeline style to be retrieved. * @returns The `TimelineStyle` object whose name matches the input. */ getItem(name: string): Excel.TimelineStyle; /** * Gets a `TimelineStyle` by name. If the timeline style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.10] * * @param name Name of the timeline style to be retrieved. * @returns The `TimelineStyle` object whose name matches the input. */ getItemOrNullObject(name: string): Excel.TimelineStyle; /** * Sets the default timeline style for use in the parent object's scope. * * @remarks * [Api set: ExcelApi 1.10] * * @param newDefaultStyle The `TimelineStyle` object, or name of the `TimelineStyle` object, that should be the new default. */ setDefault(newDefaultStyle: TimelineStyle | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TimelineStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TimelineStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TimelineStyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TimelineStyleCollection; /** * 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.TimelineStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TimelineStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.TimelineStyleCollectionData; } /** * Represents a `TimelineStyle`, which defines style elements by region in the timeline. * * @remarks * [Api set: ExcelApi 1.10] */ class TimelineStyle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the name of the timeline style. * * @remarks * [Api set: ExcelApi 1.10] */ name: string; /** * Specifies if this `TimelineStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readonly readOnly: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TimelineStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TimelineStyle): void; /** * Deletes the table style. * * @remarks * [Api set: ExcelApi 1.10] */ delete(): void; /** * Creates a duplicate of this timeline style with copies of all the style elements. * * @remarks * [Api set: ExcelApi 1.10] * @returns The new `TimelineStyle` object that has been duplicated from this timeline style. */ duplicate(): Excel.TimelineStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TimelineStyleLoadOptions): Excel.TimelineStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TimelineStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TimelineStyle; /** * 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.TimelineStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TimelineStyleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TimelineStyleData; } /** * Represents layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area. * * @remarks * [Api set: ExcelApi 1.9] */ class PageLayout extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Header and footer configuration for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ readonly headersFooters: Excel.HeaderFooterGroup; /** * The worksheet's black and white print option. * * @remarks * [Api set: ExcelApi 1.9] */ blackAndWhite: boolean; /** * The worksheet's bottom page margin to use for printing in points. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin: number; /** * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerHorizontally: boolean; /** * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerVertically: boolean; /** * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. * * @remarks * [Api set: ExcelApi 1.9] */ draftMode: boolean; /** * The worksheet's first page number to print. A `null` value represents "auto" page numbering. * * @remarks * [Api set: ExcelApi 1.9] */ firstPageNumber: number | ""; /** * The worksheet's footer margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ footerMargin: number; /** * The worksheet's header margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ headerMargin: number; /** * The worksheet's left margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin: number; /** * The worksheet's orientation of the page. * * @remarks * [Api set: ExcelApi 1.9] */ orientation: Excel.PageOrientation | "Portrait" | "Landscape"; /** * The worksheet's paper size of the page. * * @remarks * [Api set: ExcelApi 1.9] */ paperSize: Excel.PaperType | "Letter" | "LetterSmall" | "Tabloid" | "Ledger" | "Legal" | "Statement" | "Executive" | "A3" | "A4" | "A4Small" | "A5" | "B4" | "B5" | "Folio" | "Quatro" | "Paper10x14" | "Paper11x17" | "Note" | "Envelope9" | "Envelope10" | "Envelope11" | "Envelope12" | "Envelope14" | "Csheet" | "Dsheet" | "Esheet" | "EnvelopeDL" | "EnvelopeC5" | "EnvelopeC3" | "EnvelopeC4" | "EnvelopeC6" | "EnvelopeC65" | "EnvelopeB4" | "EnvelopeB5" | "EnvelopeB6" | "EnvelopeItaly" | "EnvelopeMonarch" | "EnvelopePersonal" | "FanfoldUS" | "FanfoldStdGerman" | "FanfoldLegalGerman"; /** * Specifies if the worksheet's comments should be displayed when printing. * * @remarks * [Api set: ExcelApi 1.9] */ printComments: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; /** * The worksheet's print errors option. * * @remarks * [Api set: ExcelApi 1.9] */ printErrors: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; /** * Specifies if the worksheet's gridlines will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printGridlines: boolean; /** * Specifies if the worksheet's headings will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printHeadings: boolean; /** * The worksheet's page print order option. This specifies the order to use for processing the page number printed. * * @remarks * [Api set: ExcelApi 1.9] */ printOrder: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; /** * The worksheet's right margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin: number; /** * The worksheet's top margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin: number; /** * The worksheet's print zoom options. The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). * * @remarks * [Api set: ExcelApi 1.9] */ zoom: Excel.PageLayoutZoomOptions; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PageLayoutUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PageLayout): void; /** * Gets the `RangeAreas` object, comprising one or more rectangular ranges, that represents the print area for the worksheet. If there is no print area, an `ItemNotFound` error will be thrown. * * @remarks * [Api set: ExcelApi 1.9] */ getPrintArea(): Excel.RangeAreas; /** * Gets the `RangeAreas` object, comprising one or more rectangular ranges, that represents the print area for the worksheet. If there is no print area, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] */ getPrintAreaOrNullObject(): Excel.RangeAreas; /** * Gets the range object representing the title columns. * * @remarks * [Api set: ExcelApi 1.9] */ getPrintTitleColumns(): Excel.Range; /** * Gets the range object representing the title columns. If not set, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] */ getPrintTitleColumnsOrNullObject(): Excel.Range; /** * Gets the range object representing the title rows. * * @remarks * [Api set: ExcelApi 1.9] */ getPrintTitleRows(): Excel.Range; /** * Gets the range object representing the title rows. If not set, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.9] */ getPrintTitleRowsOrNullObject(): Excel.Range; /** * Sets the worksheet's print area. * * @remarks * [Api set: ExcelApi 1.9] * * @param printArea The range or ranges of the content to print. */ setPrintArea(printArea: Range | RangeAreas | string): void; /** * Sets the worksheet's page margins with units. * * @remarks * [Api set: ExcelApi 1.9] * * @param unit Measurement unit for the margins provided. * @param marginOptions Margin values to set. Margins not provided remain unchanged. */ setPrintMargins(unit: Excel.PrintMarginUnit, marginOptions: Excel.PageLayoutMarginOptions): void; /** * Sets the worksheet's page margins with units. * * @remarks * [Api set: ExcelApi 1.9] * * @param unit Measurement unit for the margins provided. * @param marginOptions Margin values to set. Margins not provided remain unchanged. */ setPrintMargins(unit: "Points" | "Inches" | "Centimeters", marginOptions: Excel.PageLayoutMarginOptions): void; /** * Sets the columns that contain the cells to be repeated at the left of each page of the worksheet for printing. * * @remarks * [Api set: ExcelApi 1.9] * * @param printTitleColumns The columns to be repeated to the left of each page. The range must span the entire column to be valid. */ setPrintTitleColumns(printTitleColumns: Range | string): void; /** * Sets the rows that contain the cells to be repeated at the top of each page of the worksheet for printing. * * @remarks * [Api set: ExcelApi 1.9] * * @param printTitleRows The rows to be repeated at the top of each page. The range must span the entire row to be valid. */ setPrintTitleRows(printTitleRows: Range | string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PageLayoutLoadOptions): Excel.PageLayout; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PageLayout; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PageLayout; /** * 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.PageLayout object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PageLayoutData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PageLayoutData; } /** * Represents page zoom properties. * * @remarks * [Api set: ExcelApi 1.9] */ interface PageLayoutZoomOptions { /** * Number of pages to fit horizontally. This value can be `null` if percentage scale is used. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalFitToPages?: number; /** * Print page scale value can be between 10 and 400. This value can be `null` if fit to page tall or wide is specified. * * @remarks * [Api set: ExcelApi 1.9] */ scale?: number; /** * Number of pages to fit vertically. This value can be `null` if percentage scale is used. * * @remarks * [Api set: ExcelApi 1.9] */ verticalFitToPages?: number; } /** * Represents the options in page layout margins. * * @remarks * [Api set: ExcelApi 1.9] */ interface PageLayoutMarginOptions { /** * Specifies the page layout bottom margin in the unit specified to use for printing. * * @remarks * [Api set: ExcelApi 1.9] */ bottom?: number; /** * Specifies the page layout footer margin in the unit specified to use for printing. * * @remarks * [Api set: ExcelApi 1.9] */ footer?: number; /** * Specifies the page layout header margin in the unit specified to use for printing. * * @remarks * [Api set: ExcelApi 1.9] */ header?: number; /** * Specifies the page layout left margin in the unit specified to use for printing. * * @remarks * [Api set: ExcelApi 1.9] */ left?: number; /** * Specifies the page layout right margin in the unit specified to use for printing. * * @remarks * [Api set: ExcelApi 1.9] */ right?: number; /** * Specifies the page layout top margin in the unit specified to use for printing. * * @remarks * [Api set: ExcelApi 1.9] */ top?: number; } /** * @remarks * [Api set: ExcelApi 1.9] */ class HeaderFooter extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The center footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerFooter: string; /** * The center header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerHeader: string; /** * The left footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftFooter: string; /** * The left header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftHeader: string; /** * The right footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightFooter: string; /** * The right header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightHeader: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.HeaderFooterUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.HeaderFooter): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.HeaderFooterLoadOptions): Excel.HeaderFooter; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.HeaderFooter; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.HeaderFooter; /** * 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.HeaderFooter object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.HeaderFooterData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.HeaderFooterData; } /** * @remarks * [Api set: ExcelApi 1.9] */ class HeaderFooterGroup extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The general header/footer, used for all pages unless even/odd or first page is specified. * * @remarks * [Api set: ExcelApi 1.9] */ readonly defaultForAllPages: Excel.HeaderFooter; /** * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. * * @remarks * [Api set: ExcelApi 1.9] */ readonly evenPages: Excel.HeaderFooter; /** * The first page header/footer, for all other pages general or even/odd is used. * * @remarks * [Api set: ExcelApi 1.9] */ readonly firstPage: Excel.HeaderFooter; /** * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. * * @remarks * [Api set: ExcelApi 1.9] */ readonly oddPages: Excel.HeaderFooter; /** * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. * * @remarks * [Api set: ExcelApi 1.9] */ state: Excel.HeaderFooterState | "Default" | "FirstAndDefault" | "OddAndEven" | "FirstOddAndEven"; /** * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetMargins: boolean; /** * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetScale: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.HeaderFooterGroupUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.HeaderFooterGroup): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.HeaderFooterGroupLoadOptions): Excel.HeaderFooterGroup; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.HeaderFooterGroup; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.HeaderFooterGroup; /** * 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.HeaderFooterGroup object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.HeaderFooterGroupData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.HeaderFooterGroupData; } /** * @remarks * [Api set: ExcelApi 1.9] */ class PageBreak extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the column index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ readonly columnIndex: number; /** * Specifies the row index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ readonly rowIndex: number; /** * Deletes a page break object. * * @remarks * [Api set: ExcelApi 1.9] */ delete(): void; /** * Gets the first cell after the page break. * * @remarks * [Api set: ExcelApi 1.9] */ getCellAfterBreak(): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PageBreakLoadOptions): Excel.PageBreak; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PageBreak; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.PageBreak; /** * 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.PageBreak object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PageBreakData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.PageBreakData; } /** * @remarks * [Api set: ExcelApi 1.9] */ class PageBreakCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PageBreak[]; /** * Adds a page break before the top-left cell of the range specified. * * @remarks * [Api set: ExcelApi 1.9] * * @param pageBreakRange The range immediately after the page break to be added. */ add(pageBreakRange: Range | string): Excel.PageBreak; /** * Gets the number of page breaks in the collection. * * @remarks * [Api set: ExcelApi 1.9] */ getCount(): OfficeExtension.ClientResult; /** * Gets a page break object via the index. * * @remarks * [Api set: ExcelApi 1.9] * * @param index Index of the page break. */ getItem(index: number): Excel.PageBreak; /** * Resets all manual page breaks in the collection. * * @remarks * [Api set: ExcelApi 1.9] */ removePageBreaks(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.PageBreakCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PageBreakCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.PageBreakCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PageBreakCollection; /** * 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.PageBreakCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PageBreakCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.PageBreakCollectionData; } /** * Represents a collection of all the data connections that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ class DataConnectionCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Refreshes data connections in the collection, such as from a PivotTable to a Power BI dataset, or a Data Model to a table or range in the same workbook. Data connections unsupported by this method are: Power Query connections, data connections outside the original workbook (except Power BI connections), and connections to data protected by a firewall. * * @remarks * [Api set: ExcelApi 1.7] */ refreshAll(): void; /** * 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.DataConnectionCollection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataConnectionCollectionData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): { [key: string]: string; }; } /** * @remarks * [Api set: ExcelApi 1.9] */ class RangeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Range[]; /** * Returns the number of ranges in the `RangeCollection`. * * @remarks * [Api set: ExcelApi 1.9] */ getCount(): OfficeExtension.ClientResult; /** * Returns the range object based on its position in the `RangeCollection`. * * @remarks * [Api set: ExcelApi 1.9] * * @param index Index value of the range object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RangeCollection; /** * 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.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.RangeCollectionData; } /** * Contains the collection of cross-workbook level ranges. * * @remarks * [Api set: ExcelApi 1.12] */ class RangeAreasCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.RangeAreas[]; /** * Gets the number of `RangeAreas` objects in this collection. * * @remarks * [Api set: ExcelApi 1.12] */ getCount(): OfficeExtension.ClientResult; /** * Returns the `RangeAreas` object based on position in the collection. * * @remarks * [Api set: ExcelApi 1.12] * * @param index Index value of the range object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.RangeAreas; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.RangeAreasCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeAreasCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.RangeAreasCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RangeAreasCollection; /** * 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.RangeAreasCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeAreasCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.RangeAreasCollectionData; } /** * Represents the entity that is mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ interface CommentMention { /** * The email address of the entity that is mentioned in a comment. * * @remarks * [Api set: ExcelApi 1.11] */ email: string; /** * The ID of the entity. The ID matches one of the IDs in `CommentRichContent.richContent`. * * @remarks * [Api set: ExcelApi 1.11] */ id: number; /** * The name of the entity that is mentioned in a comment. * * @remarks * [Api set: ExcelApi 1.11] */ name: string; } /** * Represents the content contained within a comment or comment reply. Rich content incudes the text string and any other objects contained within the comment body, such as mentions. * * @remarks * [Api set: ExcelApi 1.11] */ interface CommentRichContent { /** * An array containing all the entities (e.g., people) mentioned within the comment. * * @remarks * [Api set: ExcelApi 1.11] */ mentions?: Excel.CommentMention[]; /** * Specifies the rich content of the comment (e.g., comment content with mentions, the first mentioned entity has an ID attribute of 0, and the second mentioned entity has an ID attribute of 1). * * @remarks * [Api set: ExcelApi 1.11] */ richContent: string; } /** * Represents a collection of comment objects that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ class CommentCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Comment[]; /** * Creates a new comment with the given content on the given cell. An `InvalidArgument` error is thrown if the provided range is larger than one cell. * * @remarks * [Api set: ExcelApi 1.10] * * @param cellAddress The cell to which the comment is added. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. * @param content The comment's content. This can be either a string or `CommentRichContent` object. Strings are used for plain text. `CommentRichContent` objects allow for other comment features, such as mentions. [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] */ add(cellAddress: Range | string, content: CommentRichContent | string, contentType?: Excel.ContentType): Excel.Comment; /** * Creates a new comment with the given content on the given cell. An `InvalidArgument` error is thrown if the provided range is larger than one cell. * * @remarks * [Api set: ExcelApi 1.10] * * @param cellAddress The cell to which the comment is added. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. * @param content The comment's content. This can be either a string or `CommentRichContent` object. Strings are used for plain text. `CommentRichContent` objects allow for other comment features, such as mentions. [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] */ add(cellAddress: Range | string, content: CommentRichContent | string, contentType?: "Plain" | "Mention"): Excel.Comment; /** * Gets the number of comments in the collection. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Gets a comment from the collection based on its ID. * * @remarks * [Api set: ExcelApi 1.10] * * @param commentId The identifier for the comment. */ getItem(commentId: string): Excel.Comment; /** * Gets a comment from the collection based on its position. * * @remarks * [Api set: ExcelApi 1.10] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Comment; /** * Gets the comment from the specified cell. If there is no comment in the cell, an error is thrown. * * @remarks * [Api set: ExcelApi 1.10] * * @param cellAddress The cell which the comment is on. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. */ getItemByCell(cellAddress: Range | string): Excel.Comment; /** * Gets the comment to which the given reply is connected. * * @remarks * [Api set: ExcelApi 1.10] * * @param replyId The identifier of comment reply. */ getItemByReplyId(replyId: string): Excel.Comment; /** * Gets a comment from the collection based on its ID. If the comment object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] * * @param commentId The identifier for the comment. */ getItemOrNullObject(commentId: string): Excel.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CommentCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CommentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.CommentCollection; /** * Occurs when the comments are added. * * @remarks * [Api set: ExcelApi 1.12] * * @eventproperty */ readonly onAdded: OfficeExtension.EventHandlers; /** * Occurs when comments or replies in a comment collection are changed, including when replies are deleted. * * @remarks * [Api set: ExcelApi 1.12] * * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; /** * Occurs when comments are deleted in the comment collection. * * @remarks * [Api set: ExcelApi 1.12] * * @eventproperty */ readonly onDeleted: OfficeExtension.EventHandlers; /** * 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.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.CommentCollectionData; } /** * Represents a comment in the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ class Comment extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents a collection of reply objects associated with the comment. * * @remarks * [Api set: ExcelApi 1.10] */ readonly replies: Excel.CommentReplyCollection; /** * Gets the email of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ readonly authorEmail: string; /** * Gets the name of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ readonly authorName: string; /** * The comment's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content: string; /** * Gets the content type of the comment. * * @remarks * [Api set: ExcelApi 1.12] */ readonly contentType: Excel.ContentType | "Plain" | "Mention"; /** * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. * * @remarks * [Api set: ExcelApi 1.10] */ readonly creationDate: Date; /** * Specifies the comment identifier. * * @remarks * [Api set: ExcelApi 1.10] */ readonly id: string; /** * Gets the entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ readonly mentions: Excel.CommentMention[]; /** * The comment thread status. A value of `true` means that the comment thread is resolved. * * @remarks * [Api set: ExcelApi 1.11] */ resolved: boolean; /** * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ readonly richContent: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Comment): void; /** * Deletes the comment and all the connected replies. * * @remarks * [Api set: ExcelApi 1.10] */ delete(): void; /** * Gets the cell where this comment is located. * * @remarks * [Api set: ExcelApi 1.10] */ getLocation(): Excel.Range; /** * Updates the comment content with a specially formatted string and a list of mentions. * * @remarks * [Api set: ExcelApi 1.11] * * @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. */ updateMentions(contentWithMentions: Excel.CommentRichContent): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CommentLoadOptions): Excel.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Comment; /** * 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.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.CommentData; } /** * Represents a collection of comment reply objects that are part of the comment. * * @remarks * [Api set: ExcelApi 1.10] */ class CommentReplyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.CommentReply[]; /** * Creates a comment reply for a comment. * * @remarks * [Api set: ExcelApi 1.10] * * @param content The comment's content. This can be either a string or a `CommentRichContent` object (e.g., for comments with mentions). [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] */ add(content: CommentRichContent | string, contentType?: Excel.ContentType): Excel.CommentReply; /** * Creates a comment reply for a comment. * * @remarks * [Api set: ExcelApi 1.10] * * @param content The comment's content. This can be either a string or a `CommentRichContent` object (e.g., for comments with mentions). [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] */ add(content: CommentRichContent | string, contentType?: "Plain" | "Mention"): Excel.CommentReply; /** * Gets the number of comment replies in the collection. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Returns a comment reply identified by its ID. * * @remarks * [Api set: ExcelApi 1.10] * * @param commentReplyId The identifier for the comment reply. */ getItem(commentReplyId: string): Excel.CommentReply; /** * Gets a comment reply based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.10] * * @param index The index value of the comment reply to be retrieved. The collection uses zero-based indexing. */ getItemAt(index: number): Excel.CommentReply; /** * Returns a comment reply identified by its ID. If the comment reply object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] * * @param commentReplyId The identifier for the comment reply. */ getItemOrNullObject(commentReplyId: string): Excel.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CommentReplyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentReplyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CommentReplyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.CommentReplyCollection; /** * 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.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.CommentReplyCollectionData; } /** * Represents a comment reply in the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ class CommentReply extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the email of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ readonly authorEmail: string; /** * Gets the name of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ readonly authorName: string; /** * The comment reply's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content: string; /** * The content type of the reply. * * @remarks * [Api set: ExcelApi 1.12] */ readonly contentType: Excel.ContentType | "Plain" | "Mention"; /** * Gets the creation time of the comment reply. * * @remarks * [Api set: ExcelApi 1.10] */ readonly creationDate: Date; /** * Specifies the comment reply identifier. * * @remarks * [Api set: ExcelApi 1.10] */ readonly id: string; /** * The entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ readonly mentions: Excel.CommentMention[]; /** * The comment reply status. A value of `true` means the reply is in the resolved state. * * @remarks * [Api set: ExcelApi 1.11] */ readonly resolved: boolean; /** * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ readonly richContent: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.CommentReply): void; /** * Deletes the comment reply. * * @remarks * [Api set: ExcelApi 1.10] */ delete(): void; /** * Gets the cell where this comment reply is located. * * @remarks * [Api set: ExcelApi 1.10] */ getLocation(): Excel.Range; /** * Gets the parent comment of this reply. * * @remarks * [Api set: ExcelApi 1.10] */ getParentComment(): Excel.Comment; /** * Updates the comment content with a specially formatted string and a list of mentions. * * @remarks * [Api set: ExcelApi 1.11] * * @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. */ updateMentions(contentWithMentions: Excel.CommentRichContent): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.CommentReplyLoadOptions): Excel.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.CommentReply; /** * 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.CommentReply object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.CommentReplyData; } /** * Represents a collection of all the shapes in the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ class ShapeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Shape[]; /** * Adds a geometric shape to the worksheet. Returns a `Shape` object that represents the new shape. * * @remarks * [Api set: ExcelApi 1.9] * * @param geometricShapeType Represents the type of the geometric shape. See `Excel.GeometricShapeType` for details. */ addGeometricShape(geometricShapeType: Excel.GeometricShapeType): Excel.Shape; /** * Adds a geometric shape to the worksheet. Returns a `Shape` object that represents the new shape. * * @remarks * [Api set: ExcelApi 1.9] * * @param geometricShapeType Represents the type of the geometric shape. See `Excel.GeometricShapeType` for details. */ addGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"): Excel.Shape; /** * Groups a subset of shapes in this collection's worksheet. Returns a `Shape` object that represents the new group of shapes. * * @remarks * [Api set: ExcelApi 1.9] * * @param values An array of shape IDs or shape objects. */ addGroup(values: Array): Excel.Shape; /** * Creates an image from a base64-encoded string and adds it to the worksheet. Returns the `Shape` object that represents the new image. * * @remarks * [Api set: ExcelApi 1.9] * * @param base64ImageString A base64-encoded string representing an image in either JPEG or PNG format. */ addImage(base64ImageString: string): Excel.Shape; /** * Adds a line to worksheet. Returns a `Shape` object that represents the new line. * * @remarks * [Api set: ExcelApi 1.9] * * @param startLeft The distance, in points, from the start of the line to the left side of the worksheet. * @param startTop The distance, in points, from the start of the line to the top of the worksheet. * @param endLeft The distance, in points, from the end of the line to the left of the worksheet. * @param endTop The distance, in points, from the end of the line to the top of the worksheet. * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details. */ addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: Excel.ConnectorType): Excel.Shape; /** * Adds a line to worksheet. Returns a `Shape` object that represents the new line. * * @remarks * [Api set: ExcelApi 1.9] * * @param startLeft The distance, in points, from the start of the line to the left side of the worksheet. * @param startTop The distance, in points, from the start of the line to the top of the worksheet. * @param endLeft The distance, in points, from the end of the line to the left of the worksheet. * @param endTop The distance, in points, from the end of the line to the top of the worksheet. * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details. */ addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: "Straight" | "Elbow" | "Curve"): Excel.Shape; /** * Adds a text box to the worksheet with the provided text as the content. Returns a `Shape` object that represents the new text box. * * @remarks * [Api set: ExcelApi 1.9] * * @param text Represents the text that will be shown in the created text box. */ addTextBox(text?: string): Excel.Shape; /** * Returns the number of shapes in the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ getCount(): OfficeExtension.ClientResult; /** * Gets a shape using its name or ID. * * @remarks * [Api set: ExcelApi 1.9] * * @param key The name or ID of the shape to be retrieved. */ getItem(key: string): Excel.Shape; /** * Gets a shape using its position in the collection. * * @remarks * [Api set: ExcelApi 1.9] * * @param index The zero-based index of the shape to be retrieved. */ getItemAt(index: number): Excel.Shape; /** * Gets a shape using its name or ID. If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] * * @param key The name or ID of the shape to be retrieved. */ getItemOrNullObject(key: string): Excel.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ShapeCollection; /** * 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.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.ShapeCollectionData; } /** * Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc. To learn more about the shape object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-shapes | Work with shapes using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.9] */ class Shape extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the fill formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly fill: Excel.ShapeFill; /** * Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ readonly geometricShape: Excel.GeometricShape; /** * Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". * * @remarks * [Api set: ExcelApi 1.9] */ readonly group: Excel.ShapeGroup; /** * Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". * * @remarks * [Api set: ExcelApi 1.9] */ readonly image: Excel.Image; /** * Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". * * @remarks * [Api set: ExcelApi 1.9] */ readonly line: Excel.Line; /** * Returns the line formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly lineFormat: Excel.ShapeLineFormat; /** * Specifies the parent group of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly parentGroup: Excel.Shape; /** * Returns the text frame object of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly textFrame: Excel.TextFrame; /** * Specifies the alternative description text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextDescription: string; /** * Specifies the alternative title text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextTitle: string; /** * Returns the number of connection sites on this shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly connectionSiteCount: number; /** * Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its `name`. In this scenario, you can use this API to get the name that is displayed in the UI. * * @remarks * [Api set: ExcelApi 1.15] */ readonly displayName: string; /** * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShapeType: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ height: number; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ readonly id: string; /** * The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ left: number; /** * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. * * @remarks * [Api set: ExcelApi 1.9] */ readonly level: number; /** * Specifies if the aspect ratio of this shape is locked. * * @remarks * [Api set: ExcelApi 1.9] */ lockAspectRatio: boolean; /** * Specifies the name of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ name: string; /** * Represents how the object is attached to the cells below it. * * @remarks * [Api set: ExcelApi 1.10] */ placement: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; /** * Specifies the rotation, in degrees, of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ rotation: number; /** * The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ top: number; /** * Returns the type of this shape. See `Excel.ShapeType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readonly type: Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; /** * Specifies if the shape is visible. * * @remarks * [Api set: ExcelApi 1.9] */ visible: boolean; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ width: number; /** * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. * * @remarks * [Api set: ExcelApi 1.9] */ readonly zOrderPosition: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Shape): void; /** * Copies and pastes a `Shape` object. The pasted shape is copied to the same pixel location as this shape. * * @remarks * [Api set: ExcelApi 1.10] * * @param destinationSheet The sheet to which the shape object will be pasted. The default value is the copied shape's worksheet. */ copyTo(destinationSheet?: Worksheet | string): Excel.Shape; /** * Removes the shape from the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ delete(): void; /** * Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are `Excel.PictureFormat.BMP`, `Excel.PictureFormat.PNG`, `Excel.PictureFormat.JPEG`, and `Excel.PictureFormat.GIF`. * * @remarks * [Api set: ExcelApi 1.9] * * @param format Specifies the format of the image. */ getAsImage(format: Excel.PictureFormat): OfficeExtension.ClientResult; /** * Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are `Excel.PictureFormat.BMP`, `Excel.PictureFormat.PNG`, `Excel.PictureFormat.JPEG`, and `Excel.PictureFormat.GIF`. * * @remarks * [Api set: ExcelApi 1.9] * * @param format Specifies the format of the image. */ getAsImage(format: "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"): OfficeExtension.ClientResult; /** * Moves the shape horizontally by the specified number of points. * * @remarks * [Api set: ExcelApi 1.9] * * @param increment The increment, in points, the shape will be horizontally moved. A positive value moves the shape to the right and a negative value moves it to the left. If the sheet is right-to-left oriented, this is reversed: positive values will move the shape to the left and negative values will move it to the right. */ incrementLeft(increment: number): void; /** * Rotates the shape clockwise around the z-axis by the specified number of degrees. Use the `rotation` property to set the absolute rotation of the shape. * * @remarks * [Api set: ExcelApi 1.9] * * @param increment How many degrees the shape will be rotated. A positive value rotates the shape clockwise and a negative value rotates it counterclockwise. */ incrementRotation(increment: number): void; /** * Moves the shape vertically by the specified number of points. * * @remarks * [Api set: ExcelApi 1.9] * * @param increment The increment, in points, the shape will be vertically moved. A positive value moves the shape down and a negative value moves it up. */ incrementTop(increment: number): void; /** * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. * * @remarks * [Api set: ExcelApi 1.9] * * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. * @param scaleFrom Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. */ scaleHeight(scaleFactor: number, scaleType: Excel.ShapeScaleType, scaleFrom?: Excel.ShapeScaleFrom): void; /** * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. * * @remarks * [Api set: ExcelApi 1.9] * * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. * @param scaleFrom Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. */ scaleHeight(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; /** * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current width. * * @remarks * [Api set: ExcelApi 1.9] * * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. * @param scaleFrom Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. */ scaleWidth(scaleFactor: number, scaleType: Excel.ShapeScaleType, scaleFrom?: Excel.ShapeScaleFrom): void; /** * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current width. * * @remarks * [Api set: ExcelApi 1.9] * * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. * @param scaleFrom Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. */ scaleWidth(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; /** * Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes. * * @remarks * [Api set: ExcelApi 1.9] * * @param position Where to move the shape in the z-order stack relative to the other shapes. See `Excel.ShapeZOrder` for details. */ setZOrder(position: Excel.ShapeZOrder): void; /** * Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes. * * @remarks * [Api set: ExcelApi 1.9] * * @param position Where to move the shape in the z-order stack relative to the other shapes. See `Excel.ShapeZOrder` for details. */ setZOrder(position: "BringToFront" | "BringForward" | "SendToBack" | "SendBackward"): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ShapeLoadOptions): Excel.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Shape; /** * Occurs when the shape is activated. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onActivated: OfficeExtension.EventHandlers; /** * Occurs when the shape is deactivated. * * @remarks * [Api set: ExcelApi 1.9] * * @eventproperty */ readonly onDeactivated: OfficeExtension.EventHandlers; /** * 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.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ShapeData; } /** * Represents a geometric shape inside a worksheet. A geometric shape can be a rectangle, block arrow, equation symbol, flowchart item, star, banner, callout, or any other basic shape in Excel. * * @remarks * [Api set: ExcelApi 1.9] */ class GeometricShape extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the `Shape` object for the geometric shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly shape: Excel.Shape; /** * Returns the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ readonly id: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.GeometricShapeLoadOptions): Excel.GeometricShape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.GeometricShape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.GeometricShape; /** * 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.GeometricShape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.GeometricShapeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.GeometricShapeData; } /** * Represents an image in the worksheet. To get the corresponding `Shape` object, use `Image.shape`. * * @remarks * [Api set: ExcelApi 1.9] */ class Image extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the `Shape` object associated with the image. * * @remarks * [Api set: ExcelApi 1.9] */ readonly shape: Excel.Shape; /** * Specifies the shape identifier for the image object. * * @remarks * [Api set: ExcelApi 1.9] */ readonly id: string; /** * Returns the format of the image. * * @remarks * [Api set: ExcelApi 1.9] */ readonly format: Excel.PictureFormat | "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ImageLoadOptions): Excel.Image; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Image; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Image; /** * 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.Image object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ImageData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ImageData; } /** * Represents a shape group inside a worksheet. To get the corresponding `Shape` object, use `ShapeGroup.shape`. * * @remarks * [Api set: ExcelApi 1.9] */ class ShapeGroup extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the `Shape` object associated with the group. * * @remarks * [Api set: ExcelApi 1.9] */ readonly shape: Excel.Shape; /** * Returns the collection of `Shape` objects. * * @remarks * [Api set: ExcelApi 1.9] */ readonly shapes: Excel.GroupShapeCollection; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ readonly id: string; /** * Ungroups any grouped shapes in the specified shape group. * * @remarks * [Api set: ExcelApi 1.9] */ ungroup(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ShapeGroupLoadOptions): Excel.ShapeGroup; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ShapeGroup; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ShapeGroup; /** * 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.ShapeGroup object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeGroupData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ShapeGroupData; } /** * Represents the shape collection inside a shape group. * * @remarks * [Api set: ExcelApi 1.9] */ class GroupShapeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Shape[]; /** * Returns the number of shapes in the shape group. * * @remarks * [Api set: ExcelApi 1.9] */ getCount(): OfficeExtension.ClientResult; /** * Gets a shape using its name or ID. * * @remarks * [Api set: ExcelApi 1.9] * * @param key The name or ID of the shape to be retrieved. */ getItem(key: string): Excel.Shape; /** * Gets a shape based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.9] * * @param index The zero-based index value of the object to be retrieved. */ getItemAt(index: number): Excel.Shape; /** * Gets a shape using its name or ID. If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.14] * * @param key The name or ID of the shape to be retrieved. */ getItemOrNullObject(key: string): Excel.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.GroupShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.GroupShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.GroupShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.GroupShapeCollection; /** * 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.GroupShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.GroupShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.GroupShapeCollectionData; } /** * Represents a line inside a worksheet. To get the corresponding `Shape` object, use `Line.shape`. * * @remarks * [Api set: ExcelApi 1.9] */ class Line extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the shape to which the beginning of the specified line is attached. * * @remarks * [Api set: ExcelApi 1.9] */ readonly beginConnectedShape: Excel.Shape; /** * Represents the shape to which the end of the specified line is attached. * * @remarks * [Api set: ExcelApi 1.9] */ readonly endConnectedShape: Excel.Shape; /** * Returns the `Shape` object associated with the line. * * @remarks * [Api set: ExcelApi 1.9] */ readonly shape: Excel.Shape; /** * Represents the length of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadLength: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; /** * Represents the style of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadStyle: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; /** * Represents the width of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadWidth: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; /** * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly beginConnectedSite: number; /** * Represents the length of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadLength: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; /** * Represents the style of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadStyle: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; /** * Represents the width of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadWidth: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; /** * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly endConnectedSite: number; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ readonly id: string; /** * Specifies if the beginning of the specified line is connected to a shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly isBeginConnected: boolean; /** * Specifies if the end of the specified line is connected to a shape. * * @remarks * [Api set: ExcelApi 1.9] */ readonly isEndConnected: boolean; /** * Represents the connector type for the line. * * @remarks * [Api set: ExcelApi 1.9] */ connectorType: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.LineUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Line): void; /** * Attaches the beginning of the specified connector to a specified shape. * * @remarks * [Api set: ExcelApi 1.9] * * @param shape The shape to connect. * @param connectionSite The connection site on the shape to which the beginning of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). */ connectBeginShape(shape: Excel.Shape, connectionSite: number): void; /** * Attaches the end of the specified connector to a specified shape. * * @remarks * [Api set: ExcelApi 1.9] * * @param shape The shape to connect. * @param connectionSite The connection site on the shape to which the end of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). */ connectEndShape(shape: Excel.Shape, connectionSite: number): void; /** * Detaches the beginning of the specified connector from a shape. * * @remarks * [Api set: ExcelApi 1.9] */ disconnectBeginShape(): void; /** * Detaches the end of the specified connector from a shape. * * @remarks * [Api set: ExcelApi 1.9] */ disconnectEndShape(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.LineLoadOptions): Excel.Line; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Line; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Line; /** * 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.Line object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LineData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.LineData; } /** * Represents the fill formatting of a shape object. * * @remarks * [Api set: ExcelApi 1.9] */ class ShapeFill extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.9] */ foregroundColor: string; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: ExcelApi 1.9] */ transparency: number; /** * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readonly type: Excel.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "Mixed"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ShapeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ShapeFill): void; /** * Clears the fill formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ clear(): void; /** * Sets the fill formatting of the shape to a uniform color. This changes the fill type to "Solid". * * @remarks * [Api set: ExcelApi 1.9] * * @param color A string that represents the fill color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). */ setSolidColor(color: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ShapeFillLoadOptions): Excel.ShapeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ShapeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ShapeFill; /** * 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.ShapeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ShapeFillData; } /** * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ class ShapeLineFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ color: string; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ dashStyle: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ style: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; /** * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. * * @remarks * [Api set: ExcelApi 1.9] */ transparency: number; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: ExcelApi 1.9] */ visible: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: ExcelApi 1.9] */ weight: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ShapeLineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ShapeLineFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ShapeLineFormatLoadOptions): Excel.ShapeLineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ShapeLineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ShapeLineFormat; /** * 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.ShapeLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeLineFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ShapeLineFormatData; } /** * Represents the text frame of a shape object. * * @remarks * [Api set: ExcelApi 1.9] */ class TextFrame extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See `Excel.TextRange` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readonly textRange: Excel.TextRange; /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: ExcelApi 1.9] */ autoSizeSetting: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin: number; /** * Specifies if the text frame contains text. * * @remarks * [Api set: ExcelApi 1.9] */ readonly hasText: boolean; /** * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalAlignment: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; /** * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalOverflow: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin: number; /** * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. * * @remarks * [Api set: ExcelApi 1.9] */ orientation: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; /** * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin: number; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin: number; /** * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalAlignment: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; /** * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalOverflow: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TextFrameUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TextFrame): void; /** * Deletes all the text in the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ deleteText(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TextFrameLoadOptions): Excel.TextFrame; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TextFrame; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TextFrame; /** * 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.TextFrame object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TextFrameData; } /** * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. * * @remarks * [Api set: ExcelApi 1.9] */ class TextRange extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a `ShapeFont` object that represents the font attributes for the text range. * * @remarks * [Api set: ExcelApi 1.9] */ readonly font: Excel.ShapeFont; /** * Represents the plain text content of the text range. * * @remarks * [Api set: ExcelApi 1.9] */ text: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TextRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.TextRange): void; /** * Returns a TextRange object for the substring in the given range. * * @remarks * [Api set: ExcelApi 1.9] * * @param start The zero-based index of the first character to get from the text range. * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. */ getSubstring(start: number, length?: number): Excel.TextRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.TextRangeLoadOptions): Excel.TextRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.TextRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.TextRange; /** * 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.TextRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TextRangeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.TextRangeData; } /** * Represents the font attributes, such as font name, font size, and color, for a shape's `TextRange` object. * * @remarks * [Api set: ExcelApi 1.9] */ class ShapeFont extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ bold: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: ExcelApi 1.9] */ color: string; /** * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ italic: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: ExcelApi 1.9] */ name: string; /** * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. * * @remarks * [Api set: ExcelApi 1.9] */ size: number; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ underline: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ShapeFontUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.ShapeFont): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.ShapeFontLoadOptions): Excel.ShapeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.ShapeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ShapeFont; /** * 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.ShapeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeFontData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.ShapeFontData; } /** * Represents a `Slicer` object in the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ class Slicer extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the collection of slicer items that are part of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ readonly slicerItems: Excel.SlicerItemCollection; /** * Represents the worksheet containing the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ readonly worksheet: Excel.Worksheet; /** * Represents the caption of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ caption: string; /** * Represents the height, in points, of the slicer. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ height: number; /** * Represents the unique ID of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ readonly id: string; /** * Value is `true` if all filters currently applied on the slicer are cleared. * * @remarks * [Api set: ExcelApi 1.10] */ readonly isFilterCleared: boolean; /** * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ left: number; /** * Represents the name of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ name: string; /** * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". * * @remarks * [Api set: ExcelApi 1.10] */ sortBy: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; /** * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.10] */ style: string; /** * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ top: number; /** * Represents the width, in points, of the slicer. Throws an `InvalidArgument` error when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.SlicerUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Slicer): void; /** * Clears all the filters currently applied on the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ clearFilters(): void; /** * Deletes the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ delete(): void; /** * Returns an array of selected items' keys. * * @remarks * [Api set: ExcelApi 1.10] */ getSelectedItems(): OfficeExtension.ClientResult; /** * Selects slicer items based on their keys. The previous selections are cleared. All items will be selected by default if the array is empty. * * @remarks * [Api set: ExcelApi 1.10] * * @param items Optional. The specified slicer item names to be selected. */ selectItems(items?: string[]): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SlicerLoadOptions): Excel.Slicer; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.Slicer; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.Slicer; /** * 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.Slicer object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.SlicerData; } /** * Represents a collection of all the slicer objects in the workbook or a worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ class SlicerCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Slicer[]; /** * Adds a new slicer to the workbook. * * @remarks * [Api set: ExcelApi 1.10] * * @param slicerSource The data source that the new slicer will be based on. It can be a `PivotTable` object, a `Table` object, or a string. When a PivotTable object is passed, the data source is the source of the `PivotTable` object. When a `Table` object is passed, the data source is the `Table` object. When a string is passed, it is interpreted as the name or ID of a PivotTable or table. * @param sourceField The field in the data source to filter by. It can be a `PivotField` object, a `TableColumn` object, the ID of a `PivotField` or the name or ID of a `TableColumn`. * @param slicerDestination Optional. The worksheet in which the new slicer will be created. It can be a `Worksheet` object or the name or ID of a worksheet. This parameter can be omitted if the slicer collection is retrieved from a worksheet. * @returns The new slicer. */ add(slicerSource: string | PivotTable | Table, sourceField: string | PivotField | number | TableColumn, slicerDestination?: string | Worksheet): Excel.Slicer; /** * Returns the number of slicers in the collection. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Gets a slicer object using its name or ID. * * @remarks * [Api set: ExcelApi 1.10] * * @param key The name or ID of the slicer. */ getItem(key: string): Excel.Slicer; /** * Gets a slicer based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.10] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Slicer; /** * Gets a slicer using its name or ID. If the slicer doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.10] * * @param key Name or ID of the slicer to be retrieved. */ getItemOrNullObject(key: string): Excel.Slicer; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SlicerCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.SlicerCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerCollection; /** * 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.SlicerCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.SlicerCollectionData; } /** * Represents a slicer item in a slicer. * * @remarks * [Api set: ExcelApi 1.10] */ class SlicerItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Value is `true` if the slicer item has data. * * @remarks * [Api set: ExcelApi 1.10] */ readonly hasData: boolean; /** * Value is `true` if the slicer item is selected. Setting this value will not clear the selected state of other slicer items. By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. * * @remarks * [Api set: ExcelApi 1.10] */ isSelected: boolean; /** * Represents the unique value representing the slicer item. * * @remarks * [Api set: ExcelApi 1.10] */ readonly key: string; /** * Represents the title displayed in the Excel UI. * * @remarks * [Api set: ExcelApi 1.10] */ readonly name: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.SlicerItemUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.SlicerItem): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SlicerItemLoadOptions): Excel.SlicerItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.SlicerItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.SlicerItem; /** * 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.SlicerItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.SlicerItemData; } /** * Represents a collection of all the slicer item objects in the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ class SlicerItemCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.SlicerItem[]; /** * Returns the number of slicer items in the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ getCount(): OfficeExtension.ClientResult; /** * Gets a slicer item object using its key or name. * * @remarks * [Api set: ExcelApi 1.10] * * @param key The key or name of the slicer item. */ getItem(key: string): Excel.SlicerItem; /** * Gets a slicer item based on its position in the collection. * * @remarks * [Api set: ExcelApi 1.10] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.SlicerItem; /** * Gets a slicer item using its key or name. If the slicer item doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.10] * * @param key Key or name of the slicer to be retrieved. */ getItemOrNullObject(key: string): Excel.SlicerItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.SlicerItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.SlicerItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerItemCollection; /** * 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.SlicerItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.SlicerItemCollectionData; } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisType { /** * @remarks * [Api set: ExcelApi 1.7] */ invalid = "Invalid", /** * Axis displays categories. * @remarks * [Api set: ExcelApi 1.7] */ category = "Category", /** * Axis displays values. * @remarks * [Api set: ExcelApi 1.7] */ value = "Value", /** * Axis displays data series. * @remarks * [Api set: ExcelApi 1.7] */ series = "Series" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisGroup { /** * @remarks * [Api set: ExcelApi 1.7] */ primary = "Primary", /** * @remarks * [Api set: ExcelApi 1.7] */ secondary = "Secondary" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisScaleType { /** * @remarks * [Api set: ExcelApi 1.7] */ linear = "Linear", /** * @remarks * [Api set: ExcelApi 1.7] */ logarithmic = "Logarithmic" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisPosition { /** * @remarks * [Api set: ExcelApi 1.7] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.7] */ maximum = "Maximum", /** * @remarks * [Api set: ExcelApi 1.7] */ minimum = "Minimum", /** * @remarks * [Api set: ExcelApi 1.7] */ custom = "Custom" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisTickMark { /** * @remarks * [Api set: ExcelApi 1.7] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.7] */ cross = "Cross", /** * @remarks * [Api set: ExcelApi 1.7] */ inside = "Inside", /** * @remarks * [Api set: ExcelApi 1.7] */ outside = "Outside" } /** * Represents the state of calculation across the entire Excel application. * * @remarks * [Api set: ExcelApi 1.9] */ enum CalculationState { /** * Calculations complete. * @remarks * [Api set: ExcelApi 1.9] */ done = "Done", /** * Calculations in progress. * @remarks * [Api set: ExcelApi 1.9] */ calculating = "Calculating", /** * Changes that trigger calculation have been made, but a recalculation has not yet been performed. * @remarks * [Api set: ExcelApi 1.9] */ pending = "Pending" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisTickLabelPosition { /** * @remarks * [Api set: ExcelApi 1.7] */ nextToAxis = "NextToAxis", /** * @remarks * [Api set: ExcelApi 1.7] */ high = "High", /** * @remarks * [Api set: ExcelApi 1.7] */ low = "Low", /** * @remarks * [Api set: ExcelApi 1.7] */ none = "None" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisDisplayUnit { /** * Default option. This will reset display unit to the axis, and set unit label invisible. * @remarks * [Api set: ExcelApi 1.7] */ none = "None", /** * This will set the axis in units of hundreds. * @remarks * [Api set: ExcelApi 1.7] */ hundreds = "Hundreds", /** * This will set the axis in units of thousands. * @remarks * [Api set: ExcelApi 1.7] */ thousands = "Thousands", /** * This will set the axis in units of tens of thousands. * @remarks * [Api set: ExcelApi 1.7] */ tenThousands = "TenThousands", /** * This will set the axis in units of hundreds of thousands. * @remarks * [Api set: ExcelApi 1.7] */ hundredThousands = "HundredThousands", /** * This will set the axis in units of millions. * @remarks * [Api set: ExcelApi 1.7] */ millions = "Millions", /** * This will set the axis in units of tens of millions. * @remarks * [Api set: ExcelApi 1.7] */ tenMillions = "TenMillions", /** * This will set the axis in units of hundreds of millions. * @remarks * [Api set: ExcelApi 1.7] */ hundredMillions = "HundredMillions", /** * This will set the axis in units of billions. * @remarks * [Api set: ExcelApi 1.7] */ billions = "Billions", /** * This will set the axis in units of trillions. * @remarks * [Api set: ExcelApi 1.7] */ trillions = "Trillions", /** * This will set the axis in units of custom value. * @remarks * [Api set: ExcelApi 1.7] */ custom = "Custom" } /** * Specifies the unit of time for chart axes and data series. * * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisTimeUnit { /** * @remarks * [Api set: ExcelApi 1.7] */ days = "Days", /** * @remarks * [Api set: ExcelApi 1.7] */ months = "Months", /** * @remarks * [Api set: ExcelApi 1.7] */ years = "Years" } /** * Represents the quartile calculation type of chart series layout. Only applies to a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartBoxQuartileCalculation { /** * @remarks * [Api set: ExcelApi 1.9] */ inclusive = "Inclusive", /** * @remarks * [Api set: ExcelApi 1.9] */ exclusive = "Exclusive" } /** * Specifies the type of the category axis. * * @remarks * [Api set: ExcelApi 1.7] */ enum ChartAxisCategoryType { /** * Excel controls the axis type. * @remarks * [Api set: ExcelApi 1.7] */ automatic = "Automatic", /** * Axis groups data by an arbitrary set of categories. * @remarks * [Api set: ExcelApi 1.7] */ textAxis = "TextAxis", /** * Axis groups data on a time scale. * @remarks * [Api set: ExcelApi 1.7] */ dateAxis = "DateAxis" } /** * Specifies the bin type of a histogram chart or pareto chart series. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartBinType { /** * @remarks * [Api set: ExcelApi 1.9] */ category = "Category", /** * @remarks * [Api set: ExcelApi 1.9] */ auto = "Auto", /** * @remarks * [Api set: ExcelApi 1.9] */ binWidth = "BinWidth", /** * @remarks * [Api set: ExcelApi 1.9] */ binCount = "BinCount" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartLineStyle { /** * @remarks * [Api set: ExcelApi 1.7] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.7] */ continuous = "Continuous", /** * @remarks * [Api set: ExcelApi 1.7] */ dash = "Dash", /** * @remarks * [Api set: ExcelApi 1.7] */ dashDot = "DashDot", /** * @remarks * [Api set: ExcelApi 1.7] */ dashDotDot = "DashDotDot", /** * @remarks * [Api set: ExcelApi 1.7] */ dot = "Dot", /** * @remarks * [Api set: ExcelApi 1.7] */ grey25 = "Grey25", /** * @remarks * [Api set: ExcelApi 1.7] */ grey50 = "Grey50", /** * @remarks * [Api set: ExcelApi 1.7] */ grey75 = "Grey75", /** * @remarks * [Api set: ExcelApi 1.7] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.7] */ roundDot = "RoundDot" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum ChartDataLabelPosition { /** * @remarks * [Api set: ExcelApi 1.1] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.1] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.1] */ center = "Center", /** * @remarks * [Api set: ExcelApi 1.1] */ insideEnd = "InsideEnd", /** * @remarks * [Api set: ExcelApi 1.1] */ insideBase = "InsideBase", /** * @remarks * [Api set: ExcelApi 1.1] */ outsideEnd = "OutsideEnd", /** * @remarks * [Api set: ExcelApi 1.1] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.1] */ right = "Right", /** * @remarks * [Api set: ExcelApi 1.1] */ top = "Top", /** * @remarks * [Api set: ExcelApi 1.1] */ bottom = "Bottom", /** * @remarks * [Api set: ExcelApi 1.1] */ bestFit = "BestFit", /** * @remarks * [Api set: ExcelApi 1.1] */ callout = "Callout" } /** * Represents which parts of the error bar to include. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartErrorBarsInclude { /** * @remarks * [Api set: ExcelApi 1.9] */ both = "Both", /** * @remarks * [Api set: ExcelApi 1.9] */ minusValues = "MinusValues", /** * @remarks * [Api set: ExcelApi 1.9] */ plusValues = "PlusValues" } /** * Represents the range type for error bars. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartErrorBarsType { /** * @remarks * [Api set: ExcelApi 1.9] */ fixedValue = "FixedValue", /** * @remarks * [Api set: ExcelApi 1.9] */ percent = "Percent", /** * @remarks * [Api set: ExcelApi 1.9] */ stDev = "StDev", /** * @remarks * [Api set: ExcelApi 1.9] */ stError = "StError", /** * @remarks * [Api set: ExcelApi 1.9] */ custom = "Custom" } /** * Represents the mapping level of a chart series. This only applies to region map charts. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartMapAreaLevel { /** * @remarks * [Api set: ExcelApi 1.9] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.9] */ dataOnly = "DataOnly", /** * @remarks * [Api set: ExcelApi 1.9] */ city = "City", /** * @remarks * [Api set: ExcelApi 1.9] */ county = "County", /** * @remarks * [Api set: ExcelApi 1.9] */ state = "State", /** * @remarks * [Api set: ExcelApi 1.9] */ country = "Country", /** * @remarks * [Api set: ExcelApi 1.9] */ continent = "Continent", /** * @remarks * [Api set: ExcelApi 1.9] */ world = "World" } /** * Represents the gradient style of a chart series. This is only applicable for region map charts. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartGradientStyle { /** * @remarks * [Api set: ExcelApi 1.9] */ twoPhaseColor = "TwoPhaseColor", /** * @remarks * [Api set: ExcelApi 1.9] */ threePhaseColor = "ThreePhaseColor" } /** * Represents the gradient style type of a chart series. This is only applicable for region map charts. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartGradientStyleType { /** * @remarks * [Api set: ExcelApi 1.9] */ extremeValue = "ExtremeValue", /** * @remarks * [Api set: ExcelApi 1.9] */ number = "Number", /** * @remarks * [Api set: ExcelApi 1.9] */ percent = "Percent" } /** * Represents the position of the chart title. * * @remarks * [Api set: ExcelApi 1.7] */ enum ChartTitlePosition { /** * @remarks * [Api set: ExcelApi 1.7] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.7] */ top = "Top", /** * @remarks * [Api set: ExcelApi 1.7] */ bottom = "Bottom", /** * @remarks * [Api set: ExcelApi 1.7] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.7] */ right = "Right" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum ChartLegendPosition { /** * @remarks * [Api set: ExcelApi 1.1] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.1] */ top = "Top", /** * @remarks * [Api set: ExcelApi 1.1] */ bottom = "Bottom", /** * @remarks * [Api set: ExcelApi 1.1] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.1] */ right = "Right", /** * @remarks * [Api set: ExcelApi 1.1] */ corner = "Corner", /** * @remarks * [Api set: ExcelApi 1.1] */ custom = "Custom" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartMarkerStyle { /** * @remarks * [Api set: ExcelApi 1.7] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.7] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.7] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.7] */ square = "Square", /** * @remarks * [Api set: ExcelApi 1.7] */ diamond = "Diamond", /** * @remarks * [Api set: ExcelApi 1.7] */ triangle = "Triangle", /** * @remarks * [Api set: ExcelApi 1.7] */ x = "X", /** * @remarks * [Api set: ExcelApi 1.7] */ star = "Star", /** * @remarks * [Api set: ExcelApi 1.7] */ dot = "Dot", /** * @remarks * [Api set: ExcelApi 1.7] */ dash = "Dash", /** * @remarks * [Api set: ExcelApi 1.7] */ circle = "Circle", /** * @remarks * [Api set: ExcelApi 1.7] */ plus = "Plus", /** * @remarks * [Api set: ExcelApi 1.7] */ picture = "Picture" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum ChartPlotAreaPosition { /** * @remarks * [Api set: ExcelApi 1.8] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.8] */ custom = "Custom" } /** * Represents the region level of a chart series layout. This only applies to region map charts. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartMapLabelStrategy { /** * @remarks * [Api set: ExcelApi 1.9] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.9] */ bestFit = "BestFit", /** * @remarks * [Api set: ExcelApi 1.9] */ showAll = "ShowAll" } /** * Represents the region projection type of a chart series layout. This only applies to region map charts. * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartMapProjectionType { /** * @remarks * [Api set: ExcelApi 1.9] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.9] */ mercator = "Mercator", /** * @remarks * [Api set: ExcelApi 1.9] */ miller = "Miller", /** * @remarks * [Api set: ExcelApi 1.9] */ robinson = "Robinson", /** * @remarks * [Api set: ExcelApi 1.9] */ albers = "Albers" } /** * Represents the parent label strategy of the chart series layout. This only applies to treemap charts * * @remarks * [Api set: ExcelApi 1.9] */ enum ChartParentLabelStrategy { /** * @remarks * [Api set: ExcelApi 1.9] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.9] */ banner = "Banner", /** * @remarks * [Api set: ExcelApi 1.9] */ overlapping = "Overlapping" } /** * Specifies whether the series are by rows or by columns. In Excel on desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns. In Excel on the web, "auto" will simply default to "columns". * * @remarks * [Api set: ExcelApi 1.1] */ enum ChartSeriesBy { /** * In Excel on desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns. In Excel on the web, "auto" will simply default to "columns". * @remarks * [Api set: ExcelApi 1.1] */ auto = "Auto", /** * @remarks * [Api set: ExcelApi 1.1] */ columns = "Columns", /** * @remarks * [Api set: ExcelApi 1.1] */ rows = "Rows" } /** * Specifies the data source type of the chart series. * * @remarks * [Api set: ExcelApi 1.15] */ enum ChartDataSourceType { /** * The data source type of the chart series is a local range. * @remarks * [Api set: ExcelApi 1.15] */ localRange = "LocalRange", /** * The data source type of the chart series is an external range. * @remarks * [Api set: ExcelApi 1.15] */ externalRange = "ExternalRange", /** * The data source type of the chart series is a list. * @remarks * [Api set: ExcelApi 1.15] */ list = "List", /** * The data source type of the chart series is unknown or unsupported. * @remarks * [Api set: ExcelApi 1.15] */ unknown = "Unknown" } /** * Represents the horizontal alignment for the specified object. * * @remarks * [Api set: ExcelApi 1.7] */ enum ChartTextHorizontalAlignment { /** * @remarks * [Api set: ExcelApi 1.7] */ center = "Center", /** * @remarks * [Api set: ExcelApi 1.7] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.7] */ right = "Right", /** * @remarks * [Api set: ExcelApi 1.7] */ justify = "Justify", /** * @remarks * [Api set: ExcelApi 1.7] */ distributed = "Distributed" } /** * Represents the vertical alignment for the specified object. * * @remarks * [Api set: ExcelApi 1.7] */ enum ChartTextVerticalAlignment { /** * @remarks * [Api set: ExcelApi 1.7] */ center = "Center", /** * @remarks * [Api set: ExcelApi 1.7] */ bottom = "Bottom", /** * @remarks * [Api set: ExcelApi 1.7] */ top = "Top", /** * @remarks * [Api set: ExcelApi 1.7] */ justify = "Justify", /** * @remarks * [Api set: ExcelApi 1.7] */ distributed = "Distributed" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum ChartTickLabelAlignment { /** * @remarks * [Api set: ExcelApi 1.8] */ center = "Center", /** * @remarks * [Api set: ExcelApi 1.8] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.8] */ right = "Right" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum ChartType { /** * @remarks * [Api set: ExcelApi 1.1] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.1] */ columnClustered = "ColumnClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ columnStacked = "ColumnStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ columnStacked100 = "ColumnStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DColumnClustered = "3DColumnClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DColumnStacked = "3DColumnStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DColumnStacked100 = "3DColumnStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ barClustered = "BarClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ barStacked = "BarStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ barStacked100 = "BarStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DBarClustered = "3DBarClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DBarStacked = "3DBarStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DBarStacked100 = "3DBarStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ lineStacked = "LineStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ lineStacked100 = "LineStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ lineMarkers = "LineMarkers", /** * @remarks * [Api set: ExcelApi 1.1] */ lineMarkersStacked = "LineMarkersStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ lineMarkersStacked100 = "LineMarkersStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ pieOfPie = "PieOfPie", /** * @remarks * [Api set: ExcelApi 1.1] */ pieExploded = "PieExploded", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DPieExploded = "3DPieExploded", /** * @remarks * [Api set: ExcelApi 1.1] */ barOfPie = "BarOfPie", /** * @remarks * [Api set: ExcelApi 1.1] */ xyscatterSmooth = "XYScatterSmooth", /** * @remarks * [Api set: ExcelApi 1.1] */ xyscatterSmoothNoMarkers = "XYScatterSmoothNoMarkers", /** * @remarks * [Api set: ExcelApi 1.1] */ xyscatterLines = "XYScatterLines", /** * @remarks * [Api set: ExcelApi 1.1] */ xyscatterLinesNoMarkers = "XYScatterLinesNoMarkers", /** * @remarks * [Api set: ExcelApi 1.1] */ areaStacked = "AreaStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ areaStacked100 = "AreaStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DAreaStacked = "3DAreaStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DAreaStacked100 = "3DAreaStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ doughnutExploded = "DoughnutExploded", /** * @remarks * [Api set: ExcelApi 1.1] */ radarMarkers = "RadarMarkers", /** * @remarks * [Api set: ExcelApi 1.1] */ radarFilled = "RadarFilled", /** * @remarks * [Api set: ExcelApi 1.1] */ surface = "Surface", /** * @remarks * [Api set: ExcelApi 1.1] */ surfaceWireframe = "SurfaceWireframe", /** * @remarks * [Api set: ExcelApi 1.1] */ surfaceTopView = "SurfaceTopView", /** * @remarks * [Api set: ExcelApi 1.1] */ surfaceTopViewWireframe = "SurfaceTopViewWireframe", /** * @remarks * [Api set: ExcelApi 1.1] */ bubble = "Bubble", /** * @remarks * [Api set: ExcelApi 1.1] */ bubble3DEffect = "Bubble3DEffect", /** * @remarks * [Api set: ExcelApi 1.1] */ stockHLC = "StockHLC", /** * @remarks * [Api set: ExcelApi 1.1] */ stockOHLC = "StockOHLC", /** * @remarks * [Api set: ExcelApi 1.1] */ stockVHLC = "StockVHLC", /** * @remarks * [Api set: ExcelApi 1.1] */ stockVOHLC = "StockVOHLC", /** * @remarks * [Api set: ExcelApi 1.1] */ cylinderColClustered = "CylinderColClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ cylinderColStacked = "CylinderColStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ cylinderColStacked100 = "CylinderColStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ cylinderBarClustered = "CylinderBarClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ cylinderBarStacked = "CylinderBarStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ cylinderBarStacked100 = "CylinderBarStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ cylinderCol = "CylinderCol", /** * @remarks * [Api set: ExcelApi 1.1] */ coneColClustered = "ConeColClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ coneColStacked = "ConeColStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ coneColStacked100 = "ConeColStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ coneBarClustered = "ConeBarClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ coneBarStacked = "ConeBarStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ coneBarStacked100 = "ConeBarStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ coneCol = "ConeCol", /** * @remarks * [Api set: ExcelApi 1.1] */ pyramidColClustered = "PyramidColClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ pyramidColStacked = "PyramidColStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ pyramidColStacked100 = "PyramidColStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ pyramidBarClustered = "PyramidBarClustered", /** * @remarks * [Api set: ExcelApi 1.1] */ pyramidBarStacked = "PyramidBarStacked", /** * @remarks * [Api set: ExcelApi 1.1] */ pyramidBarStacked100 = "PyramidBarStacked100", /** * @remarks * [Api set: ExcelApi 1.1] */ pyramidCol = "PyramidCol", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DColumn = "3DColumn", /** * @remarks * [Api set: ExcelApi 1.1] */ line = "Line", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DLine = "3DLine", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DPie = "3DPie", /** * @remarks * [Api set: ExcelApi 1.1] */ pie = "Pie", /** * @remarks * [Api set: ExcelApi 1.1] */ xyscatter = "XYScatter", /** * @remarks * [Api set: ExcelApi 1.1] */ _3DArea = "3DArea", /** * @remarks * [Api set: ExcelApi 1.1] */ area = "Area", /** * @remarks * [Api set: ExcelApi 1.1] */ doughnut = "Doughnut", /** * @remarks * [Api set: ExcelApi 1.1] */ radar = "Radar", /** * @remarks * [Api set: ExcelApi 1.1] */ histogram = "Histogram", /** * @remarks * [Api set: ExcelApi 1.9] */ boxwhisker = "Boxwhisker", /** * @remarks * [Api set: ExcelApi 1.9] */ pareto = "Pareto", /** * @remarks * [Api set: ExcelApi 1.9] */ regionMap = "RegionMap", /** * @remarks * [Api set: ExcelApi 1.9] */ treemap = "Treemap", /** * @remarks * [Api set: ExcelApi 1.9] */ waterfall = "Waterfall", /** * @remarks * [Api set: ExcelApi 1.9] */ sunburst = "Sunburst", /** * @remarks * [Api set: ExcelApi 1.9] */ funnel = "Funnel" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum ChartUnderlineStyle { /** * @remarks * [Api set: ExcelApi 1.1] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.1] */ single = "Single" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum ChartDisplayBlanksAs { /** * @remarks * [Api set: ExcelApi 1.8] */ notPlotted = "NotPlotted", /** * @remarks * [Api set: ExcelApi 1.8] */ zero = "Zero", /** * @remarks * [Api set: ExcelApi 1.8] */ interplotted = "Interplotted" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum ChartPlotBy { /** * @remarks * [Api set: ExcelApi 1.8] */ rows = "Rows", /** * @remarks * [Api set: ExcelApi 1.8] */ columns = "Columns" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum ChartSplitType { /** * @remarks * [Api set: ExcelApi 1.8] */ splitByPosition = "SplitByPosition", /** * @remarks * [Api set: ExcelApi 1.8] */ splitByValue = "SplitByValue", /** * @remarks * [Api set: ExcelApi 1.8] */ splitByPercentValue = "SplitByPercentValue", /** * @remarks * [Api set: ExcelApi 1.8] */ splitByCustomSplit = "SplitByCustomSplit" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum ChartColorScheme { /** * @remarks * [Api set: ExcelApi 1.8] */ colorfulPalette1 = "ColorfulPalette1", /** * @remarks * [Api set: ExcelApi 1.8] */ colorfulPalette2 = "ColorfulPalette2", /** * @remarks * [Api set: ExcelApi 1.8] */ colorfulPalette3 = "ColorfulPalette3", /** * @remarks * [Api set: ExcelApi 1.8] */ colorfulPalette4 = "ColorfulPalette4", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette1 = "MonochromaticPalette1", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette2 = "MonochromaticPalette2", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette3 = "MonochromaticPalette3", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette4 = "MonochromaticPalette4", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette5 = "MonochromaticPalette5", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette6 = "MonochromaticPalette6", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette7 = "MonochromaticPalette7", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette8 = "MonochromaticPalette8", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette9 = "MonochromaticPalette9", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette10 = "MonochromaticPalette10", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette11 = "MonochromaticPalette11", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette12 = "MonochromaticPalette12", /** * @remarks * [Api set: ExcelApi 1.8] */ monochromaticPalette13 = "MonochromaticPalette13" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ChartTrendlineType { /** * @remarks * [Api set: ExcelApi 1.7] */ linear = "Linear", /** * @remarks * [Api set: ExcelApi 1.7] */ exponential = "Exponential", /** * @remarks * [Api set: ExcelApi 1.7] */ logarithmic = "Logarithmic", /** * @remarks * [Api set: ExcelApi 1.7] */ movingAverage = "MovingAverage", /** * @remarks * [Api set: ExcelApi 1.7] */ polynomial = "Polynomial", /** * @remarks * [Api set: ExcelApi 1.7] */ power = "Power" } /** * Specifies where in the z-order a shape should be moved relative to other shapes. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeZOrder { /** * @remarks * [Api set: ExcelApi 1.9] */ bringToFront = "BringToFront", /** * @remarks * [Api set: ExcelApi 1.9] */ bringForward = "BringForward", /** * @remarks * [Api set: ExcelApi 1.9] */ sendToBack = "SendToBack", /** * @remarks * [Api set: ExcelApi 1.9] */ sendBackward = "SendBackward" } /** * Specifies the type of a shape. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeType { /** * @remarks * [Api set: ExcelApi 1.9] */ unsupported = "Unsupported", /** * @remarks * [Api set: ExcelApi 1.9] */ image = "Image", /** * @remarks * [Api set: ExcelApi 1.9] */ geometricShape = "GeometricShape", /** * @remarks * [Api set: ExcelApi 1.9] */ group = "Group", /** * @remarks * [Api set: ExcelApi 1.9] */ line = "Line" } /** * Specifies whether the shape is scaled relative to its original or current size. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeScaleType { /** * @remarks * [Api set: ExcelApi 1.9] */ currentSize = "CurrentSize", /** * @remarks * [Api set: ExcelApi 1.9] */ originalSize = "OriginalSize" } /** * Specifies which part of the shape retains its position when the shape is scaled. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeScaleFrom { /** * @remarks * [Api set: ExcelApi 1.9] */ scaleFromTopLeft = "ScaleFromTopLeft", /** * @remarks * [Api set: ExcelApi 1.9] */ scaleFromMiddle = "ScaleFromMiddle", /** * @remarks * [Api set: ExcelApi 1.9] */ scaleFromBottomRight = "ScaleFromBottomRight" } /** * Specifies a shape's fill type. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeFillType { /** * No fill. * @remarks * [Api set: ExcelApi 1.9] */ noFill = "NoFill", /** * Solid fill. * @remarks * [Api set: ExcelApi 1.9] */ solid = "Solid", /** * Gradient fill. * @remarks * [Api set: ExcelApi 1.9] */ gradient = "Gradient", /** * Pattern fill. * @remarks * [Api set: ExcelApi 1.9] */ pattern = "Pattern", /** * Picture and texture fill. * @remarks * [Api set: ExcelApi 1.9] */ pictureAndTexture = "PictureAndTexture", /** * Mixed fill. * @remarks * [Api set: ExcelApi 1.9] */ mixed = "Mixed" } /** * The type of underline applied to a font. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeFontUnderlineStyle { /** * @remarks * [Api set: ExcelApi 1.9] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.9] */ single = "Single", /** * @remarks * [Api set: ExcelApi 1.9] */ double = "Double", /** * @remarks * [Api set: ExcelApi 1.9] */ heavy = "Heavy", /** * @remarks * [Api set: ExcelApi 1.9] */ dotted = "Dotted", /** * @remarks * [Api set: ExcelApi 1.9] */ dottedHeavy = "DottedHeavy", /** * @remarks * [Api set: ExcelApi 1.9] */ dash = "Dash", /** * @remarks * [Api set: ExcelApi 1.9] */ dashHeavy = "DashHeavy", /** * @remarks * [Api set: ExcelApi 1.9] */ dashLong = "DashLong", /** * @remarks * [Api set: ExcelApi 1.9] */ dashLongHeavy = "DashLongHeavy", /** * @remarks * [Api set: ExcelApi 1.9] */ dotDash = "DotDash", /** * @remarks * [Api set: ExcelApi 1.9] */ dotDashHeavy = "DotDashHeavy", /** * @remarks * [Api set: ExcelApi 1.9] */ dotDotDash = "DotDotDash", /** * @remarks * [Api set: ExcelApi 1.9] */ dotDotDashHeavy = "DotDotDashHeavy", /** * @remarks * [Api set: ExcelApi 1.9] */ wavy = "Wavy", /** * @remarks * [Api set: ExcelApi 1.9] */ wavyHeavy = "WavyHeavy", /** * @remarks * [Api set: ExcelApi 1.9] */ wavyDouble = "WavyDouble" } /** * The format of the image. * * @remarks * [Api set: ExcelApi 1.9] */ enum PictureFormat { /** * @remarks * [Api set: ExcelApi 1.9] */ unknown = "UNKNOWN", /** * Bitmap image. * @remarks * [Api set: ExcelApi 1.9] */ bmp = "BMP", /** * Joint Photographic Experts Group. * @remarks * [Api set: ExcelApi 1.9] */ jpeg = "JPEG", /** * Graphics Interchange Format. * @remarks * [Api set: ExcelApi 1.9] */ gif = "GIF", /** * Portable Network Graphics. * @remarks * [Api set: ExcelApi 1.9] */ png = "PNG", /** * Scalable Vector Graphic. * @remarks * [Api set: ExcelApi 1.9] */ svg = "SVG" } /** * The style for a line. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeLineStyle { /** * Single line. * @remarks * [Api set: ExcelApi 1.9] */ single = "Single", /** * Thick line with a thin line on each side. * @remarks * [Api set: ExcelApi 1.9] */ thickBetweenThin = "ThickBetweenThin", /** * Thick line next to thin line. For horizontal lines, the thick line is above the thin line. For vertical lines, the thick line is to the left of the thin line. * @remarks * [Api set: ExcelApi 1.9] */ thickThin = "ThickThin", /** * Thick line next to thin line. For horizontal lines, the thick line is below the thin line. For vertical lines, the thick line is to the right of the thin line. * @remarks * [Api set: ExcelApi 1.9] */ thinThick = "ThinThick", /** * Two thin lines. * @remarks * [Api set: ExcelApi 1.9] */ thinThin = "ThinThin" } /** * The dash style for a line. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeLineDashStyle { /** * @remarks * [Api set: ExcelApi 1.9] */ dash = "Dash", /** * @remarks * [Api set: ExcelApi 1.9] */ dashDot = "DashDot", /** * @remarks * [Api set: ExcelApi 1.9] */ dashDotDot = "DashDotDot", /** * @remarks * [Api set: ExcelApi 1.9] */ longDash = "LongDash", /** * @remarks * [Api set: ExcelApi 1.9] */ longDashDot = "LongDashDot", /** * @remarks * [Api set: ExcelApi 1.9] */ roundDot = "RoundDot", /** * @remarks * [Api set: ExcelApi 1.9] */ solid = "Solid", /** * @remarks * [Api set: ExcelApi 1.9] */ squareDot = "SquareDot", /** * @remarks * [Api set: ExcelApi 1.9] */ longDashDotDot = "LongDashDotDot", /** * @remarks * [Api set: ExcelApi 1.9] */ systemDash = "SystemDash", /** * @remarks * [Api set: ExcelApi 1.9] */ systemDot = "SystemDot", /** * @remarks * [Api set: ExcelApi 1.9] */ systemDashDot = "SystemDashDot" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum ArrowheadLength { /** * @remarks * [Api set: ExcelApi 1.9] */ short = "Short", /** * @remarks * [Api set: ExcelApi 1.9] */ medium = "Medium", /** * @remarks * [Api set: ExcelApi 1.9] */ long = "Long" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum ArrowheadStyle { /** * @remarks * [Api set: ExcelApi 1.9] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.9] */ triangle = "Triangle", /** * @remarks * [Api set: ExcelApi 1.9] */ stealth = "Stealth", /** * @remarks * [Api set: ExcelApi 1.9] */ diamond = "Diamond", /** * @remarks * [Api set: ExcelApi 1.9] */ oval = "Oval", /** * @remarks * [Api set: ExcelApi 1.9] */ open = "Open" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum ArrowheadWidth { /** * @remarks * [Api set: ExcelApi 1.9] */ narrow = "Narrow", /** * @remarks * [Api set: ExcelApi 1.9] */ medium = "Medium", /** * @remarks * [Api set: ExcelApi 1.9] */ wide = "Wide" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum BindingType { /** * @remarks * [Api set: ExcelApi 1.1] */ range = "Range", /** * @remarks * [Api set: ExcelApi 1.1] */ table = "Table", /** * @remarks * [Api set: ExcelApi 1.1] */ text = "Text" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum BorderIndex { /** * @remarks * [Api set: ExcelApi 1.1] */ edgeTop = "EdgeTop", /** * @remarks * [Api set: ExcelApi 1.1] */ edgeBottom = "EdgeBottom", /** * @remarks * [Api set: ExcelApi 1.1] */ edgeLeft = "EdgeLeft", /** * @remarks * [Api set: ExcelApi 1.1] */ edgeRight = "EdgeRight", /** * @remarks * [Api set: ExcelApi 1.1] */ insideVertical = "InsideVertical", /** * @remarks * [Api set: ExcelApi 1.1] */ insideHorizontal = "InsideHorizontal", /** * @remarks * [Api set: ExcelApi 1.1] */ diagonalDown = "DiagonalDown", /** * @remarks * [Api set: ExcelApi 1.1] */ diagonalUp = "DiagonalUp" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum BorderLineStyle { /** * @remarks * [Api set: ExcelApi 1.1] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.1] */ continuous = "Continuous", /** * @remarks * [Api set: ExcelApi 1.1] */ dash = "Dash", /** * @remarks * [Api set: ExcelApi 1.1] */ dashDot = "DashDot", /** * @remarks * [Api set: ExcelApi 1.1] */ dashDotDot = "DashDotDot", /** * @remarks * [Api set: ExcelApi 1.1] */ dot = "Dot", /** * @remarks * [Api set: ExcelApi 1.1] */ double = "Double", /** * @remarks * [Api set: ExcelApi 1.1] */ slantDashDot = "SlantDashDot" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum BorderWeight { /** * @remarks * [Api set: ExcelApi 1.1] */ hairline = "Hairline", /** * @remarks * [Api set: ExcelApi 1.1] */ thin = "Thin", /** * @remarks * [Api set: ExcelApi 1.1] */ medium = "Medium", /** * @remarks * [Api set: ExcelApi 1.1] */ thick = "Thick" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum CalculationMode { /** * The default recalculation behavior where Excel calculates new formula results every time the relevant data is changed. * @remarks * [Api set: ExcelApi 1.1] */ automatic = "Automatic", /** * Calculates new formula results every time the relevant data is changed, unless the formula is in a data table. * @remarks * [Api set: ExcelApi 1.1] */ automaticExceptTables = "AutomaticExceptTables", /** * Calculations only occur when the user or add-in requests them. * @remarks * [Api set: ExcelApi 1.1] */ manual = "Manual" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum CalculationType { /** * Recalculates all cells that Excel has marked as dirty, that is, dependents of volatile or changed data, and cells programmatically marked as dirty. * @remarks * [Api set: ExcelApi 1.1] */ recalculate = "Recalculate", /** * This will mark all cells as dirty and then recalculate them. * @remarks * [Api set: ExcelApi 1.1] */ full = "Full", /** * This will rebuild the full dependency chain, mark all cells as dirty and then recalculate them. * @remarks * [Api set: ExcelApi 1.1] */ fullRebuild = "FullRebuild" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum ClearApplyTo { /** * @remarks * [Api set: ExcelApi 1.1] */ all = "All", /** * Clears all formatting for the range. * @remarks * [Api set: ExcelApi 1.1] */ formats = "Formats", /** * Clears the contents of the range. * @remarks * [Api set: ExcelApi 1.1] */ contents = "Contents", /** * Clears all hyperlinks, but leaves all content and formatting intact. * @remarks * [Api set: ExcelApi 1.7] */ hyperlinks = "Hyperlinks", /** * Removes hyperlinks and formatting for the cell but leaves content, conditional formats, and data validation intact. * @remarks * [Api set: ExcelApi 1.7] */ removeHyperlinks = "RemoveHyperlinks" } /** * Represents the format options for a data bar axis. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalDataBarAxisFormat { /** * @remarks * [Api set: ExcelApi 1.6] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.6] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.6] */ cellMidPoint = "CellMidPoint" } /** * Represents the data bar direction within a cell. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalDataBarDirection { /** * @remarks * [Api set: ExcelApi 1.6] */ context = "Context", /** * @remarks * [Api set: ExcelApi 1.6] */ leftToRight = "LeftToRight", /** * @remarks * [Api set: ExcelApi 1.6] */ rightToLeft = "RightToLeft" } /** * Represents the direction for a selection. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalFormatDirection { /** * @remarks * [Api set: ExcelApi 1.6] */ top = "Top", /** * @remarks * [Api set: ExcelApi 1.6] */ bottom = "Bottom" } /** * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalFormatType { /** * @remarks * [Api set: ExcelApi 1.6] */ custom = "Custom", /** * @remarks * [Api set: ExcelApi 1.6] */ dataBar = "DataBar", /** * @remarks * [Api set: ExcelApi 1.6] */ colorScale = "ColorScale", /** * @remarks * [Api set: ExcelApi 1.6] */ iconSet = "IconSet", /** * @remarks * [Api set: ExcelApi 1.6] */ topBottom = "TopBottom", /** * @remarks * [Api set: ExcelApi 1.6] */ presetCriteria = "PresetCriteria", /** * @remarks * [Api set: ExcelApi 1.6] */ containsText = "ContainsText", /** * @remarks * [Api set: ExcelApi 1.6] */ cellValue = "CellValue" } /** * Represents the types of conditional format values. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalFormatRuleType { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ automatic = "Automatic", /** * @remarks * [Api set: ExcelApi 1.6] */ lowestValue = "LowestValue", /** * @remarks * [Api set: ExcelApi 1.6] */ highestValue = "HighestValue", /** * @remarks * [Api set: ExcelApi 1.6] */ number = "Number", /** * @remarks * [Api set: ExcelApi 1.6] */ percent = "Percent", /** * @remarks * [Api set: ExcelApi 1.6] */ formula = "Formula", /** * @remarks * [Api set: ExcelApi 1.6] */ percentile = "Percentile" } /** * Represents the types of icon conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalFormatIconRuleType { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ number = "Number", /** * @remarks * [Api set: ExcelApi 1.6] */ percent = "Percent", /** * @remarks * [Api set: ExcelApi 1.6] */ formula = "Formula", /** * @remarks * [Api set: ExcelApi 1.6] */ percentile = "Percentile" } /** * Represents the types of color criterion for conditional formatting. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalFormatColorCriterionType { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ lowestValue = "LowestValue", /** * @remarks * [Api set: ExcelApi 1.6] */ highestValue = "HighestValue", /** * @remarks * [Api set: ExcelApi 1.6] */ number = "Number", /** * @remarks * [Api set: ExcelApi 1.6] */ percent = "Percent", /** * @remarks * [Api set: ExcelApi 1.6] */ formula = "Formula", /** * @remarks * [Api set: ExcelApi 1.6] */ percentile = "Percentile" } /** * Represents the criteria for the above/below average conditional format type. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalTopBottomCriterionType { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ topItems = "TopItems", /** * @remarks * [Api set: ExcelApi 1.6] */ topPercent = "TopPercent", /** * @remarks * [Api set: ExcelApi 1.6] */ bottomItems = "BottomItems", /** * @remarks * [Api set: ExcelApi 1.6] */ bottomPercent = "BottomPercent" } /** * Represents the criteria of the preset criteria conditional format type. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalFormatPresetCriterion { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ blanks = "Blanks", /** * @remarks * [Api set: ExcelApi 1.6] */ nonBlanks = "NonBlanks", /** * @remarks * [Api set: ExcelApi 1.6] */ errors = "Errors", /** * @remarks * [Api set: ExcelApi 1.6] */ nonErrors = "NonErrors", /** * @remarks * [Api set: ExcelApi 1.6] */ yesterday = "Yesterday", /** * @remarks * [Api set: ExcelApi 1.6] */ today = "Today", /** * @remarks * [Api set: ExcelApi 1.6] */ tomorrow = "Tomorrow", /** * @remarks * [Api set: ExcelApi 1.6] */ lastSevenDays = "LastSevenDays", /** * @remarks * [Api set: ExcelApi 1.6] */ lastWeek = "LastWeek", /** * @remarks * [Api set: ExcelApi 1.6] */ thisWeek = "ThisWeek", /** * @remarks * [Api set: ExcelApi 1.6] */ nextWeek = "NextWeek", /** * @remarks * [Api set: ExcelApi 1.6] */ lastMonth = "LastMonth", /** * @remarks * [Api set: ExcelApi 1.6] */ thisMonth = "ThisMonth", /** * @remarks * [Api set: ExcelApi 1.6] */ nextMonth = "NextMonth", /** * @remarks * [Api set: ExcelApi 1.6] */ aboveAverage = "AboveAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ belowAverage = "BelowAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ equalOrAboveAverage = "EqualOrAboveAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ equalOrBelowAverage = "EqualOrBelowAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ oneStdDevAboveAverage = "OneStdDevAboveAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ oneStdDevBelowAverage = "OneStdDevBelowAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ twoStdDevAboveAverage = "TwoStdDevAboveAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ twoStdDevBelowAverage = "TwoStdDevBelowAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ threeStdDevAboveAverage = "ThreeStdDevAboveAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ threeStdDevBelowAverage = "ThreeStdDevBelowAverage", /** * @remarks * [Api set: ExcelApi 1.6] */ uniqueValues = "UniqueValues", /** * @remarks * [Api set: ExcelApi 1.6] */ duplicateValues = "DuplicateValues" } /** * Represents the operator of the text conditional format type. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalTextOperator { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ contains = "Contains", /** * @remarks * [Api set: ExcelApi 1.6] */ notContains = "NotContains", /** * @remarks * [Api set: ExcelApi 1.6] */ beginsWith = "BeginsWith", /** * @remarks * [Api set: ExcelApi 1.6] */ endsWith = "EndsWith" } /** * Represents the operator of the text conditional format type. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalCellValueOperator { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ between = "Between", /** * @remarks * [Api set: ExcelApi 1.6] */ notBetween = "NotBetween", /** * @remarks * [Api set: ExcelApi 1.6] */ equalTo = "EqualTo", /** * @remarks * [Api set: ExcelApi 1.6] */ notEqualTo = "NotEqualTo", /** * @remarks * [Api set: ExcelApi 1.6] */ greaterThan = "GreaterThan", /** * @remarks * [Api set: ExcelApi 1.6] */ lessThan = "LessThan", /** * @remarks * [Api set: ExcelApi 1.6] */ greaterThanOrEqual = "GreaterThanOrEqual", /** * @remarks * [Api set: ExcelApi 1.6] */ lessThanOrEqual = "LessThanOrEqual" } /** * Represents the operator for each icon criteria. * * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalIconCriterionOperator { /** * @remarks * [Api set: ExcelApi 1.6] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.6] */ greaterThan = "GreaterThan", /** * @remarks * [Api set: ExcelApi 1.6] */ greaterThanOrEqual = "GreaterThanOrEqual" } /** * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalRangeBorderIndex { /** * @remarks * [Api set: ExcelApi 1.6] */ edgeTop = "EdgeTop", /** * @remarks * [Api set: ExcelApi 1.6] */ edgeBottom = "EdgeBottom", /** * @remarks * [Api set: ExcelApi 1.6] */ edgeLeft = "EdgeLeft", /** * @remarks * [Api set: ExcelApi 1.6] */ edgeRight = "EdgeRight" } /** * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalRangeBorderLineStyle { /** * @remarks * [Api set: ExcelApi 1.6] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.6] */ continuous = "Continuous", /** * @remarks * [Api set: ExcelApi 1.6] */ dash = "Dash", /** * @remarks * [Api set: ExcelApi 1.6] */ dashDot = "DashDot", /** * @remarks * [Api set: ExcelApi 1.6] */ dashDotDot = "DashDotDot", /** * @remarks * [Api set: ExcelApi 1.6] */ dot = "Dot" } /** * @remarks * [Api set: ExcelApi 1.6] */ enum ConditionalRangeFontUnderlineStyle { /** * @remarks * [Api set: ExcelApi 1.6] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.6] */ single = "Single", /** * @remarks * [Api set: ExcelApi 1.6] */ double = "Double" } /** * Represents the data validation type enum. * * @remarks * [Api set: ExcelApi 1.8] */ enum DataValidationType { /** * None means allow any value, indicating that there is no data validation in the range. * @remarks * [Api set: ExcelApi 1.8] */ none = "None", /** * The whole number data validation type. * @remarks * [Api set: ExcelApi 1.8] */ wholeNumber = "WholeNumber", /** * The decimal data validation type. * @remarks * [Api set: ExcelApi 1.8] */ decimal = "Decimal", /** * The list data validation type. * @remarks * [Api set: ExcelApi 1.8] */ list = "List", /** * The date data validation type. * @remarks * [Api set: ExcelApi 1.8] */ date = "Date", /** * The time data validation type. * @remarks * [Api set: ExcelApi 1.8] */ time = "Time", /** * The text length data validation type. * @remarks * [Api set: ExcelApi 1.8] */ textLength = "TextLength", /** * The custom data validation type. * @remarks * [Api set: ExcelApi 1.8] */ custom = "Custom", /** * Inconsistent means that the range has inconsistent data validation, indicating that there are different rules on different cells. * @remarks * [Api set: ExcelApi 1.8] */ inconsistent = "Inconsistent", /** * Mixed criteria means that the range has data validation present on some but not all cells. * @remarks * [Api set: ExcelApi 1.8] */ mixedCriteria = "MixedCriteria" } /** * Represents the data validation operator enum. * * @remarks * [Api set: ExcelApi 1.8] */ enum DataValidationOperator { /** * @remarks * [Api set: ExcelApi 1.8] */ between = "Between", /** * @remarks * [Api set: ExcelApi 1.8] */ notBetween = "NotBetween", /** * @remarks * [Api set: ExcelApi 1.8] */ equalTo = "EqualTo", /** * @remarks * [Api set: ExcelApi 1.8] */ notEqualTo = "NotEqualTo", /** * @remarks * [Api set: ExcelApi 1.8] */ greaterThan = "GreaterThan", /** * @remarks * [Api set: ExcelApi 1.8] */ lessThan = "LessThan", /** * @remarks * [Api set: ExcelApi 1.8] */ greaterThanOrEqualTo = "GreaterThanOrEqualTo", /** * @remarks * [Api set: ExcelApi 1.8] */ lessThanOrEqualTo = "LessThanOrEqualTo" } /** * Represents the data validation error alert style. The default is `Stop`. * * @remarks * [Api set: ExcelApi 1.8] */ enum DataValidationAlertStyle { /** * @remarks * [Api set: ExcelApi 1.8] */ stop = "Stop", /** * @remarks * [Api set: ExcelApi 1.8] */ warning = "Warning", /** * @remarks * [Api set: ExcelApi 1.8] */ information = "Information" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum DeleteShiftDirection { /** * @remarks * [Api set: ExcelApi 1.1] */ up = "Up", /** * @remarks * [Api set: ExcelApi 1.1] */ left = "Left" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum DynamicFilterCriteria { /** * @remarks * [Api set: ExcelApi 1.2] */ unknown = "Unknown", /** * @remarks * [Api set: ExcelApi 1.2] */ aboveAverage = "AboveAverage", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodApril = "AllDatesInPeriodApril", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodAugust = "AllDatesInPeriodAugust", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodDecember = "AllDatesInPeriodDecember", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodFebruray = "AllDatesInPeriodFebruray", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodJuly = "AllDatesInPeriodJuly", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodJune = "AllDatesInPeriodJune", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodMarch = "AllDatesInPeriodMarch", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodMay = "AllDatesInPeriodMay", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodNovember = "AllDatesInPeriodNovember", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodOctober = "AllDatesInPeriodOctober", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", /** * @remarks * [Api set: ExcelApi 1.2] */ allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", /** * @remarks * [Api set: ExcelApi 1.2] */ belowAverage = "BelowAverage", /** * @remarks * [Api set: ExcelApi 1.2] */ lastMonth = "LastMonth", /** * @remarks * [Api set: ExcelApi 1.2] */ lastQuarter = "LastQuarter", /** * @remarks * [Api set: ExcelApi 1.2] */ lastWeek = "LastWeek", /** * @remarks * [Api set: ExcelApi 1.2] */ lastYear = "LastYear", /** * @remarks * [Api set: ExcelApi 1.2] */ nextMonth = "NextMonth", /** * @remarks * [Api set: ExcelApi 1.2] */ nextQuarter = "NextQuarter", /** * @remarks * [Api set: ExcelApi 1.2] */ nextWeek = "NextWeek", /** * @remarks * [Api set: ExcelApi 1.2] */ nextYear = "NextYear", /** * @remarks * [Api set: ExcelApi 1.2] */ thisMonth = "ThisMonth", /** * @remarks * [Api set: ExcelApi 1.2] */ thisQuarter = "ThisQuarter", /** * @remarks * [Api set: ExcelApi 1.2] */ thisWeek = "ThisWeek", /** * @remarks * [Api set: ExcelApi 1.2] */ thisYear = "ThisYear", /** * @remarks * [Api set: ExcelApi 1.2] */ today = "Today", /** * @remarks * [Api set: ExcelApi 1.2] */ tomorrow = "Tomorrow", /** * @remarks * [Api set: ExcelApi 1.2] */ yearToDate = "YearToDate", /** * @remarks * [Api set: ExcelApi 1.2] */ yesterday = "Yesterday" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum FilterDatetimeSpecificity { /** * @remarks * [Api set: ExcelApi 1.2] */ year = "Year", /** * @remarks * [Api set: ExcelApi 1.2] */ month = "Month", /** * @remarks * [Api set: ExcelApi 1.2] */ day = "Day", /** * @remarks * [Api set: ExcelApi 1.2] */ hour = "Hour", /** * @remarks * [Api set: ExcelApi 1.2] */ minute = "Minute", /** * @remarks * [Api set: ExcelApi 1.2] */ second = "Second" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum FilterOn { /** * @remarks * [Api set: ExcelApi 1.2] */ bottomItems = "BottomItems", /** * @remarks * [Api set: ExcelApi 1.2] */ bottomPercent = "BottomPercent", /** * @remarks * [Api set: ExcelApi 1.2] */ cellColor = "CellColor", /** * @remarks * [Api set: ExcelApi 1.2] */ dynamic = "Dynamic", /** * @remarks * [Api set: ExcelApi 1.2] */ fontColor = "FontColor", /** * @remarks * [Api set: ExcelApi 1.2] */ values = "Values", /** * @remarks * [Api set: ExcelApi 1.2] */ topItems = "TopItems", /** * @remarks * [Api set: ExcelApi 1.2] */ topPercent = "TopPercent", /** * @remarks * [Api set: ExcelApi 1.2] */ icon = "Icon", /** * @remarks * [Api set: ExcelApi 1.2] */ custom = "Custom" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum FilterOperator { /** * @remarks * [Api set: ExcelApi 1.2] */ and = "And", /** * @remarks * [Api set: ExcelApi 1.2] */ or = "Or" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum HorizontalAlignment { /** * @remarks * [Api set: ExcelApi 1.1] */ general = "General", /** * @remarks * [Api set: ExcelApi 1.1] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.1] */ center = "Center", /** * @remarks * [Api set: ExcelApi 1.1] */ right = "Right", /** * @remarks * [Api set: ExcelApi 1.1] */ fill = "Fill", /** * @remarks * [Api set: ExcelApi 1.1] */ justify = "Justify", /** * @remarks * [Api set: ExcelApi 1.1] */ centerAcrossSelection = "CenterAcrossSelection", /** * @remarks * [Api set: ExcelApi 1.1] */ distributed = "Distributed" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum IconSet { /** * @remarks * [Api set: ExcelApi 1.2] */ invalid = "Invalid", /** * @remarks * [Api set: ExcelApi 1.2] */ threeArrows = "ThreeArrows", /** * @remarks * [Api set: ExcelApi 1.2] */ threeArrowsGray = "ThreeArrowsGray", /** * @remarks * [Api set: ExcelApi 1.2] */ threeFlags = "ThreeFlags", /** * @remarks * [Api set: ExcelApi 1.2] */ threeTrafficLights1 = "ThreeTrafficLights1", /** * @remarks * [Api set: ExcelApi 1.2] */ threeTrafficLights2 = "ThreeTrafficLights2", /** * @remarks * [Api set: ExcelApi 1.2] */ threeSigns = "ThreeSigns", /** * @remarks * [Api set: ExcelApi 1.2] */ threeSymbols = "ThreeSymbols", /** * @remarks * [Api set: ExcelApi 1.2] */ threeSymbols2 = "ThreeSymbols2", /** * @remarks * [Api set: ExcelApi 1.2] */ fourArrows = "FourArrows", /** * @remarks * [Api set: ExcelApi 1.2] */ fourArrowsGray = "FourArrowsGray", /** * @remarks * [Api set: ExcelApi 1.2] */ fourRedToBlack = "FourRedToBlack", /** * @remarks * [Api set: ExcelApi 1.2] */ fourRating = "FourRating", /** * @remarks * [Api set: ExcelApi 1.2] */ fourTrafficLights = "FourTrafficLights", /** * @remarks * [Api set: ExcelApi 1.2] */ fiveArrows = "FiveArrows", /** * @remarks * [Api set: ExcelApi 1.2] */ fiveArrowsGray = "FiveArrowsGray", /** * @remarks * [Api set: ExcelApi 1.2] */ fiveRating = "FiveRating", /** * @remarks * [Api set: ExcelApi 1.2] */ fiveQuarters = "FiveQuarters", /** * @remarks * [Api set: ExcelApi 1.2] */ threeStars = "ThreeStars", /** * @remarks * [Api set: ExcelApi 1.2] */ threeTriangles = "ThreeTriangles", /** * @remarks * [Api set: ExcelApi 1.2] */ fiveBoxes = "FiveBoxes" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum ImageFittingMode { /** * @remarks * [Api set: ExcelApi 1.2] */ fit = "Fit", /** * @remarks * [Api set: ExcelApi 1.2] */ fitAndCenter = "FitAndCenter", /** * @remarks * [Api set: ExcelApi 1.2] */ fill = "Fill" } /** * Determines the direction in which existing cells will be shifted to accommodate what is being inserted. * * @remarks * [Api set: ExcelApi 1.1] */ enum InsertShiftDirection { /** * @remarks * [Api set: ExcelApi 1.1] */ down = "Down", /** * @remarks * [Api set: ExcelApi 1.1] */ right = "Right" } /** * @remarks * [Api set: ExcelApi 1.4] */ enum NamedItemScope { /** * @remarks * [Api set: ExcelApi 1.4] */ worksheet = "Worksheet", /** * @remarks * [Api set: ExcelApi 1.4] */ workbook = "Workbook" } /** * @remarks * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ enum NamedItemType { /** * @remarks * [Api set: ExcelApi 1.1] */ string = "String", /** * @remarks * [Api set: ExcelApi 1.1] */ integer = "Integer", /** * @remarks * [Api set: ExcelApi 1.1] */ double = "Double", /** * @remarks * [Api set: ExcelApi 1.1] */ boolean = "Boolean", /** * @remarks * [Api set: ExcelApi 1.1] */ range = "Range", /** * @remarks * [Api set: ExcelApi 1.1] */ error = "Error", /** * @remarks * [Api set: ExcelApi 1.7] */ array = "Array" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum RangeUnderlineStyle { /** * @remarks * [Api set: ExcelApi 1.1] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.1] */ single = "Single", /** * @remarks * [Api set: ExcelApi 1.1] */ double = "Double", /** * @remarks * [Api set: ExcelApi 1.1] */ singleAccountant = "SingleAccountant", /** * @remarks * [Api set: ExcelApi 1.1] */ doubleAccountant = "DoubleAccountant" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum SheetVisibility { /** * @remarks * [Api set: ExcelApi 1.1] */ visible = "Visible", /** * @remarks * [Api set: ExcelApi 1.1] */ hidden = "Hidden", /** * @remarks * [Api set: ExcelApi 1.1] */ veryHidden = "VeryHidden" } /** * @remarks * [Api set: ExcelApi 1.14] */ enum EventTriggerSource { /** * The event trigger source is unknown or currently unsupported. * @remarks * [Api set: ExcelApi 1.14] */ unknown = "Unknown", /** * The event is triggered by the Office JS API of the current add-in. * @remarks * [Api set: ExcelApi 1.14] */ thisLocalAddin = "ThisLocalAddin" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum RangeValueType { /** * @remarks * [Api set: ExcelApi 1.1] */ unknown = "Unknown", /** * @remarks * [Api set: ExcelApi 1.1] */ empty = "Empty", /** * @remarks * [Api set: ExcelApi 1.1] */ string = "String", /** * @remarks * [Api set: ExcelApi 1.1] */ integer = "Integer", /** * @remarks * [Api set: ExcelApi 1.1] */ double = "Double", /** * @remarks * [Api set: ExcelApi 1.1] */ boolean = "Boolean", /** * @remarks * [Api set: ExcelApi 1.1] */ error = "Error", /** * @remarks * [Api set: ExcelApi 1.7] */ richValue = "RichValue" } /** * @remarks * [Api set: ExcelApi 1.13] */ enum KeyboardDirection { /** * @remarks * [Api set: ExcelApi 1.13] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.13] */ right = "Right", /** * @remarks * [Api set: ExcelApi 1.13] */ up = "Up", /** * @remarks * [Api set: ExcelApi 1.13] */ down = "Down" } /** * Specifies the search direction. * * @remarks * [Api set: ExcelApi 1.9] */ enum SearchDirection { /** * Search in forward order. * @remarks * [Api set: ExcelApi 1.9] */ forward = "Forward", /** * Search in reverse order. * @remarks * [Api set: ExcelApi 1.9] */ backwards = "Backwards" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum SortOrientation { /** * @remarks * [Api set: ExcelApi 1.2] */ rows = "Rows", /** * @remarks * [Api set: ExcelApi 1.2] */ columns = "Columns" } /** * Represents the part of the cell used as the sorting criteria. * * @remarks * [Api set: ExcelApi 1.2] */ enum SortOn { /** * @remarks * [Api set: ExcelApi 1.2] */ value = "Value", /** * @remarks * [Api set: ExcelApi 1.2] */ cellColor = "CellColor", /** * @remarks * [Api set: ExcelApi 1.2] */ fontColor = "FontColor", /** * @remarks * [Api set: ExcelApi 1.2] */ icon = "Icon" } /** * @remarks * [Api set: ExcelApi 1.2] */ enum SortDataOption { /** * @remarks * [Api set: ExcelApi 1.2] */ normal = "Normal", /** * @remarks * [Api set: ExcelApi 1.2] */ textAsNumber = "TextAsNumber" } /** * Represents the ordering method to be used when sorting Chinese characters. * * @remarks * [Api set: ExcelApi 1.2] */ enum SortMethod { /** * @remarks * [Api set: ExcelApi 1.2] */ pinYin = "PinYin", /** * @remarks * [Api set: ExcelApi 1.2] */ strokeCount = "StrokeCount" } /** * @remarks * [Api set: ExcelApi 1.1] */ enum VerticalAlignment { /** * @remarks * [Api set: ExcelApi 1.1] */ top = "Top", /** * @remarks * [Api set: ExcelApi 1.1] */ center = "Center", /** * @remarks * [Api set: ExcelApi 1.1] */ bottom = "Bottom", /** * @remarks * [Api set: ExcelApi 1.1] */ justify = "Justify", /** * @remarks * [Api set: ExcelApi 1.1] */ distributed = "Distributed" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum DocumentPropertyType { /** * @remarks * [Api set: ExcelApi 1.7] */ number = "Number", /** * @remarks * [Api set: ExcelApi 1.7] */ boolean = "Boolean", /** * @remarks * [Api set: ExcelApi 1.7] */ date = "Date", /** * @remarks * [Api set: ExcelApi 1.7] */ string = "String", /** * @remarks * [Api set: ExcelApi 1.7] */ float = "Float" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum EventSource { /** * Local means the event comes from a local user session. * @remarks * [Api set: ExcelApi 1.7] */ local = "Local", /** * Remote means the event comes from a remote user session. * @remarks * [Api set: ExcelApi 1.7] */ remote = "Remote" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum DataChangeType { /** * `Unknown` indicates that the type of data change is not one of the listed types. * @remarks * [Api set: ExcelApi 1.8. The name of this value was 'Others' in ExcelApi 1.7] */ unknown = "Unknown", /** * `RangeEdited` indicates that the data change event is triggered by a range being edited. * @remarks * [Api set: ExcelApi 1.7] */ rangeEdited = "RangeEdited", /** * `RowInserted` indicates that the data change event is triggered by inserting new rows. * @remarks * [Api set: ExcelApi 1.7] */ rowInserted = "RowInserted", /** * `RowDeleted` indicates that the data change event is triggered by deleting rows. * @remarks * [Api set: ExcelApi 1.7] */ rowDeleted = "RowDeleted", /** * `ColumnInserted` indicates that the data change event is triggered by inserting new columns. * @remarks * [Api set: ExcelApi 1.7] */ columnInserted = "ColumnInserted", /** * `ColumnDeleted` indicates that the data change event is triggered by deleting columns. * @remarks * [Api set: ExcelApi 1.7] */ columnDeleted = "ColumnDeleted", /** * `CellInserted` indicates that the data change event is triggered by inserting new cells. * @remarks * [Api set: ExcelApi 1.7] */ cellInserted = "CellInserted", /** * `CellDeleted` indicates that the data change event is triggered by deleting cells. * @remarks * [Api set: ExcelApi 1.7] */ cellDeleted = "CellDeleted" } /** * @remarks * [Api set: ExcelApi 1.11] */ enum RowHiddenChangeType { /** * `Unhidden` indicates that the row is not hidden. * @remarks * [Api set: ExcelApi 1.11] */ unhidden = "Unhidden", /** * `Hidden` indicates that the row is hidden. * @remarks * [Api set: ExcelApi 1.11] */ hidden = "Hidden" } /** * Represents how the comments in the event were changed. * * @remarks * [Api set: ExcelApi 1.12] */ enum CommentChangeType { /** * Comments were edited. * @remarks * [Api set: ExcelApi 1.12] */ commentEdited = "CommentEdited", /** * Comments were resolved. * @remarks * [Api set: ExcelApi 1.12] */ commentResolved = "CommentResolved", /** * Comments were reopened. * @remarks * [Api set: ExcelApi 1.12] */ commentReopened = "CommentReopened", /** * Replies were added. * @remarks * [Api set: ExcelApi 1.12] */ replyAdded = "ReplyAdded", /** * Replies were deleted. * @remarks * [Api set: ExcelApi 1.12] */ replyDeleted = "ReplyDeleted", /** * Replies were edited. * @remarks * [Api set: ExcelApi 1.12] */ replyEdited = "ReplyEdited" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum EventType { /** * `WorksheetChanged` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when data changes. * @remarks * [Api set: ExcelApi 1.7] */ worksheetChanged = "WorksheetChanged", /** * `WorksheetSelectionChanged` represents the type of event registered on a `Worksheet` and occurs when the selection changes. * @remarks * [Api set: ExcelApi 1.7] */ worksheetSelectionChanged = "WorksheetSelectionChanged", /** * `WorksheetAdded` represents the type of event registered on a `WorksheetCollection` and occurs when a new worksheet is added to the workbook. * @remarks * [Api set: ExcelApi 1.7] */ worksheetAdded = "WorksheetAdded", /** * `WorksheetActivated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet activates. * @remarks * [Api set: ExcelApi 1.7] */ worksheetActivated = "WorksheetActivated", /** * `WorksheetDeactivated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet deactivates. * @remarks * [Api set: ExcelApi 1.7] */ worksheetDeactivated = "WorksheetDeactivated", /** * `TableChanged` represents the type of event registered on a `Table` and occurs when data changes. * @remarks * [Api set: ExcelApi 1.7] */ tableChanged = "TableChanged", /** * `TableSelectionChanged` represents the type of event registered on a `Table` and occurs when the selection changes. * @remarks * [Api set: ExcelApi 1.7] */ tableSelectionChanged = "TableSelectionChanged", /** * `WorksheetDeleted` represents the type of event registered on a `WorksheetCollection` and occurs when a worksheet is deleted from the workbook. * @remarks * [Api set: ExcelApi 1.7] */ worksheetDeleted = "WorksheetDeleted", /** * `ChartAdded` represents the type of event registered on a `ChartCollection` and occurs when a new chart is added to the worksheet. * @remarks * [Api set: ExcelApi 1.7] */ chartAdded = "ChartAdded", /** * `ChartActivated` represents the type of event registered on a `Chart` or `ChartCollection` and occurs when a chart activates. * @remarks * [Api set: ExcelApi 1.7] */ chartActivated = "ChartActivated", /** * `ChartDeactivated` represents the type of event registered on a `Chart` or `ChartCollection` and occurs when a chart deactivates. * @remarks * [Api set: ExcelApi 1.7] */ chartDeactivated = "ChartDeactivated", /** * `ChartDeleted` represents the type of event registered on a `ChartCollection` and occurs when a chart is deleted from the worksheet. * @remarks * [Api set: ExcelApi 1.7] */ chartDeleted = "ChartDeleted", /** * `WorksheetCalculated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet is calculated. * @remarks * [Api set: ExcelApi 1.7] */ worksheetCalculated = "WorksheetCalculated", /** * `VisualSelectionChanged` represents the type of event registered on a `VisualCollection` and occurs when the visual selection changes. * @remarks * [Api set: ExcelApi 1.7] */ visualSelectionChanged = "VisualSelectionChanged", /** * `AgaveVisualUpdate` represents the type of an event that is associated with an agave visual and carries a new data view following a data change. * @remarks * [Api set: ExcelApi 1.7] */ agaveVisualUpdate = "AgaveVisualUpdate", /** * `TableAdded` represents the type of event registered on a `TableCollection` and occurs when a table is added. * @remarks * [Api set: ExcelApi 1.7] */ tableAdded = "TableAdded", /** * `TableDeleted` represents the type of event that is registered on a `TableCollection` and occurs when a table is deleted. * @remarks * [Api set: ExcelApi 1.7] */ tableDeleted = "TableDeleted", /** * `TableFiltered` represents the type of event registered on a table or `TableCollection` and occurs when the data of a table is filtered. * @remarks * [Api set: ExcelApi 1.7] */ tableFiltered = "TableFiltered", /** * `WorksheetFiltered` represents the type of event registered on a worksheet or `WorksheetCollection` and occurs when the data of an AutoFilter in the worksheet is filtered. * @remarks * [Api set: ExcelApi 1.7] */ worksheetFiltered = "WorksheetFiltered", /** * `ShapeActivated` represents the type of event that is registered on a `Shape` and occurs when the shape activates. * @remarks * [Api set: ExcelApi 1.7] */ shapeActivated = "ShapeActivated", /** * `ShapeDeactivated` represents the type of event that is registered on a `Shape` and occurs when the shape deactivates. * @remarks * [Api set: ExcelApi 1.7] */ shapeDeactivated = "ShapeDeactivated", /** * `VisualChange` represents the type of event registered on a `Visual` and occurs when there is a visual change. * @remarks * [Api set: ExcelApi 1.7] */ visualChange = "VisualChange", /** * `WorkbookAutoSaveSettingChanged` represents the type of event registered on a workbook and occurs when there is an auto save setting change. * @remarks * [Api set: ExcelApi 1.7] */ workbookAutoSaveSettingChanged = "WorkbookAutoSaveSettingChanged", /** * `WorksheetFormatChanged` represents the type of event registered on a worksheet and occurs when a format is changed. * @remarks * [Api set: ExcelApi 1.7] */ worksheetFormatChanged = "WorksheetFormatChanged", /** * `RibbonCommandExecuted` represents the type of event registered on the ribbon and occurs when a user clicks on the ribbon * @remarks * [Api set: ExcelApi 1.7] */ ribbonCommandExecuted = "RibbonCommandExecuted", /** * `WorksheetRowSorted` represents the type of event registered on a worksheet and occurs when rows are sorted. * @remarks * [Api set: ExcelApi 1.7] */ worksheetRowSorted = "WorksheetRowSorted", /** * `WorksheetColumnSorted` represents the type of event registered on a worksheet and occurs columns are sorted. * @remarks * [Api set: ExcelApi 1.7] */ worksheetColumnSorted = "WorksheetColumnSorted", /** * `WorksheetSingleClicked` represents the type of event registered on a worksheet and occurs when a cell is left-clicked or tapped. * @remarks * [Api set: ExcelApi 1.7] */ worksheetSingleClicked = "WorksheetSingleClicked", /** * `WorksheetRowHiddenChanged` represents the type of event registered on a worksheet and occurs when a row's hidden state is changed. * @remarks * [Api set: ExcelApi 1.7] */ worksheetRowHiddenChanged = "WorksheetRowHiddenChanged", /** * `CommentAdded` represents the type of event that is registered on a comment collection and occurs when comments are added. * @remarks * [Api set: ExcelApi 1.7] */ commentAdded = "CommentAdded", /** * `CommentDeleted` represents the type of event that is registered on a comment collection and occurs when comments are deleted. * @remarks * [Api set: ExcelApi 1.7] */ commentDeleted = "CommentDeleted", /** * `CommentChanged` represents the type of event that is registered on a comment collection and occurs when comments are changed. * @remarks * [Api set: ExcelApi 1.7] */ commentChanged = "CommentChanged", /** * `RefreshRequestCompleted` represents the type of event registered on a `LinkedDataType` and occurs when a request to refresh a data source is completed. * @remarks * [Api set: ExcelApi 1.7] */ linkedDataTypeRefreshRequestCompleted = "LinkedDataTypeRefreshRequestCompleted", /** * `RefreshModeChanged` represents the type of event registered on a `LinkedDataType` and occurs when the linked data type refresh mode is changed. * @remarks * [Api set: ExcelApi 1.7] */ linkedDataTypeRefreshModeChanged = "LinkedDataTypeRefreshModeChanged", /** * `LinkedDataTypeAdded` represents the type of event registered on a `LinkedDataType` and occurs when a new linked data type is added to the workbook. * @remarks * [Api set: ExcelApi 1.7] */ linkedDataTypeLinkedDataTypeAdded = "LinkedDataTypeLinkedDataTypeAdded", /** * `WorksheetFormulaChanged` represents the type of event registered on a worksheet and occurs when a formula is changed. * @remarks * [Api set: ExcelApi 1.7] */ worksheetFormulaChanged = "WorksheetFormulaChanged", /** * `WorkbookActivated` represents the type of event which is fired when a workbook is activated. * @remarks * [Api set: ExcelApi 1.7] */ workbookActivated = "WorkbookActivated", /** * `WorkbookLinksChanged` represents the type of event which is fired when a workbook link is changed. * @remarks * [Api set: ExcelApi 1.7] */ linkedWorkbookWorkbookLinksChanged = "LinkedWorkbookWorkbookLinksChanged", /** * `WorkbookLinksRefreshCompleted` represents the type of event registered on a linked Workbook and occurs when a linked workbook completes a refresh. * @remarks * [Api set: ExcelApi 1.7] */ linkedWorkbookRefreshCompleted = "LinkedWorkbookRefreshCompleted", /** * WorksheetProtectionChanged represents the type of event registered on worksheet, and occurs when protection status is changed. * @remarks * [Api set: ExcelApi 1.7] */ worksheetProtectionChanged = "WorksheetProtectionChanged", /** * WorksheetNameChanged represents the type of event registered on a worksheet that occurs when its name changes. * @remarks * [Api set: ExcelApi 1.7] */ worksheetNameChanged = "WorksheetNameChanged", /** * WorksheetVisibilityChanged represents the type of event registered on a worksheet that occurs when its visibility changes. * @remarks * [Api set: ExcelApi 1.7] */ worksheetVisibilityChanged = "WorksheetVisibilityChanged", /** * WorksheetMoved represents the type of event registered on a worksheet that occurs when it is moved within a workbook. * @remarks * [Api set: ExcelApi 1.7] */ worksheetMoved = "WorksheetMoved", /** * LineageActivityUpdateAvailable represents the type of event registered when new revision updates lineage model. * @remarks * [Api set: ExcelApi 1.7] */ lineageActivityUpdateAvailable = "LineageActivityUpdateAvailable" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum DocumentPropertyItem { /** * @remarks * [Api set: ExcelApi 1.7] */ title = "Title", /** * @remarks * [Api set: ExcelApi 1.7] */ subject = "Subject", /** * @remarks * [Api set: ExcelApi 1.7] */ author = "Author", /** * @remarks * [Api set: ExcelApi 1.7] */ keywords = "Keywords", /** * @remarks * [Api set: ExcelApi 1.7] */ comments = "Comments", /** * @remarks * [Api set: ExcelApi 1.7] */ template = "Template", /** * @remarks * [Api set: ExcelApi 1.7] */ lastAuth = "LastAuth", /** * @remarks * [Api set: ExcelApi 1.7] */ revision = "Revision", /** * @remarks * [Api set: ExcelApi 1.7] */ appName = "AppName", /** * @remarks * [Api set: ExcelApi 1.7] */ lastPrint = "LastPrint", /** * @remarks * [Api set: ExcelApi 1.7] */ creation = "Creation", /** * @remarks * [Api set: ExcelApi 1.7] */ lastSave = "LastSave", /** * @remarks * [Api set: ExcelApi 1.7] */ category = "Category", /** * @remarks * [Api set: ExcelApi 1.7] */ format = "Format", /** * @remarks * [Api set: ExcelApi 1.7] */ manager = "Manager", /** * @remarks * [Api set: ExcelApi 1.7] */ company = "Company" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum SubtotalLocationType { /** * Subtotals are at the top. * @remarks * [Api set: ExcelApi 1.8] */ atTop = "AtTop", /** * Subtotals are at the bottom. * @remarks * [Api set: ExcelApi 1.8] */ atBottom = "AtBottom", /** * Subtotals are off. * @remarks * [Api set: ExcelApi 1.8] */ off = "Off" } /** * @remarks * [Api set: ExcelApi 1.8] */ enum PivotLayoutType { /** * A horizontally compressed form with labels from the next field in the same column. * @remarks * [Api set: ExcelApi 1.8] */ compact = "Compact", /** * Inner fields' items are always on a new line relative to the outer fields' items. * @remarks * [Api set: ExcelApi 1.8] */ tabular = "Tabular", /** * Inner fields' items are on same row as outer fields' items and subtotals are always on the bottom. * @remarks * [Api set: ExcelApi 1.8] */ outline = "Outline" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ProtectionSelectionMode { /** * Selection is allowed for all cells. * @remarks * [Api set: ExcelApi 1.7] */ normal = "Normal", /** * Selection is allowed only for cells that are not locked. * @remarks * [Api set: ExcelApi 1.7] */ unlocked = "Unlocked", /** * Selection is not allowed for any cells. * @remarks * [Api set: ExcelApi 1.7] */ none = "None" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum PageOrientation { /** * @remarks * [Api set: ExcelApi 1.7] */ portrait = "Portrait", /** * @remarks * [Api set: ExcelApi 1.7] */ landscape = "Landscape" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum PaperType { /** * @remarks * [Api set: ExcelApi 1.9] */ letter = "Letter", /** * @remarks * [Api set: ExcelApi 1.9] */ letterSmall = "LetterSmall", /** * @remarks * [Api set: ExcelApi 1.9] */ tabloid = "Tabloid", /** * @remarks * [Api set: ExcelApi 1.9] */ ledger = "Ledger", /** * @remarks * [Api set: ExcelApi 1.9] */ legal = "Legal", /** * @remarks * [Api set: ExcelApi 1.9] */ statement = "Statement", /** * @remarks * [Api set: ExcelApi 1.9] */ executive = "Executive", /** * @remarks * [Api set: ExcelApi 1.9] */ a3 = "A3", /** * @remarks * [Api set: ExcelApi 1.9] */ a4 = "A4", /** * @remarks * [Api set: ExcelApi 1.9] */ a4Small = "A4Small", /** * @remarks * [Api set: ExcelApi 1.9] */ a5 = "A5", /** * @remarks * [Api set: ExcelApi 1.9] */ b4 = "B4", /** * @remarks * [Api set: ExcelApi 1.9] */ b5 = "B5", /** * @remarks * [Api set: ExcelApi 1.9] */ folio = "Folio", /** * @remarks * [Api set: ExcelApi 1.9] */ quatro = "Quatro", /** * @remarks * [Api set: ExcelApi 1.9] */ paper10x14 = "Paper10x14", /** * @remarks * [Api set: ExcelApi 1.9] */ paper11x17 = "Paper11x17", /** * @remarks * [Api set: ExcelApi 1.9] */ note = "Note", /** * @remarks * [Api set: ExcelApi 1.9] */ envelope9 = "Envelope9", /** * @remarks * [Api set: ExcelApi 1.9] */ envelope10 = "Envelope10", /** * @remarks * [Api set: ExcelApi 1.9] */ envelope11 = "Envelope11", /** * @remarks * [Api set: ExcelApi 1.9] */ envelope12 = "Envelope12", /** * @remarks * [Api set: ExcelApi 1.9] */ envelope14 = "Envelope14", /** * @remarks * [Api set: ExcelApi 1.9] */ csheet = "Csheet", /** * @remarks * [Api set: ExcelApi 1.9] */ dsheet = "Dsheet", /** * @remarks * [Api set: ExcelApi 1.9] */ esheet = "Esheet", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeDL = "EnvelopeDL", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeC5 = "EnvelopeC5", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeC3 = "EnvelopeC3", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeC4 = "EnvelopeC4", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeC6 = "EnvelopeC6", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeC65 = "EnvelopeC65", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeB4 = "EnvelopeB4", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeB5 = "EnvelopeB5", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeB6 = "EnvelopeB6", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeItaly = "EnvelopeItaly", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopeMonarch = "EnvelopeMonarch", /** * @remarks * [Api set: ExcelApi 1.9] */ envelopePersonal = "EnvelopePersonal", /** * @remarks * [Api set: ExcelApi 1.9] */ fanfoldUS = "FanfoldUS", /** * @remarks * [Api set: ExcelApi 1.9] */ fanfoldStdGerman = "FanfoldStdGerman", /** * @remarks * [Api set: ExcelApi 1.9] */ fanfoldLegalGerman = "FanfoldLegalGerman" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum ReadingOrder { /** * Reading order is determined by the language of the first character entered. If a right-to-left language character is entered first, reading order is right to left. If a left-to-right language character is entered first, reading order is left to right. * @remarks * [Api set: ExcelApi 1.7] */ context = "Context", /** * Left to right reading order * @remarks * [Api set: ExcelApi 1.7] */ leftToRight = "LeftToRight", /** * Right to left reading order * @remarks * [Api set: ExcelApi 1.7] */ rightToLeft = "RightToLeft" } /** * @remarks * [Api set: ExcelApi 1.7] */ enum BuiltInStyle { /** * @remarks * [Api set: ExcelApi 1.7] */ normal = "Normal", /** * @remarks * [Api set: ExcelApi 1.7] */ comma = "Comma", /** * @remarks * [Api set: ExcelApi 1.7] */ currency = "Currency", /** * @remarks * [Api set: ExcelApi 1.7] */ percent = "Percent", /** * @remarks * [Api set: ExcelApi 1.7] */ wholeComma = "WholeComma", /** * @remarks * [Api set: ExcelApi 1.7] */ wholeDollar = "WholeDollar", /** * @remarks * [Api set: ExcelApi 1.7] */ hlink = "Hlink", /** * @remarks * [Api set: ExcelApi 1.7] */ hlinkTrav = "HlinkTrav", /** * @remarks * [Api set: ExcelApi 1.7] */ note = "Note", /** * @remarks * [Api set: ExcelApi 1.7] */ warningText = "WarningText", /** * @remarks * [Api set: ExcelApi 1.7] */ emphasis1 = "Emphasis1", /** * @remarks * [Api set: ExcelApi 1.7] */ emphasis2 = "Emphasis2", /** * @remarks * [Api set: ExcelApi 1.7] */ emphasis3 = "Emphasis3", /** * @remarks * [Api set: ExcelApi 1.7] */ sheetTitle = "SheetTitle", /** * @remarks * [Api set: ExcelApi 1.7] */ heading1 = "Heading1", /** * @remarks * [Api set: ExcelApi 1.7] */ heading2 = "Heading2", /** * @remarks * [Api set: ExcelApi 1.7] */ heading3 = "Heading3", /** * @remarks * [Api set: ExcelApi 1.7] */ heading4 = "Heading4", /** * @remarks * [Api set: ExcelApi 1.7] */ input = "Input", /** * @remarks * [Api set: ExcelApi 1.7] */ output = "Output", /** * @remarks * [Api set: ExcelApi 1.7] */ calculation = "Calculation", /** * @remarks * [Api set: ExcelApi 1.7] */ checkCell = "CheckCell", /** * @remarks * [Api set: ExcelApi 1.7] */ linkedCell = "LinkedCell", /** * @remarks * [Api set: ExcelApi 1.7] */ total = "Total", /** * @remarks * [Api set: ExcelApi 1.7] */ good = "Good", /** * @remarks * [Api set: ExcelApi 1.7] */ bad = "Bad", /** * @remarks * [Api set: ExcelApi 1.7] */ neutral = "Neutral", /** * @remarks * [Api set: ExcelApi 1.7] */ accent1 = "Accent1", /** * @remarks * [Api set: ExcelApi 1.7] */ accent1_20 = "Accent1_20", /** * @remarks * [Api set: ExcelApi 1.7] */ accent1_40 = "Accent1_40", /** * @remarks * [Api set: ExcelApi 1.7] */ accent1_60 = "Accent1_60", /** * @remarks * [Api set: ExcelApi 1.7] */ accent2 = "Accent2", /** * @remarks * [Api set: ExcelApi 1.7] */ accent2_20 = "Accent2_20", /** * @remarks * [Api set: ExcelApi 1.7] */ accent2_40 = "Accent2_40", /** * @remarks * [Api set: ExcelApi 1.7] */ accent2_60 = "Accent2_60", /** * @remarks * [Api set: ExcelApi 1.7] */ accent3 = "Accent3", /** * @remarks * [Api set: ExcelApi 1.7] */ accent3_20 = "Accent3_20", /** * @remarks * [Api set: ExcelApi 1.7] */ accent3_40 = "Accent3_40", /** * @remarks * [Api set: ExcelApi 1.7] */ accent3_60 = "Accent3_60", /** * @remarks * [Api set: ExcelApi 1.7] */ accent4 = "Accent4", /** * @remarks * [Api set: ExcelApi 1.7] */ accent4_20 = "Accent4_20", /** * @remarks * [Api set: ExcelApi 1.7] */ accent4_40 = "Accent4_40", /** * @remarks * [Api set: ExcelApi 1.7] */ accent4_60 = "Accent4_60", /** * @remarks * [Api set: ExcelApi 1.7] */ accent5 = "Accent5", /** * @remarks * [Api set: ExcelApi 1.7] */ accent5_20 = "Accent5_20", /** * @remarks * [Api set: ExcelApi 1.7] */ accent5_40 = "Accent5_40", /** * @remarks * [Api set: ExcelApi 1.7] */ accent5_60 = "Accent5_60", /** * @remarks * [Api set: ExcelApi 1.7] */ accent6 = "Accent6", /** * @remarks * [Api set: ExcelApi 1.7] */ accent6_20 = "Accent6_20", /** * @remarks * [Api set: ExcelApi 1.7] */ accent6_40 = "Accent6_40", /** * @remarks * [Api set: ExcelApi 1.7] */ accent6_60 = "Accent6_60", /** * @remarks * [Api set: ExcelApi 1.7] */ explanatoryText = "ExplanatoryText" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum PrintErrorType { /** * @remarks * [Api set: ExcelApi 1.9] */ asDisplayed = "AsDisplayed", /** * @remarks * [Api set: ExcelApi 1.9] */ blank = "Blank", /** * @remarks * [Api set: ExcelApi 1.9] */ dash = "Dash", /** * @remarks * [Api set: ExcelApi 1.9] */ notAvailable = "NotAvailable" } /** * The position of a worksheet relative to another worksheet or the entire worksheet collection. * * @remarks * [Api set: ExcelApi 1.7] */ enum WorksheetPositionType { /** * @remarks * [Api set: ExcelApi 1.7] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.7] */ before = "Before", /** * @remarks * [Api set: ExcelApi 1.7] */ after = "After", /** * @remarks * [Api set: ExcelApi 1.7] */ beginning = "Beginning", /** * @remarks * [Api set: ExcelApi 1.7] */ end = "End" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum PrintComments { /** * Comments will not be printed. * @remarks * [Api set: ExcelApi 1.9] */ noComments = "NoComments", /** * Comments will be printed as end notes at the end of the worksheet. * @remarks * [Api set: ExcelApi 1.9] */ endSheet = "EndSheet", /** * Comments will be printed where they were inserted in the worksheet. * @remarks * [Api set: ExcelApi 1.9] */ inPlace = "InPlace" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum PrintOrder { /** * Process down the rows before processing across pages or page fields to the right. * @remarks * [Api set: ExcelApi 1.9] */ downThenOver = "DownThenOver", /** * Process across pages or page fields to the right before moving down the rows. * @remarks * [Api set: ExcelApi 1.9] */ overThenDown = "OverThenDown" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum PrintMarginUnit { /** * Assign the page margins in points. A point is 1/72 of an inch. * @remarks * [Api set: ExcelApi 1.9] */ points = "Points", /** * Assign the page margins in inches. * @remarks * [Api set: ExcelApi 1.9] */ inches = "Inches", /** * Assign the page margins in centimeters. * @remarks * [Api set: ExcelApi 1.9] */ centimeters = "Centimeters" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum HeaderFooterState { /** * Only one general header/footer is used for all pages printed. * @remarks * [Api set: ExcelApi 1.9] */ default = "Default", /** * There is a separate first page header/footer, and a general header/footer used for all other pages. * @remarks * [Api set: ExcelApi 1.9] */ firstAndDefault = "FirstAndDefault", /** * There is a different header/footer for odd and even pages. * @remarks * [Api set: ExcelApi 1.9] */ oddAndEven = "OddAndEven", /** * There is a separate first page header/footer, then there is a separate header/footer for odd and even pages. * @remarks * [Api set: ExcelApi 1.9] */ firstOddAndEven = "FirstOddAndEven" } /** * The behavior types when AutoFill is used on a range in the workbook. * * @remarks * [Api set: ExcelApi 1.9] */ enum AutoFillType { /** * Populates the adjacent cells based on the surrounding data (the standard AutoFill behavior). * @remarks * [Api set: ExcelApi 1.9] */ fillDefault = "FillDefault", /** * Populates the adjacent cells with data based on the selected data. * @remarks * [Api set: ExcelApi 1.9] */ fillCopy = "FillCopy", /** * Populates the adjacent cells with data that follows a pattern in the copied cells. * @remarks * [Api set: ExcelApi 1.9] */ fillSeries = "FillSeries", /** * Populates the adjacent cells with the selected formats. * @remarks * [Api set: ExcelApi 1.9] */ fillFormats = "FillFormats", /** * Populates the adjacent cells with the selected values. * @remarks * [Api set: ExcelApi 1.9] */ fillValues = "FillValues", /** * A version of "FillSeries" for dates that bases the pattern on either the day of the month or the day of the week, depending on the context. * @remarks * [Api set: ExcelApi 1.9] */ fillDays = "FillDays", /** * A version of "FillSeries" for dates that bases the pattern on the day of the week and only includes weekdays. * @remarks * [Api set: ExcelApi 1.9] */ fillWeekdays = "FillWeekdays", /** * A version of "FillSeries" for dates that bases the pattern on the month. * @remarks * [Api set: ExcelApi 1.9] */ fillMonths = "FillMonths", /** * A version of "FillSeries" for dates that bases the pattern on the year. * @remarks * [Api set: ExcelApi 1.9] */ fillYears = "FillYears", /** * A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a linear trend model. * @remarks * [Api set: ExcelApi 1.9] */ linearTrend = "LinearTrend", /** * A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a growth trend model. * @remarks * [Api set: ExcelApi 1.9] */ growthTrend = "GrowthTrend", /** * Populates the adjacent cells by using Excel's Flash Fill feature. * @remarks * [Api set: ExcelApi 1.9] */ flashFill = "FlashFill" } /** * @remarks * [Api set: ExcelApi 1.10] */ enum GroupOption { /** * Group by rows. * @remarks * [Api set: ExcelApi 1.10] */ byRows = "ByRows", /** * Group by columns. * @remarks * [Api set: ExcelApi 1.10] */ byColumns = "ByColumns" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum RangeCopyType { /** * @remarks * [Api set: ExcelApi 1.9] */ all = "All", /** * @remarks * [Api set: ExcelApi 1.9] */ formulas = "Formulas", /** * @remarks * [Api set: ExcelApi 1.9] */ values = "Values", /** * @remarks * [Api set: ExcelApi 1.9] */ formats = "Formats", /** * @remarks * [Api set: ExcelApiOnline 1.1] */ link = "Link", } /** * @remarks * [Api set: ExcelApi 1.9] */ enum LinkedDataTypeState { /** * @remarks * [Api set: ExcelApi 1.9] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.9] */ validLinkedData = "ValidLinkedData", /** * @remarks * [Api set: ExcelApi 1.9] */ disambiguationNeeded = "DisambiguationNeeded", /** * @remarks * [Api set: ExcelApi 1.9] */ brokenLinkedData = "BrokenLinkedData", /** * @remarks * [Api set: ExcelApi 1.9] */ fetchingData = "FetchingData" } /** * Specifies the shape type for a `GeometricShape` object. * * @remarks * [Api set: ExcelApi 1.9] */ enum GeometricShapeType { /** * @remarks * [Api set: ExcelApi 1.9] */ lineInverse = "LineInverse", /** * @remarks * [Api set: ExcelApi 1.9] */ triangle = "Triangle", /** * @remarks * [Api set: ExcelApi 1.9] */ rightTriangle = "RightTriangle", /** * @remarks * [Api set: ExcelApi 1.9] */ rectangle = "Rectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ diamond = "Diamond", /** * @remarks * [Api set: ExcelApi 1.9] */ parallelogram = "Parallelogram", /** * @remarks * [Api set: ExcelApi 1.9] */ trapezoid = "Trapezoid", /** * @remarks * [Api set: ExcelApi 1.9] */ nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", /** * @remarks * [Api set: ExcelApi 1.9] */ pentagon = "Pentagon", /** * @remarks * [Api set: ExcelApi 1.9] */ hexagon = "Hexagon", /** * @remarks * [Api set: ExcelApi 1.9] */ heptagon = "Heptagon", /** * @remarks * [Api set: ExcelApi 1.9] */ octagon = "Octagon", /** * @remarks * [Api set: ExcelApi 1.9] */ decagon = "Decagon", /** * @remarks * [Api set: ExcelApi 1.9] */ dodecagon = "Dodecagon", /** * @remarks * [Api set: ExcelApi 1.9] */ star4 = "Star4", /** * @remarks * [Api set: ExcelApi 1.9] */ star5 = "Star5", /** * @remarks * [Api set: ExcelApi 1.9] */ star6 = "Star6", /** * @remarks * [Api set: ExcelApi 1.9] */ star7 = "Star7", /** * @remarks * [Api set: ExcelApi 1.9] */ star8 = "Star8", /** * @remarks * [Api set: ExcelApi 1.9] */ star10 = "Star10", /** * @remarks * [Api set: ExcelApi 1.9] */ star12 = "Star12", /** * @remarks * [Api set: ExcelApi 1.9] */ star16 = "Star16", /** * @remarks * [Api set: ExcelApi 1.9] */ star24 = "Star24", /** * @remarks * [Api set: ExcelApi 1.9] */ star32 = "Star32", /** * @remarks * [Api set: ExcelApi 1.9] */ roundRectangle = "RoundRectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ round1Rectangle = "Round1Rectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ round2SameRectangle = "Round2SameRectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ round2DiagonalRectangle = "Round2DiagonalRectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ snipRoundRectangle = "SnipRoundRectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ snip1Rectangle = "Snip1Rectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ snip2SameRectangle = "Snip2SameRectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ snip2DiagonalRectangle = "Snip2DiagonalRectangle", /** * @remarks * [Api set: ExcelApi 1.9] */ plaque = "Plaque", /** * @remarks * [Api set: ExcelApi 1.9] */ ellipse = "Ellipse", /** * @remarks * [Api set: ExcelApi 1.9] */ teardrop = "Teardrop", /** * @remarks * [Api set: ExcelApi 1.9] */ homePlate = "HomePlate", /** * @remarks * [Api set: ExcelApi 1.9] */ chevron = "Chevron", /** * @remarks * [Api set: ExcelApi 1.9] */ pieWedge = "PieWedge", /** * @remarks * [Api set: ExcelApi 1.9] */ pie = "Pie", /** * @remarks * [Api set: ExcelApi 1.9] */ blockArc = "BlockArc", /** * @remarks * [Api set: ExcelApi 1.9] */ donut = "Donut", /** * @remarks * [Api set: ExcelApi 1.9] */ noSmoking = "NoSmoking", /** * @remarks * [Api set: ExcelApi 1.9] */ rightArrow = "RightArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ leftArrow = "LeftArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ upArrow = "UpArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ downArrow = "DownArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ stripedRightArrow = "StripedRightArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ notchedRightArrow = "NotchedRightArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ bentUpArrow = "BentUpArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ leftRightArrow = "LeftRightArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ upDownArrow = "UpDownArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ leftUpArrow = "LeftUpArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ leftRightUpArrow = "LeftRightUpArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ quadArrow = "QuadArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ leftArrowCallout = "LeftArrowCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ rightArrowCallout = "RightArrowCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ upArrowCallout = "UpArrowCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ downArrowCallout = "DownArrowCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ leftRightArrowCallout = "LeftRightArrowCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ upDownArrowCallout = "UpDownArrowCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ quadArrowCallout = "QuadArrowCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ bentArrow = "BentArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ uturnArrow = "UturnArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ circularArrow = "CircularArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ leftCircularArrow = "LeftCircularArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ leftRightCircularArrow = "LeftRightCircularArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ curvedRightArrow = "CurvedRightArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ curvedLeftArrow = "CurvedLeftArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ curvedUpArrow = "CurvedUpArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ curvedDownArrow = "CurvedDownArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ swooshArrow = "SwooshArrow", /** * @remarks * [Api set: ExcelApi 1.9] */ cube = "Cube", /** * @remarks * [Api set: ExcelApi 1.9] */ can = "Can", /** * @remarks * [Api set: ExcelApi 1.9] */ lightningBolt = "LightningBolt", /** * @remarks * [Api set: ExcelApi 1.9] */ heart = "Heart", /** * @remarks * [Api set: ExcelApi 1.9] */ sun = "Sun", /** * @remarks * [Api set: ExcelApi 1.9] */ moon = "Moon", /** * @remarks * [Api set: ExcelApi 1.9] */ smileyFace = "SmileyFace", /** * @remarks * [Api set: ExcelApi 1.9] */ irregularSeal1 = "IrregularSeal1", /** * @remarks * [Api set: ExcelApi 1.9] */ irregularSeal2 = "IrregularSeal2", /** * @remarks * [Api set: ExcelApi 1.9] */ foldedCorner = "FoldedCorner", /** * @remarks * [Api set: ExcelApi 1.9] */ bevel = "Bevel", /** * @remarks * [Api set: ExcelApi 1.9] */ frame = "Frame", /** * @remarks * [Api set: ExcelApi 1.9] */ halfFrame = "HalfFrame", /** * @remarks * [Api set: ExcelApi 1.9] */ corner = "Corner", /** * @remarks * [Api set: ExcelApi 1.9] */ diagonalStripe = "DiagonalStripe", /** * @remarks * [Api set: ExcelApi 1.9] */ chord = "Chord", /** * @remarks * [Api set: ExcelApi 1.9] */ arc = "Arc", /** * @remarks * [Api set: ExcelApi 1.9] */ leftBracket = "LeftBracket", /** * @remarks * [Api set: ExcelApi 1.9] */ rightBracket = "RightBracket", /** * @remarks * [Api set: ExcelApi 1.9] */ leftBrace = "LeftBrace", /** * @remarks * [Api set: ExcelApi 1.9] */ rightBrace = "RightBrace", /** * @remarks * [Api set: ExcelApi 1.9] */ bracketPair = "BracketPair", /** * @remarks * [Api set: ExcelApi 1.9] */ bracePair = "BracePair", /** * @remarks * [Api set: ExcelApi 1.9] */ callout1 = "Callout1", /** * @remarks * [Api set: ExcelApi 1.9] */ callout2 = "Callout2", /** * @remarks * [Api set: ExcelApi 1.9] */ callout3 = "Callout3", /** * @remarks * [Api set: ExcelApi 1.9] */ accentCallout1 = "AccentCallout1", /** * @remarks * [Api set: ExcelApi 1.9] */ accentCallout2 = "AccentCallout2", /** * @remarks * [Api set: ExcelApi 1.9] */ accentCallout3 = "AccentCallout3", /** * @remarks * [Api set: ExcelApi 1.9] */ borderCallout1 = "BorderCallout1", /** * @remarks * [Api set: ExcelApi 1.9] */ borderCallout2 = "BorderCallout2", /** * @remarks * [Api set: ExcelApi 1.9] */ borderCallout3 = "BorderCallout3", /** * @remarks * [Api set: ExcelApi 1.9] */ accentBorderCallout1 = "AccentBorderCallout1", /** * @remarks * [Api set: ExcelApi 1.9] */ accentBorderCallout2 = "AccentBorderCallout2", /** * @remarks * [Api set: ExcelApi 1.9] */ accentBorderCallout3 = "AccentBorderCallout3", /** * @remarks * [Api set: ExcelApi 1.9] */ wedgeRectCallout = "WedgeRectCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ wedgeRRectCallout = "WedgeRRectCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ wedgeEllipseCallout = "WedgeEllipseCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ cloudCallout = "CloudCallout", /** * @remarks * [Api set: ExcelApi 1.9] */ cloud = "Cloud", /** * @remarks * [Api set: ExcelApi 1.9] */ ribbon = "Ribbon", /** * @remarks * [Api set: ExcelApi 1.9] */ ribbon2 = "Ribbon2", /** * @remarks * [Api set: ExcelApi 1.9] */ ellipseRibbon = "EllipseRibbon", /** * @remarks * [Api set: ExcelApi 1.9] */ ellipseRibbon2 = "EllipseRibbon2", /** * @remarks * [Api set: ExcelApi 1.9] */ leftRightRibbon = "LeftRightRibbon", /** * @remarks * [Api set: ExcelApi 1.9] */ verticalScroll = "VerticalScroll", /** * @remarks * [Api set: ExcelApi 1.9] */ horizontalScroll = "HorizontalScroll", /** * @remarks * [Api set: ExcelApi 1.9] */ wave = "Wave", /** * @remarks * [Api set: ExcelApi 1.9] */ doubleWave = "DoubleWave", /** * @remarks * [Api set: ExcelApi 1.9] */ plus = "Plus", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartProcess = "FlowChartProcess", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartDecision = "FlowChartDecision", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartInputOutput = "FlowChartInputOutput", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartPredefinedProcess = "FlowChartPredefinedProcess", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartInternalStorage = "FlowChartInternalStorage", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartDocument = "FlowChartDocument", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartMultidocument = "FlowChartMultidocument", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartTerminator = "FlowChartTerminator", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartPreparation = "FlowChartPreparation", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartManualInput = "FlowChartManualInput", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartManualOperation = "FlowChartManualOperation", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartConnector = "FlowChartConnector", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartPunchedCard = "FlowChartPunchedCard", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartPunchedTape = "FlowChartPunchedTape", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartSummingJunction = "FlowChartSummingJunction", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartOr = "FlowChartOr", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartCollate = "FlowChartCollate", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartSort = "FlowChartSort", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartExtract = "FlowChartExtract", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartMerge = "FlowChartMerge", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartOfflineStorage = "FlowChartOfflineStorage", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartOnlineStorage = "FlowChartOnlineStorage", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartMagneticTape = "FlowChartMagneticTape", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartMagneticDisk = "FlowChartMagneticDisk", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartMagneticDrum = "FlowChartMagneticDrum", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartDisplay = "FlowChartDisplay", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartDelay = "FlowChartDelay", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartAlternateProcess = "FlowChartAlternateProcess", /** * @remarks * [Api set: ExcelApi 1.9] */ flowChartOffpageConnector = "FlowChartOffpageConnector", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonBlank = "ActionButtonBlank", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonHome = "ActionButtonHome", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonHelp = "ActionButtonHelp", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonInformation = "ActionButtonInformation", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonForwardNext = "ActionButtonForwardNext", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonBackPrevious = "ActionButtonBackPrevious", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonEnd = "ActionButtonEnd", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonBeginning = "ActionButtonBeginning", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonReturn = "ActionButtonReturn", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonDocument = "ActionButtonDocument", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonSound = "ActionButtonSound", /** * @remarks * [Api set: ExcelApi 1.9] */ actionButtonMovie = "ActionButtonMovie", /** * @remarks * [Api set: ExcelApi 1.9] */ gear6 = "Gear6", /** * @remarks * [Api set: ExcelApi 1.9] */ gear9 = "Gear9", /** * @remarks * [Api set: ExcelApi 1.9] */ funnel = "Funnel", /** * @remarks * [Api set: ExcelApi 1.9] */ mathPlus = "MathPlus", /** * @remarks * [Api set: ExcelApi 1.9] */ mathMinus = "MathMinus", /** * @remarks * [Api set: ExcelApi 1.9] */ mathMultiply = "MathMultiply", /** * @remarks * [Api set: ExcelApi 1.9] */ mathDivide = "MathDivide", /** * @remarks * [Api set: ExcelApi 1.9] */ mathEqual = "MathEqual", /** * @remarks * [Api set: ExcelApi 1.9] */ mathNotEqual = "MathNotEqual", /** * @remarks * [Api set: ExcelApi 1.9] */ cornerTabs = "CornerTabs", /** * @remarks * [Api set: ExcelApi 1.9] */ squareTabs = "SquareTabs", /** * @remarks * [Api set: ExcelApi 1.9] */ plaqueTabs = "PlaqueTabs", /** * @remarks * [Api set: ExcelApi 1.9] */ chartX = "ChartX", /** * @remarks * [Api set: ExcelApi 1.9] */ chartStar = "ChartStar", /** * @remarks * [Api set: ExcelApi 1.9] */ chartPlus = "ChartPlus" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum ConnectorType { /** * @remarks * [Api set: ExcelApi 1.9] */ straight = "Straight", /** * @remarks * [Api set: ExcelApi 1.9] */ elbow = "Elbow", /** * @remarks * [Api set: ExcelApi 1.9] */ curve = "Curve" } /** * @remarks * [Api set: ExcelApi 1.10] */ enum ContentType { /** * Indicates a plain format type for the comment content. * @remarks * [Api set: ExcelApi 1.10] */ plain = "Plain", /** * Comment content containing mentions. * @remarks * [Api set: ExcelApi 1.10] */ mention = "Mention" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum SpecialCellType { /** * All cells with conditional formats. * @remarks * [Api set: ExcelApi 1.9] */ conditionalFormats = "ConditionalFormats", /** * Cells with validation criteria. * @remarks * [Api set: ExcelApi 1.9] */ dataValidations = "DataValidations", /** * Cells with no content. * @remarks * [Api set: ExcelApi 1.9] */ blanks = "Blanks", /** * Cells containing constants. * @remarks * [Api set: ExcelApi 1.9] */ constants = "Constants", /** * Cells containing formulas. * @remarks * [Api set: ExcelApi 1.9] */ formulas = "Formulas", /** * Cells with the same conditional format as the first cell in the range. * @remarks * [Api set: ExcelApi 1.9] */ sameConditionalFormat = "SameConditionalFormat", /** * Cells with the same data validation criteria as the first cell in the range. * @remarks * [Api set: ExcelApi 1.9] */ sameDataValidation = "SameDataValidation", /** * Cells that are visible. * @remarks * [Api set: ExcelApi 1.9] */ visible = "Visible" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum SpecialCellValueType { /** * Cells that have errors, boolean, numeric, or string values. * @remarks * [Api set: ExcelApi 1.9] */ all = "All", /** * Cells that have errors. * @remarks * [Api set: ExcelApi 1.9] */ errors = "Errors", /** * Cells that have errors or boolean values. * @remarks * [Api set: ExcelApi 1.9] */ errorsLogical = "ErrorsLogical", /** * Cells that have errors or numeric values. * @remarks * [Api set: ExcelApi 1.9] */ errorsNumbers = "ErrorsNumbers", /** * Cells that have errors or string values. * @remarks * [Api set: ExcelApi 1.9] */ errorsText = "ErrorsText", /** * Cells that have errors, boolean, or numeric values. * @remarks * [Api set: ExcelApi 1.9] */ errorsLogicalNumber = "ErrorsLogicalNumber", /** * Cells that have errors, boolean, or string values. * @remarks * [Api set: ExcelApi 1.9] */ errorsLogicalText = "ErrorsLogicalText", /** * Cells that have errors, numeric, or string values. * @remarks * [Api set: ExcelApi 1.9] */ errorsNumberText = "ErrorsNumberText", /** * Cells that have a boolean value. * @remarks * [Api set: ExcelApi 1.9] */ logical = "Logical", /** * Cells that have a boolean or numeric value. * @remarks * [Api set: ExcelApi 1.9] */ logicalNumbers = "LogicalNumbers", /** * Cells that have a boolean or string value. * @remarks * [Api set: ExcelApi 1.9] */ logicalText = "LogicalText", /** * Cells that have a boolean, numeric, or string value. * @remarks * [Api set: ExcelApi 1.9] */ logicalNumbersText = "LogicalNumbersText", /** * Cells that have a numeric value. * @remarks * [Api set: ExcelApi 1.9] */ numbers = "Numbers", /** * Cells that have a numeric or string value. * @remarks * [Api set: ExcelApi 1.9] */ numbersText = "NumbersText", /** * Cells that have a string value. * @remarks * [Api set: ExcelApi 1.9] */ text = "Text" } /** * Specifies the way that an object is attached to its underlying cells. * * @remarks * [Api set: ExcelApi 1.9] */ enum Placement { /** * The object is moved and sized with the cells. * @remarks * [Api set: ExcelApi 1.9] */ twoCell = "TwoCell", /** * The object is moved with the cells. * @remarks * [Api set: ExcelApi 1.9] */ oneCell = "OneCell", /** * The object is free floating. * @remarks * [Api set: ExcelApi 1.9] */ absolute = "Absolute" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum FillPattern { /** * @remarks * [Api set: ExcelApi 1.9] */ none = "None", /** * @remarks * [Api set: ExcelApi 1.9] */ solid = "Solid", /** * @remarks * [Api set: ExcelApi 1.9] */ gray50 = "Gray50", /** * @remarks * [Api set: ExcelApi 1.9] */ gray75 = "Gray75", /** * @remarks * [Api set: ExcelApi 1.9] */ gray25 = "Gray25", /** * @remarks * [Api set: ExcelApi 1.9] */ horizontal = "Horizontal", /** * @remarks * [Api set: ExcelApi 1.9] */ vertical = "Vertical", /** * @remarks * [Api set: ExcelApi 1.9] */ down = "Down", /** * @remarks * [Api set: ExcelApi 1.9] */ up = "Up", /** * @remarks * [Api set: ExcelApi 1.9] */ checker = "Checker", /** * @remarks * [Api set: ExcelApi 1.9] */ semiGray75 = "SemiGray75", /** * @remarks * [Api set: ExcelApi 1.9] */ lightHorizontal = "LightHorizontal", /** * @remarks * [Api set: ExcelApi 1.9] */ lightVertical = "LightVertical", /** * @remarks * [Api set: ExcelApi 1.9] */ lightDown = "LightDown", /** * @remarks * [Api set: ExcelApi 1.9] */ lightUp = "LightUp", /** * @remarks * [Api set: ExcelApi 1.9] */ grid = "Grid", /** * @remarks * [Api set: ExcelApi 1.9] */ crissCross = "CrissCross", /** * @remarks * [Api set: ExcelApi 1.9] */ gray16 = "Gray16", /** * @remarks * [Api set: ExcelApi 1.9] */ gray8 = "Gray8", /** * @remarks * [Api set: ExcelApi 1.9] */ linearGradient = "LinearGradient", /** * @remarks * [Api set: ExcelApi 1.9] */ rectangularGradient = "RectangularGradient" } /** * Specifies the horizontal alignment for the text frame in a shape. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeTextHorizontalAlignment { /** * @remarks * [Api set: ExcelApi 1.9] */ left = "Left", /** * @remarks * [Api set: ExcelApi 1.9] */ center = "Center", /** * @remarks * [Api set: ExcelApi 1.9] */ right = "Right", /** * @remarks * [Api set: ExcelApi 1.9] */ justify = "Justify", /** * @remarks * [Api set: ExcelApi 1.9] */ justifyLow = "JustifyLow", /** * @remarks * [Api set: ExcelApi 1.9] */ distributed = "Distributed", /** * @remarks * [Api set: ExcelApi 1.9] */ thaiDistributed = "ThaiDistributed" } /** * Specifies the vertical alignment for the text frame in a shape. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeTextVerticalAlignment { /** * @remarks * [Api set: ExcelApi 1.9] */ top = "Top", /** * @remarks * [Api set: ExcelApi 1.9] */ middle = "Middle", /** * @remarks * [Api set: ExcelApi 1.9] */ bottom = "Bottom", /** * @remarks * [Api set: ExcelApi 1.9] */ justified = "Justified", /** * @remarks * [Api set: ExcelApi 1.9] */ distributed = "Distributed" } /** * Specifies the vertical overflow for the text frame in a shape. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeTextVerticalOverflow { /** * Allow text to overflow the text frame vertically (can be from the top, bottom, or both depending on the text alignment). * @remarks * [Api set: ExcelApi 1.9] */ overflow = "Overflow", /** * Hide text that does not fit vertically within the text frame, and add an ellipsis (...) at the end of the visible text. * @remarks * [Api set: ExcelApi 1.9] */ ellipsis = "Ellipsis", /** * Hide text that does not fit vertically within the text frame. * @remarks * [Api set: ExcelApi 1.9] */ clip = "Clip" } /** * Specifies the horizontal overflow for the text frame in a shape. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeTextHorizontalOverflow { /** * @remarks * [Api set: ExcelApi 1.9] */ overflow = "Overflow", /** * @remarks * [Api set: ExcelApi 1.9] */ clip = "Clip" } /** * Specifies the reading order for the text frame in a shape. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeTextReadingOrder { /** * @remarks * [Api set: ExcelApi 1.9] */ leftToRight = "LeftToRight", /** * @remarks * [Api set: ExcelApi 1.9] */ rightToLeft = "RightToLeft" } /** * Specifies the orientation for the text frame in a shape. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeTextOrientation { /** * @remarks * [Api set: ExcelApi 1.9] */ horizontal = "Horizontal", /** * @remarks * [Api set: ExcelApi 1.9] */ vertical = "Vertical", /** * @remarks * [Api set: ExcelApi 1.9] */ vertical270 = "Vertical270", /** * @remarks * [Api set: ExcelApi 1.9] */ wordArtVertical = "WordArtVertical", /** * @remarks * [Api set: ExcelApi 1.9] */ eastAsianVertical = "EastAsianVertical", /** * @remarks * [Api set: ExcelApi 1.9] */ mongolianVertical = "MongolianVertical", /** * @remarks * [Api set: ExcelApi 1.9] */ wordArtVerticalRTL = "WordArtVerticalRTL" } /** * Determines the type of automatic sizing allowed. * * @remarks * [Api set: ExcelApi 1.9] */ enum ShapeAutoSize { /** * No autosizing. * @remarks * [Api set: ExcelApi 1.9] */ autoSizeNone = "AutoSizeNone", /** * The text is adjusted to fit the shape. * @remarks * [Api set: ExcelApi 1.9] */ autoSizeTextToFitShape = "AutoSizeTextToFitShape", /** * The shape is adjusted to fit the text. * @remarks * [Api set: ExcelApi 1.9] */ autoSizeShapeToFitText = "AutoSizeShapeToFitText", /** * A combination of automatic sizing schemes are used. * @remarks * [Api set: ExcelApi 1.9] */ autoSizeMixed = "AutoSizeMixed" } /** * Specifies the close behavior for `Workbook.close`. * * @remarks * [Api set: ExcelApi 1.9] */ enum CloseBehavior { /** * Save the possible changes before closing the workbook. * @remarks * [Api set: ExcelApi 1.9] */ save = "Save", /** * Discard the possible changes when closing the workbook. * @remarks * [Api set: ExcelApi 1.9] */ skipSave = "SkipSave" } /** * Specifies the save behavior for `Workbook.save`. * * @remarks * [Api set: ExcelApi 1.9] */ enum SaveBehavior { /** * Save the workbook without prompting the user. If file is not saved, it will save it with default name in the default location. * @remarks * [Api set: ExcelApi 1.9] */ save = "Save", /** * Prompts the "Save As" experience to the user if the workbook has not been saved, Ignored if the workbook was previously saved. * @remarks * [Api set: ExcelApi 1.9] */ prompt = "Prompt" } /** * Specifies the slicer sort behavior for `Slicer.sortBy`. * * @remarks * [Api set: ExcelApi 1.10] */ enum SlicerSortType { /** * Sort slicer items in the order provided by the data source. * @remarks * [Api set: ExcelApi 1.10] */ dataSourceOrder = "DataSourceOrder", /** * Sort slicer items in ascending order by item captions. * @remarks * [Api set: ExcelApi 1.10] */ ascending = "Ascending", /** * Sort slicer items in descending order by item captions. * @remarks * [Api set: ExcelApi 1.10] */ descending = "Descending" } /** * @remarks * [Api set: ExcelApi 1.9] */ enum RibbonTab { /** * @remarks * [Api set: ExcelApi 1.9] */ others = "Others", /** * @remarks * [Api set: ExcelApi 1.9] */ home = "Home", /** * @remarks * [Api set: ExcelApi 1.9] */ insert = "Insert", /** * @remarks * [Api set: ExcelApi 1.9] */ draw = "Draw", /** * @remarks * [Api set: ExcelApi 1.9] */ pageLayout = "PageLayout", /** * @remarks * [Api set: ExcelApi 1.9] */ formulas = "Formulas", /** * @remarks * [Api set: ExcelApi 1.9] */ data = "Data", /** * @remarks * [Api set: ExcelApi 1.9] */ review = "Review", /** * @remarks * [Api set: ExcelApi 1.9] */ view = "View", /** * @remarks * [Api set: ExcelApi 1.9] */ developer = "Developer", /** * @remarks * [Api set: ExcelApi 1.9] */ addIns = "AddIns", /** * @remarks * [Api set: ExcelApi 1.9] */ help = "Help" } /** * Represents a category of number formats. * * @remarks * [Api set: ExcelApi 1.12] */ enum NumberFormatCategory { /** * General format cells have no specific number format. * @remarks * [Api set: ExcelApi 1.12] */ general = "General", /** * Number is used for general display of numbers. Currency and Accounting offer specialized formatting for monetary value. * @remarks * [Api set: ExcelApi 1.12] */ number = "Number", /** * Currency formats are used for general monetary values. Use Accounting formats to align decimal points in a column. * @remarks * [Api set: ExcelApi 1.12] */ currency = "Currency", /** * Accounting formats line up the currency symbols and decimal points in a column. * @remarks * [Api set: ExcelApi 1.12] */ accounting = "Accounting", /** * Date formats display date and time serial numbers as date values. Date formats that begin with an asterisk (*) respond to changes in regional date and time settings that are specified for the operating system. Formats without an asterisk are not affected by operating system settings. * @remarks * [Api set: ExcelApi 1.12] */ date = "Date", /** * Time formats display date and time serial numbers as date values. Time formats that begin with an asterisk (*) respond to changes in regional date and time settings that are specified for the operating system. Formats without an asterisk are not affected by operating system settings. * @remarks * [Api set: ExcelApi 1.12] */ time = "Time", /** * Percentage formats multiply the cell value by 100 and displays the result with a percent symbol. * @remarks * [Api set: ExcelApi 1.12] */ percentage = "Percentage", /** * Fraction formats display the cell value as a whole number with the remainder rounded to the nearest fraction value. * @remarks * [Api set: ExcelApi 1.12] */ fraction = "Fraction", /** * Scientific formats display the cell value as a number between 1 and 10 multiplied by a power of 10. * @remarks * [Api set: ExcelApi 1.12] */ scientific = "Scientific", /** * Text format cells are treated as text even when a number is in the cell. The cell is displayed exactly as entered. * @remarks * [Api set: ExcelApi 1.12] */ text = "Text", /** * Special formats are useful for tracking list and database values. * @remarks * [Api set: ExcelApi 1.12] */ special = "Special", /** * A custom format that is not a part of any category. * @remarks * [Api set: ExcelApi 1.12] */ custom = "Custom" } /** * Represents a named sheet view of a worksheet. A sheet view stores the sort and filter rules for a particular worksheet. Every sheet view (even a temporary sheet view) has a unique, worksheet-scoped name that is used to access the view. * * @remarks * [Api set: ExcelApiOnline 1.1] */ class NamedSheetView extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets or sets the name of the sheet view. The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. * * @remarks * [Api set: ExcelApiOnline 1.1] */ name: string; /** * Activates this sheet view. This is equivalent to using "Switch To" in the Excel UI. * * @remarks * [Api set: ExcelApiOnline 1.1] */ activate(): void; /** * Removes the sheet view from the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ delete(): void; /** * Creates a copy of this sheet view. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param name The name of the duplicated sheet view. If no name is provided, one will be generated. * @returns The new, duplicated sheet view. */ duplicate(name?: string): Excel.NamedSheetView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.NamedSheetViewLoadOptions): Excel.NamedSheetView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.NamedSheetView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.NamedSheetView; /** * 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.NamedSheetView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedSheetViewData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Excel.Interfaces.NamedSheetViewData; } /** * Represents the collection of sheet views in the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ class NamedSheetViewCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.NamedSheetView[]; /** * Creates a new sheet view with the given name. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param name The name of the sheet view to be created. * Throws an error when the provided name already exists, is empty, or is a name reserved by the worksheet. * @returns The newly created sheet view object. */ add(name: string): Excel.NamedSheetView; /** * Creates and activates a new temporary sheet view. Temporary views are removed when closing the application, exiting the temporary view with the exit method, or switching to another sheet view. The temporary sheet view can also be accessed with the empty string (""), if the temporary view exists. * * @remarks * [Api set: ExcelApiOnline 1.1] * @returns The newly created sheet view object. */ enterTemporary(): Excel.NamedSheetView; /** * Exits the currently active sheet view. * * @remarks * [Api set: ExcelApiOnline 1.1] */ exit(): void; /** * Gets the worksheet's currently active sheet view. * * @remarks * [Api set: ExcelApiOnline 1.1] * @returns The currently active sheet view for this worksheet. */ getActive(): Excel.NamedSheetView; /** * Gets the number of sheet views in this worksheet. Includes the temporary sheet view if it exists. * * @remarks * [Api set: ExcelApiOnline 1.1] */ getCount(): OfficeExtension.ClientResult; /** * Gets a sheet view using its name. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param key The case-sensitive name of the sheet view. Use the empty string ("") to get the temporary sheet view, if the temporary view exists. * @returns The sheet view with the given name, or the temporary view if an empty string was provided. If there is no current temporary view and an empty string was provided, then an `ItemNotFound` error is thrown. */ getItem(key: string): Excel.NamedSheetView; /** * Gets a sheet view by its index in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] * * @param index The index of the sheet view object in the collection. * @returns The sheet view at the given index. */ getItemAt(index: number): Excel.NamedSheetView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.NamedSheetViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedSheetViewCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Excel.NamedSheetViewCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.NamedSheetViewCollection; /** * 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.NamedSheetViewCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedSheetViewCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Excel.Interfaces.NamedSheetViewCollectionData; } /** * An object containing the result of a function-evaluation operation * * @remarks * [Api set: ExcelApi 1.2] */ class FunctionResult extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. * * @remarks * [Api set: ExcelApi 1.2] */ readonly error: string; /** * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). * * @remarks * [Api set: ExcelApi 1.2] */ readonly value: T; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Excel.Interfaces.FunctionResultLoadOptions): FunctionResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): FunctionResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): FunctionResult; /** * 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 `FunctionResult` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Interfaces.FunctionResultData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Interfaces.FunctionResultData; } /** * An object for evaluating Excel functions. * * @remarks * [Api set: ExcelApi 1.2] */ class Functions extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the absolute value of a number, a number without its sign. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the real number for which you want the absolute value. */ abs(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the accrued interest for a security that pays periodic interest. * * @remarks * [Api set: ExcelApi 1.2] * * @param issue Is the security's issue date, expressed as a serial date number. * @param firstInterest Is the security's first interest date, expressed as a serial date number. * @param settlement Is the security's settlement date, expressed as a serial date number. * @param rate Is the security's annual coupon rate. * @param par Is the security's par value. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. * @param calcMethod Is a logical value: to accrued interest from issue date = TRUE or omitted; to calculate from last coupon payment date = FALSE. */ accrInt(issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstInterest: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, par: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, calcMethod?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the accrued interest for a security that pays interest at maturity. * * @remarks * [Api set: ExcelApi 1.2] * * @param issue Is the security's issue date, expressed as a serial date number. * @param settlement Is the security's maturity date, expressed as a serial date number. * @param rate Is the security's annual coupon rate. * @param par Is the security's par value. * @param basis Is the type of day count basis to use. */ accrIntM(issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, par: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the arccosine of a number, in radians in the range 0 to Pi. The arccosine is the angle whose cosine is Number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the cosine of the angle you want and must be from -1 to 1. */ acos(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse hyperbolic cosine of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number equal to or greater than 1. */ acosh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the arccotangent of a number, in radians in the range 0 to Pi. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the cotangent of the angle you want. */ acot(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse hyperbolic cotangent of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the hyperbolic cotangent of the angle that you want. */ acoth(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the prorated linear depreciation of an asset for each accounting period. * * @remarks * [Api set: ExcelApi 1.2] * * @param cost Is the cost of the asset. * @param datePurchased Is the date the asset is purchased. * @param firstPeriod Is the date of the end of the first period. * @param salvage Is the salvage value at the end of life of the asset. * @param period Is the period. * @param rate Is the rate of depreciation. * @param basis Year_basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days. */ amorDegrc(cost: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, datePurchased: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the prorated linear depreciation of an asset for each accounting period. * * @remarks * [Api set: ExcelApi 1.2] * * @param cost Is the cost of the asset. * @param datePurchased Is the date the asset is purchased. * @param firstPeriod Is the date of the end of the first period. * @param salvage Is the salvage value at the end of life of the asset. * @param period Is the period. * @param rate Is the rate of depreciation. * @param basis Year_basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days. */ amorLinc(cost: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, datePurchased: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references. */ and(...values: Array>): FunctionResult; /** * Converts a Roman numeral to Arabic. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the Roman numeral you want to convert. */ arabic(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell. * * @remarks * [Api set: ExcelApi 1.2] * * @param reference Is a reference to a cell or range of cells and can refer to multiple areas. */ areas(reference: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Changes full-width (double-byte) characters to half-width (single-byte) characters. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is a text, or a reference to a cell containing a text. */ asc(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the arcsine of a number in radians, in the range -Pi/2 to Pi/2. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the sine of the angle you want and must be from -1 to 1. */ asin(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse hyperbolic sine of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number equal to or greater than 1. */ asinh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the arctangent of a number in radians, in the range -Pi/2 to Pi/2. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the tangent of the angle you want. */ atan(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the arctangent of the specified x- and y- coordinates, in radians between -Pi and Pi, excluding -Pi. * * @remarks * [Api set: ExcelApi 1.2] * * @param xNum Is the x-coordinate of the point. * @param yNum Is the y-coordinate of the point. */ atan2(xNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse hyperbolic tangent of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number between -1 and 1 excluding -1 and 1. */ atanh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the average of the absolute deviations of data points from their mean. Arguments can be numbers or names, arrays, or references that contain numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 arguments for which you want the average of the absolute deviations. */ aveDev(...values: Array>): FunctionResult; /** * Returns the average (arithmetic mean) of its arguments, which can be numbers or names, arrays, or references that contain numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numeric arguments for which you want the average. */ average(...values: Array>): FunctionResult; /** * Returns the average (arithmetic mean) of its arguments, evaluating text and FALSE in arguments as 0; TRUE evaluates as 1. Arguments can be numbers, names, arrays, or references. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 arguments for which you want the average. */ averageA(...values: Array>): FunctionResult; /** * Finds average(arithmetic mean) for the cells specified by a given condition or criteria. * * @remarks * [Api set: ExcelApi 1.2] * * @param range Is the range of cells you want evaluated. * @param criteria Is the condition or criteria in the form of a number, expression, or text that defines which cells will be used to find the average. * @param averageRange Are the actual cells to be used to find the average. If omitted, the cells in range are used. */ averageIf(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, averageRange?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Finds average(arithmetic mean) for the cells specified by a given set of conditions or criteria. * * @remarks * [Api set: ExcelApi 1.2] * * @param averageRange Are the actual cells to be used to find the average. * @param values List of parameters, where the first element of each pair is the Is the range of cells you want evaluated for the particular condition , and the second element is is the condition or criteria in the form of a number, expression, or text that defines which cells will be used to find the average. */ averageIfs(averageRange: Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array | number | string | boolean>): FunctionResult; /** * Converts a number to text (baht). * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is a number that you want to convert. */ bahtText(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a number into a text representation with the given radix (base). * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number that you want to convert. * @param radix Is the base Radix that you want to convert the number into. * @param minLength Is the minimum length of the returned string. If omitted leading zeros are not added. */ base(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, radix: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, minLength?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the modified Bessel function In(x). * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function. * @param n Is the order of the Bessel function. */ besselI(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Bessel function Jn(x). * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function. * @param n Is the order of the Bessel function. */ besselJ(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the modified Bessel function Kn(x). * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function. * @param n Is the order of the function. */ besselK(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Bessel function Yn(x). * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function. * @param n Is the order of the function. */ besselY(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the beta probability distribution function. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value between A and B at which to evaluate the function. * @param alpha Is a parameter to the distribution and must be greater than 0. * @param beta Is a parameter to the distribution and must be greater than 0. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. * @param A Is an optional lower bound to the interval of x. If omitted, A = 0. * @param B Is an optional upper bound to the interval of x. If omitted, B = 1. */ beta_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, A?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, B?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the cumulative beta probability density function (BETA.DIST). * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability associated with the beta distribution. * @param alpha Is a parameter to the distribution and must be greater than 0. * @param beta Is a parameter to the distribution and must be greater than 0. * @param A Is an optional lower bound to the interval of x. If omitted, A = 0. * @param B Is an optional upper bound to the interval of x. If omitted, B = 1. */ beta_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, A?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, B?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a binary number to decimal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the binary number you want to convert. */ bin2Dec(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a binary number to hexadecimal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the binary number you want to convert. * @param places Is the number of characters to use. */ bin2Hex(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a binary number to octal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the binary number you want to convert. * @param places Is the number of characters to use. */ bin2Oct(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the individual term binomial distribution probability. * * @remarks * [Api set: ExcelApi 1.2] * * @param numberS Is the number of successes in trials. * @param trials Is the number of independent trials. * @param probabilityS Is the probability of success on each trial. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. */ binom_Dist(numberS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, trials: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the probability of a trial result using a binomial distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param trials Is the number of independent trials. * @param probabilityS Is the probability of success on each trial. * @param numberS Is the number of successes in trials. * @param numberS2 If provided this function returns the probability that the number of successful trials shall lie between numberS and numberS2. */ binom_Dist_Range(trials: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberS2?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value. * * @remarks * [Api set: ExcelApi 1.2] * * @param trials Is the number of Bernoulli trials. * @param probabilityS Is the probability of success on each trial, a number between 0 and 1 inclusive. * @param alpha Is the criterion value, a number between 0 and 1 inclusive. */ binom_Inv(trials: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a bitwise 'And' of two numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param number1 Is the decimal representation of the binary number you want to evaluate. * @param number2 Is the decimal representation of the binary number you want to evaluate. */ bitand(number1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a number shifted left by shift_amount bits. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the decimal representation of the binary number you want to evaluate. * @param shiftAmount Is the number of bits that you want to shift Number left by. */ bitlshift(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, shiftAmount: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a bitwise 'Or' of two numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param number1 Is the decimal representation of the binary number you want to evaluate. * @param number2 Is the decimal representation of the binary number you want to evaluate. */ bitor(number1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a number shifted right by shift_amount bits. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the decimal representation of the binary number you want to evaluate. * @param shiftAmount Is the number of bits that you want to shift Number right by. */ bitrshift(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, shiftAmount: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a bitwise 'Exclusive Or' of two numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param number1 Is the decimal representation of the binary number you want to evaluate. * @param number2 Is the decimal representation of the binary number you want to evaluate. */ bitxor(number1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number up, to the nearest integer or to the nearest multiple of significance. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value you want to round. * @param significance Is the multiple to which you want to round. * @param mode When given and nonzero this function will round away from zero. */ ceiling_Math(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mode?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number up, to the nearest integer or to the nearest multiple of significance. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value you want to round. * @param significance Is the multiple to which you want to round. */ ceiling_Precise(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the character specified by the code number from the character set for your computer. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is a number between 1 and 255 specifying which character you want. */ char(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the left-tailed probability of the chi-squared distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which you want to evaluate the distribution, a nonnegative number. * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. */ chiSq_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the right-tailed probability of the chi-squared distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which you want to evaluate the distribution, a nonnegative number. * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. */ chiSq_Dist_RT(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the left-tailed probability of the chi-squared distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability associated with the chi-squared distribution, a value between 0 and 1 inclusive. * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. */ chiSq_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the right-tailed probability of the chi-squared distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability associated with the chi-squared distribution, a value between 0 and 1 inclusive. * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. */ chiSq_Inv_RT(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Chooses a value or action to perform from a list of values, based on an index number. * * @remarks * [Api set: ExcelApi 1.2] * * @param indexNum Specifies which value argument is selected. indexNum must be between 1 and 254, or a formula or a reference to a number between 1 and 254. * @param values List of parameters, whose elements are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects. */ choose(indexNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array>): FunctionResult; /** * Removes all nonprintable characters from text. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is any worksheet information from which you want to remove nonprintable characters. */ clean(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a numeric code for the first character in a text string, in the character set used by your computer. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text for which you want the code of the first character. */ code(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of columns in an array or reference. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is an array or array formula, or a reference to a range of cells for which you want the number of columns. */ columns(array: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of combinations for a given number of items. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the total number of items. * @param numberChosen Is the number of items in each combination. */ combin(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of combinations with repetitions for a given number of items. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the total number of items. * @param numberChosen Is the number of items in each combination. */ combina(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts real and imaginary coefficients into a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param realNum Is the real coefficient of the complex number. * @param iNum Is the imaginary coefficient of the complex number. * @param suffix Is the suffix for the imaginary component of the complex number. */ complex(realNum: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, iNum: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, suffix?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Joins several text strings into one text string. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 text strings to be joined into a single text string and can be text strings, numbers, or single-cell references. */ concatenate(...values: Array>): FunctionResult; /** * Returns the confidence interval for a population mean, using a normal distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param alpha Is the significance level used to compute the confidence level, a number greater than 0 and less than 1. * @param standardDev Is the population standard deviation for the data range and is assumed to be known. standardDev must be greater than 0. * @param size Is the sample size. */ confidence_Norm(alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, size: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the confidence interval for a population mean, using a Student's T distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param alpha Is the significance level used to compute the confidence level, a number greater than 0 and less than 1. * @param standardDev Is the population standard deviation for the data range and is assumed to be known. standardDev must be greater than 0. * @param size Is the sample size. */ confidence_T(alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, size: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a number from one measurement system to another. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value in from_units to convert. * @param fromUnit Is the units for number. * @param toUnit Is the units for the result. */ convert(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fromUnit: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, toUnit: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cosine of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the cosine. */ cos(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic cosine of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number. */ cosh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cotangent of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the cotangent. */ cot(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic cotangent of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the hyperbolic cotangent. */ coth(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Counts the number of cells in a range that contain numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 arguments that can contain or refer to a variety of different types of data, but only numbers are counted. */ count(...values: Array>): FunctionResult; /** * Counts the number of cells in a range that are not empty. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 arguments representing the values and cells you want to count. Values can be any type of information. */ countA(...values: Array>): FunctionResult; /** * Counts the number of empty cells in a specified range of cells. * * @remarks * [Api set: ExcelApi 1.2] * * @param range Is the range from which you want to count the empty cells. */ countBlank(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Counts the number of cells within a range that meet the given condition. * * @remarks * [Api set: ExcelApi 1.2] * * @param range Is the range of cells from which you want to count nonblank cells. * @param criteria Is the condition in the form of a number, expression, or text that defines which cells will be counted. */ countIf(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Counts the number of cells specified by a given set of conditions or criteria. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, where the first element of each pair is the Is the range of cells you want evaluated for the particular condition , and the second element is is the condition in the form of a number, expression, or text that defines which cells will be counted. */ countIfs(...values: Array | number | string | boolean>): FunctionResult; /** * Returns the number of days from the beginning of the coupon period to the settlement date. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ coupDayBs(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of days in the coupon period that contains the settlement date. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ coupDays(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of days from the settlement date to the next coupon date. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ coupDaysNc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the next coupon date after the settlement date. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ coupNcd(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of coupons payable between the settlement date and maturity date. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ coupNum(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the previous coupon date before the settlement date. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ coupPcd(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cosecant of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the cosecant. */ csc(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic cosecant of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the hyperbolic cosecant. */ csch(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cumulative interest paid between two periods. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate. * @param nper Is the total number of payment periods. * @param pv Is the present value. * @param startPeriod Is the first period in the calculation. * @param endPeriod Is the last period in the calculation. * @param type Is the timing of the payment. */ cumIPmt(rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cumulative principal paid on a loan between two periods. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate. * @param nper Is the total number of payment periods. * @param pv Is the present value. * @param startPeriod Is the first period in the calculation. * @param endPeriod Is the last period in the calculation. * @param type Is the timing of the payment. */ cumPrinc(rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Averages the values in a column in a list or database that match conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ daverage(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Counts the cells containing numbers in the field (column) of records in the database that match the conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dcount(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Counts nonblank cells in the field (column) of records in the database that match the conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dcountA(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Extracts from a database a single record that matches the conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dget(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the largest number in the field (column) of records in the database that match the conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dmax(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the smallest number in the field (column) of records in the database that match the conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dmin(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Multiplies the values in the field (column) of records in the database that match the conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dproduct(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Estimates the standard deviation based on a sample from selected database entries. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dstDev(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Calculates the standard deviation based on the entire population of selected database entries. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dstDevP(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Adds the numbers in the field (column) of records in the database that match the conditions you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dsum(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Estimates variance based on a sample from selected database entries. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dvar(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Calculates variance based on the entire population of selected database entries. * * @remarks * [Api set: ExcelApi 1.2] * * @param database Is the range of cells that makes up the list or database. A database is a list of related data. * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. */ dvarP(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number that represents the date in Microsoft Excel date-time code. * * @remarks * [Api set: ExcelApi 1.2] * * @param year Is a number from 1900 or 1904 (depending on the workbook's date system) to 9999. * @param month Is a number from 1 to 12 representing the month of the year. * @param day Is a number from 1 to 31 representing the day of the month. */ date(year: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, month: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, day: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a date in the form of text to a number that represents the date in Microsoft Excel date-time code. * * @remarks * [Api set: ExcelApi 1.2] * * @param dateText Is text that represents a date in a Microsoft Excel date format, between 1/1/1900 or 1/1/1904 (depending on the workbook's date system) and 12/31/9999. */ datevalue(dateText: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the day of the month, a number from 1 to 31. * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is a number in the date-time code used by Microsoft Excel. */ day(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of days between the two dates. * * @remarks * [Api set: ExcelApi 1.2] * * @param endDate startDate and endDate are the two dates between which you want to know the number of days. * @param startDate startDate and endDate are the two dates between which you want to know the number of days. */ days(endDate: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startDate: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of days between two dates based on a 360-day year (twelve 30-day months). * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate startDate and endDate are the two dates between which you want to know the number of days. * @param endDate startDate and endDate are the two dates between which you want to know the number of days. * @param method Is a logical value specifying the calculation method: U.S. (NASD) = FALSE or omitted; European = TRUE. */ days360(startDate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, method?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the depreciation of an asset for a specified period using the fixed-declining balance method. * * @remarks * [Api set: ExcelApi 1.2] * * @param cost Is the initial cost of the asset. * @param salvage Is the salvage value at the end of the life of the asset. * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). * @param period Is the period for which you want to calculate the depreciation. Period must use the same units as Life. * @param month Is the number of months in the first year. If month is omitted, it is assumed to be 12. */ db(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, month?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Changes half-width (single-byte) characters within a character string to full-width (double-byte) characters. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is a text, or a reference to a cell containing a text. */ dbcs(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param cost Is the initial cost of the asset. * @param salvage Is the salvage value at the end of the life of the asset. * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). * @param period Is the period for which you want to calculate the depreciation. Period must use the same units as Life. * @param factor Is the rate at which the balance declines. If Factor is omitted, it is assumed to be 2 (the double-declining balance method). */ ddb(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, factor?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a decimal number to binary. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the decimal integer you want to convert. * @param places Is the number of characters to use. */ dec2Bin(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a decimal number to hexadecimal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the decimal integer you want to convert. * @param places Is the number of characters to use. */ dec2Hex(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a decimal number to octal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the decimal integer you want to convert. * @param places Is the number of characters to use. */ dec2Oct(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a text representation of a number in a given base into a decimal number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number that you want to convert. * @param radix Is the base Radix of the number you are converting. */ decimal(number: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, radix: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts radians to degrees. * * @remarks * [Api set: ExcelApi 1.2] * * @param angle Is the angle in radians that you want to convert. */ degrees(angle: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Tests whether two numbers are equal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number1 Is the first number. * @param number2 Is the second number. */ delta(number1: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the sum of squares of deviations of data points from their sample mean. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 arguments, or an array or array reference, on which you want DEVSQ to calculate. */ devSq(...values: Array>): FunctionResult; /** * Returns the discount rate for a security. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param pr Is the security's price per $100 face value. * @param redemption Is the security's redemption value per $100 face value. * @param basis Is the type of day count basis to use. */ disc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a number to text, using currency format. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is a number, a reference to a cell containing a number, or a formula that evaluates to a number. * @param decimals Is the number of digits to the right of the decimal point. The number is rounded as necessary; if omitted, Decimals = 2. */ dollar(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimals?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number. * * @remarks * [Api set: ExcelApi 1.2] * * @param fractionalDollar Is a number expressed as a fraction. * @param fraction Is the integer to use in the denominator of the fraction. */ dollarDe(fractionalDollar: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fraction: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction. * * @remarks * [Api set: ExcelApi 1.2] * * @param decimalDollar Is a decimal number. * @param fraction Is the integer to use in the denominator of a fraction. */ dollarFr(decimalDollar: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fraction: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the annual duration of a security with periodic interest payments. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param coupon Is the security's annual coupon rate. * @param yld Is the security's annual yield. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ duration(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, coupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number up, to the nearest integer or to the nearest multiple of significance. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value you want to round. * @param significance Is the multiple to which you want to round. */ ecma_Ceiling(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the serial number of the date that is the indicated number of months before or after the start date. * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate Is a serial date number that represents the start date. * @param months Is the number of months before or after startDate. */ edate(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, months: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the effective annual interest rate. * * @remarks * [Api set: ExcelApi 1.2] * * @param nominalRate Is the nominal interest rate. * @param npery Is the number of compounding periods per year. */ effect(nominalRate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, npery: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the serial number of the last day of the month before or after a specified number of months. * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate Is a serial date number that represents the start date. * @param months Is the number of months before or after the startDate. */ eoMonth(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, months: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the error function. * * @remarks * [Api set: ExcelApi 1.2] * * @param lowerLimit Is the lower bound for integrating ERF. * @param upperLimit Is the upper bound for integrating ERF. */ erf(lowerLimit: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, upperLimit?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the complementary error function. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the lower bound for integrating ERF. */ erfC(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the complementary error function. * * @remarks * [Api set: ExcelApi 1.2] * * @param X Is the lower bound for integrating ERFC.PRECISE. */ erfC_Precise(X: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the error function. * * @remarks * [Api set: ExcelApi 1.2] * * @param X Is the lower bound for integrating ERF.PRECISE. */ erf_Precise(X: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a number matching an error value. * * @remarks * [Api set: ExcelApi 1.2] * * @param errorVal Is the error value for which you want the identifying number, and can be an actual error value or a reference to a cell containing an error value. */ error_Type(errorVal: string | number | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a positive number up and negative number down to the nearest even integer. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value to round. */ even(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive. * * @remarks * [Api set: ExcelApi 1.2] * * @param text1 Is the first text string. * @param text2 Is the second text string. */ exact(text1: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, text2: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns e raised to the power of a given number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the exponent applied to the base e. The constant e equals 2.71828182845904, the base of the natural logarithm. */ exp(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the exponential distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value of the function, a nonnegative number. * @param lambda Is the parameter value, a positive number. * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. */ expon_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lambda: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the future value of an initial principal after applying a series of compound interest rates. * * @remarks * [Api set: ExcelApi 1.2] * * @param principal Is the present value. * @param schedule Is an array of interest rates to apply. */ fvschedule(principal: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, schedule: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the (left-tailed) F probability distribution (degree of diversity) for two data sets. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function, a nonnegative number. * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. */ f_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the (right-tailed) F probability distribution (degree of diversity) for two data sets. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function, a nonnegative number. * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. */ f_Dist_RT(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the (left-tailed) F probability distribution: if p = F.DIST(x,...), then F.INV(p,...) = x. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability associated with the F cumulative distribution, a number between 0 and 1 inclusive. * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. */ f_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the (right-tailed) F probability distribution: if p = F.DIST.RT(x,...), then F.INV.RT(p,...) = x. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability associated with the F cumulative distribution, a number between 0 and 1 inclusive. * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. */ f_Inv_RT(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the factorial of a number, equal to 1*2*3*...* Number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the nonnegative number you want the factorial of. */ fact(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the double factorial of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value for which to return the double factorial. */ factDouble(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the logical value FALSE. * * @remarks * [Api set: ExcelApi 1.2] */ false(): FunctionResult; /** * Returns the starting position of one text string within another text string. FIND is case-sensitive. * * @remarks * [Api set: ExcelApi 1.2] * * @param findText Is the text you want to find. Use double quotes (empty text) to match the first character in withinText; wildcard characters not allowed. * @param withinText Is the text containing the text you want to find. * @param startNum Specifies the character at which to start the search. The first character in withinText is character number 1. If omitted, startNum = 1. */ find(findText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, withinText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Finds the starting position of one text string within another text string. FINDB is case-sensitive. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param findText Is the text you want to find. * @param withinText Is the text containing the text you want to find. * @param startNum Specifies the character at which to start the search. */ findB(findText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, withinText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Fisher transformation. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value for which you want the transformation, a number between -1 and 1, excluding -1 and 1. */ fisher(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the Fisher transformation: if y = FISHER(x), then FISHERINV(y) = x. * * @remarks * [Api set: ExcelApi 1.2] * * @param y Is the value for which you want to perform the inverse of the transformation. */ fisherInv(y: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number to the specified number of decimals and returns the result as text with or without commas. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number you want to round and convert to text. * @param decimals Is the number of digits to the right of the decimal point. If omitted, Decimals = 2. * @param noCommas Is a logical value: do not display commas in the returned text = TRUE; do display commas in the returned text = FALSE or omitted. */ fixed(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimals?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, noCommas?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number down, to the nearest integer or to the nearest multiple of significance. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value you want to round. * @param significance Is the multiple to which you want to round. * @param mode When given and nonzero this function will round towards zero. */ floor_Math(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mode?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number down, to the nearest integer or to the nearest multiple of significance. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the numeric value you want to round. * @param significance Is the multiple to which you want to round. */ floor_Precise(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the future value of an investment based on periodic, constant payments and a constant interest rate. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. * @param nper Is the total number of payment periods in the investment. * @param pmt Is the payment made each period; it cannot change over the life of the investment. * @param pv Is the present value, or the lump-sum amount that a series of future payments is worth now. If omitted, Pv = 0. * @param type Is a value representing the timing of payment: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. */ fv(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Gamma function value. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value for which you want to calculate Gamma. */ gamma(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the natural logarithm of the gamma function. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value for which you want to calculate GAMMALN, a positive number. */ gammaLn(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the natural logarithm of the gamma function. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value for which you want to calculate GAMMALN.PRECISE, a positive number. */ gammaLn_Precise(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the gamma distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which you want to evaluate the distribution, a nonnegative number. * @param alpha Is a parameter to the distribution, a positive number. * @param beta Is a parameter to the distribution, a positive number. If beta = 1, GAMMA.DIST returns the standard gamma distribution. * @param cumulative Is a logical value: return the cumulative distribution function = TRUE; return the probability mass function = FALSE or omitted. */ gamma_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the gamma cumulative distribution: if p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is the probability associated with the gamma distribution, a number between 0 and 1, inclusive. * @param alpha Is a parameter to the distribution, a positive number. * @param beta Is a parameter to the distribution, a positive number. If beta = 1, GAMMA.INV returns the inverse of the standard gamma distribution. */ gamma_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns 0.5 less than the standard normal cumulative distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value for which you want the distribution. */ gauss(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the greatest common divisor. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 values. */ gcd(...values: Array>): FunctionResult; /** * Tests whether a number is greater than a threshold value. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value to test against step. * @param step Is the threshold value. */ geStep(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, step?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the geometric mean of an array or range of positive numeric data. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the mean. */ geoMean(...values: Array>): FunctionResult; /** * Looks for a value in the top row of a table or array of values and returns the value in the same column from a row you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param lookupValue Is the value to be found in the first row of the table and can be a value, a reference, or a text string. * @param tableArray Is a table of text, numbers, or logical values in which data is looked up. tableArray can be a reference to a range or a range name. * @param rowIndexNum Is the row number in tableArray from which the matching value should be returned. The first row of values in the table is row 1. * @param rangeLookup Is a logical value: to find the closest match in the top row (sorted in ascending order) = TRUE or omitted; find an exact match = FALSE. */ hlookup(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, tableArray: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, rowIndexNum: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, rangeLookup?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the harmonic mean of a data set of positive numbers: the reciprocal of the arithmetic mean of reciprocals. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the harmonic mean. */ harMean(...values: Array>): FunctionResult; /** * Converts a Hexadecimal number to binary. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the hexadecimal number you want to convert. * @param places Is the number of characters to use. */ hex2Bin(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a hexadecimal number to decimal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the hexadecimal number you want to convert. */ hex2Dec(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a hexadecimal number to octal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the hexadecimal number you want to convert. * @param places Is the number of characters to use. */ hex2Oct(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.). * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is a number in the date-time code used by Microsoft Excel, or text in time format, such as 16:48:00 or 4:48:00 PM. */ hour(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hypergeometric distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param sampleS Is the number of successes in the sample. * @param numberSample Is the size of the sample. * @param populationS Is the number of successes in the population. * @param numberPop Is the population size. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. */ hypGeom_Dist(sampleS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberSample: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, populationS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberPop: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet. * * @remarks * [Api set: ExcelApi 1.2] * * @param linkLocation Is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path. * @param friendlyName Is text or a number that is displayed in the cell. If omitted, the cell displays the linkLocation text. */ hyperlink(linkLocation: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, friendlyName?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number up, to the nearest integer or to the nearest multiple of significance. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value you want to round. * @param significance Is the optional multiple to which you want to round. */ iso_Ceiling(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param logicalTest Is any value or expression that can be evaluated to TRUE or FALSE. * @param valueIfTrue Is the value that is returned if logicalTest is TRUE. If omitted, TRUE is returned. You can nest up to seven IF functions. * @param valueIfFalse Is the value that is returned if logicalTest is FALSE. If omitted, FALSE is returned. */ if(logicalTest: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, valueIfTrue?: Excel.Range | number | string | boolean | Excel.RangeReference | Excel.FunctionResult, valueIfFalse?: Excel.Range | number | string | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the absolute value (modulus) of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the absolute value. */ imAbs(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the argument q, an angle expressed in radians. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the argument. */ imArgument(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the complex conjugate of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the conjugate. */ imConjugate(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cosine of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the cosine. */ imCos(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic cosine of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the hyperbolic cosine. */ imCosh(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cotangent of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the cotangent. */ imCot(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the cosecant of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the cosecant. */ imCsc(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic cosecant of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the hyperbolic cosecant. */ imCsch(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the quotient of two complex numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber1 Is the complex numerator or dividend. * @param inumber2 Is the complex denominator or divisor. */ imDiv(inumber1: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, inumber2: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the exponential of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the exponential. */ imExp(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the natural logarithm of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the natural logarithm. */ imLn(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the base-10 logarithm of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the common logarithm. */ imLog10(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the base-2 logarithm of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the base-2 logarithm. */ imLog2(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a complex number raised to an integer power. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number you want to raise to a power. * @param number Is the power to which you want to raise the complex number. */ imPower(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the product of 1 to 255 complex numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values Inumber1, Inumber2,... are from 1 to 255 complex numbers to multiply. */ imProduct(...values: Array>): FunctionResult; /** * Returns the real coefficient of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the real coefficient. */ imReal(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the secant of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the secant. */ imSec(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic secant of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the hyperbolic secant. */ imSech(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the sine of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the sine. */ imSin(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic sine of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the hyperbolic sine. */ imSinh(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the square root of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the square root. */ imSqrt(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the difference of two complex numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber1 Is the complex number from which to subtract inumber2. * @param inumber2 Is the complex number to subtract from inumber1. */ imSub(inumber1: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, inumber2: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the sum of complex numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are from 1 to 255 complex numbers to add. */ imSum(...values: Array>): FunctionResult; /** * Returns the tangent of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the tangent. */ imTan(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the imaginary coefficient of a complex number. * * @remarks * [Api set: ExcelApi 1.2] * * @param inumber Is a complex number for which you want the imaginary coefficient. */ imaginary(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number down to the nearest integer. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the real number you want to round down to an integer. */ int(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the interest rate for a fully invested security. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param investment Is the amount invested in the security. * @param redemption Is the amount to be received at maturity. * @param basis Is the type of day count basis to use. */ intRate(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, investment: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the interest payment for a given period for an investment, based on periodic, constant payments and a constant interest rate. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. * @param per Is the period for which you want to find the interest and must be in the range 1 to Nper. * @param nper Is the total number of payment periods in an investment. * @param pv Is the present value, or the lump-sum amount that a series of future payments is worth now. * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, Fv = 0. * @param type Is a logical value representing the timing of payment: at the end of the period = 0 or omitted, at the beginning of the period = 1. */ ipmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the internal rate of return for a series of cash flows. * * @remarks * [Api set: ExcelApi 1.2] * * @param values Is an array or a reference to cells that contain numbers for which you want to calculate the internal rate of return. * @param guess Is a number that you guess is close to the result of IRR; 0.1 (10 percent) if omitted. */ irr(values: Excel.Range | Excel.RangeReference | Excel.FunctionResult, guess?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is an error (#VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!) excluding #N/A, and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. */ isErr(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is an error (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!), and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. */ isError(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns TRUE if the number is even. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value to test. */ isEven(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a reference is to a cell containing a formula, and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param reference Is a reference to the cell you want to test. Reference can be a cell reference, a formula, or name that refers to a cell. */ isFormula(reference: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is a logical value (TRUE or FALSE), and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. */ isLogical(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is #N/A, and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. */ isNA(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is not text (blank cells are not text), and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want tested: a cell; a formula; or a name referring to a cell, formula, or value. */ isNonText(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is a number, and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. */ isNumber(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns TRUE if the number is odd. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value to test. */ isOdd(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is text, and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. */ isText(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the ISO week number in the year for a given date. * * @remarks * [Api set: ExcelApi 1.2] * * @param date Is the date-time code used by Microsoft Excel for date and time calculation. */ isoWeekNum(date: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the interest paid during a specific period of an investment. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. * @param per Period for which you want to find the interest. * @param nper Number of payment periods in an investment. * @param pv Lump sum amount that a series of future payments is right now. */ ispmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is a reference, and returns TRUE or FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. */ isref(value: Excel.Range | number | string | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the kurtosis of a data set. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the kurtosis. */ kurt(...values: Array>): FunctionResult; /** * Returns the k-th largest value in a data set. For example, the fifth largest number. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or range of data for which you want to determine the k-th largest value. * @param k Is the position (from the largest) in the array or cell range of the value to return. */ large(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the least common multiple. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 values for which you want the least common multiple. */ lcm(...values: Array>): FunctionResult; /** * Returns the specified number of characters from the start of a text string. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text string containing the characters you want to extract. * @param numChars Specifies how many characters you want LEFT to extract; 1 if omitted. */ left(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the specified number of characters from the start of a text string. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text string containing the characters you want to extract. * @param numBytes Specifies how many characters you want LEFT to return. */ leftb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of characters in a text string. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text whose length you want to find. Spaces count as characters. */ len(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of characters in a text string. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text whose length you want to find. */ lenb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the natural logarithm of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the positive real number for which you want the natural logarithm. */ ln(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the logarithm of a number to the base you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the positive real number for which you want the logarithm. * @param base Is the base of the logarithm; 10 if omitted. */ log(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, base?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the base-10 logarithm of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the positive real number for which you want the base-10 logarithm. */ log10(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the lognormal distribution of x, where ln(x) is normally distributed with parameters Mean and Standard_dev. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function, a positive number. * @param mean Is the mean of ln(x). * @param standardDev Is the standard deviation of ln(x), a positive number. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. */ logNorm_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the lognormal cumulative distribution function of x, where ln(x) is normally distributed with parameters Mean and Standard_dev. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability associated with the lognormal distribution, a number between 0 and 1, inclusive. * @param mean Is the mean of ln(x). * @param standardDev Is the standard deviation of ln(x), a positive number. */ logNorm_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility. * * @remarks * [Api set: ExcelApi 1.2] * * @param lookupValue Is a value that LOOKUP searches for in lookupVector and can be a number, text, a logical value, or a name or reference to a value. * @param lookupVector Is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order. * @param resultVector Is a range that contains only one row or column, the same size as lookupVector. */ lookup(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lookupVector: Excel.Range | Excel.RangeReference | Excel.FunctionResult, resultVector?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts all letters in a text string to lowercase. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text you want to convert to lowercase. Characters in Text that are not letters are not changed. */ lower(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Macauley modified duration for a security with an assumed par value of $100. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param coupon Is the security's annual coupon rate. * @param yld Is the security's annual yield. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ mduration(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, coupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the internal rate of return for a series of periodic cash flows, considering both cost of investment and interest on reinvestment of cash. * * @remarks * [Api set: ExcelApi 1.2] * * @param values Is an array or a reference to cells that contain numbers that represent a series of payments (negative) and income (positive) at regular periods. * @param financeRate Is the interest rate you pay on the money used in the cash flows. * @param reinvestRate Is the interest rate you receive on the cash flows as you reinvest them. */ mirr(values: Excel.Range | Excel.RangeReference | Excel.FunctionResult, financeRate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, reinvestRate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a number rounded to the desired multiple. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value to round. * @param multiple Is the multiple to which you want to round number. */ mround(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, multiple: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the relative position of an item in an array that matches a specified value in a specified order. * * @remarks * [Api set: ExcelApi 1.2] * * @param lookupValue Is the value you use to find the value you want in the array, a number, text, or logical value, or a reference to one of these. * @param lookupArray Is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array. * @param matchType Is a number 1, 0, or -1 indicating which value to return. */ match(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lookupArray: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, matchType?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the largest value in a set of values. Ignores logical values and text. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the maximum. */ max(...values: Array>): FunctionResult; /** * Returns the largest value in a set of values. Does not ignore logical values and text. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the maximum. */ maxA(...values: Array>): FunctionResult; /** * Returns the median, or the number in the middle of the set of given numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the median. */ median(...values: Array>): FunctionResult; /** * Returns the characters from the middle of a text string, given a starting position and length. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text string from which you want to extract the characters. * @param startNum Is the position of the first character you want to extract. The first character in Text is 1. * @param numChars Specifies how many characters to return from Text. */ mid(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns characters from the middle of a text string, given a starting position and length. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text string containing the characters you want to extract. * @param startNum Is the position of the first character you want to extract in text. * @param numBytes Specifies how many characters to return from text. */ midb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the smallest number in a set of values. Ignores logical values and text. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the minimum. */ min(...values: Array>): FunctionResult; /** * Returns the smallest value in a set of values. Does not ignore logical values and text. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the minimum. */ minA(...values: Array>): FunctionResult; /** * Returns the minute, a number from 0 to 59. * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is a number in the date-time code used by Microsoft Excel or text in time format, such as 16:48:00 or 4:48:00 PM. */ minute(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the remainder after a number is divided by a divisor. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number for which you want to find the remainder after the division is performed. * @param divisor Is the number by which you want to divide Number. */ mod(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, divisor: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the month, a number from 1 (January) to 12 (December). * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is a number in the date-time code used by Microsoft Excel. */ month(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the multinomial of a set of numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 values for which you want the multinomial. */ multiNomial(...values: Array>): FunctionResult; /** * Converts non-number value to a number, dates to serial numbers, TRUE to 1, anything else to 0 (zero). * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value you want converted. */ n(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of periods for an investment based on periodic, constant payments and a constant interest rate. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. * @param pmt Is the payment made each period; it cannot change over the life of the investment. * @param pv Is the present value, or the lump-sum amount that a series of future payments is worth now. * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, zero is used. * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. */ nper(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the error value #N/A (value not available). * * @remarks * [Api set: ExcelApi 1.2] */ na(): FunctionResult; /** * Returns the negative binomial distribution, the probability that there will be Number_f failures before the Number_s-th success, with Probability_s probability of a success. * * @remarks * [Api set: ExcelApi 1.2] * * @param numberF Is the number of failures. * @param numberS Is the threshold number of successes. * @param probabilityS Is the probability of a success; a number between 0 and 1. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. */ negBinom_Dist(numberF: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of whole workdays between two dates. * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate Is a serial date number that represents the start date. * @param endDate Is a serial date number that represents the end date. * @param holidays 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. */ networkDays(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of whole workdays between two dates with custom weekend parameters. * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate Is a serial date number that represents the start date. * @param endDate Is a serial date number that represents the end date. * @param weekend Is a number or string specifying when weekends occur. * @param holidays 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. */ networkDays_Intl(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, weekend?: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the annual nominal interest rate. * * @remarks * [Api set: ExcelApi 1.2] * * @param effectRate Is the effective interest rate. * @param npery Is the number of compounding periods per year. */ nominal(effectRate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, npery: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the normal distribution for the specified mean and standard deviation. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value for which you want the distribution. * @param mean Is the arithmetic mean of the distribution. * @param standardDev Is the standard deviation of the distribution, a positive number. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. */ norm_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability corresponding to the normal distribution, a number between 0 and 1 inclusive. * @param mean Is the arithmetic mean of the distribution. * @param standardDev Is the standard deviation of the distribution, a positive number. */ norm_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the standard normal distribution (has a mean of zero and a standard deviation of one). * * @remarks * [Api set: ExcelApi 1.2] * * @param z Is the value for which you want the distribution. * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. */ norm_S_Dist(z: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the inverse of the standard normal cumulative distribution (has a mean of zero and a standard deviation of one). * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is a probability corresponding to the normal distribution, a number between 0 and 1 inclusive. */ norm_S_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Changes FALSE to TRUE, or TRUE to FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param logical Is a value or expression that can be evaluated to TRUE or FALSE. */ not(logical: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the current date and time formatted as a date and time. * * @remarks * [Api set: ExcelApi 1.2] */ now(): FunctionResult; /** * Returns the net present value of an investment based on a discount rate and a series of future payments (negative values) and income (positive values). * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the rate of discount over the length of one period. * @param values List of parameters, whose elements are 1 to 254 payments and income, equally spaced in time and occurring at the end of each period. */ npv(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array>): FunctionResult; /** * Converts text to number in a locale-independent manner. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the string representing the number you want to convert. * @param decimalSeparator Is the character used as the decimal separator in the string. * @param groupSeparator Is the character used as the group separator in the string. */ numberValue(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimalSeparator?: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, groupSeparator?: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts an octal number to binary. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the octal number you want to convert. * @param places Is the number of characters to use. */ oct2Bin(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts an octal number to decimal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the octal number you want to convert. */ oct2Dec(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts an octal number to hexadecimal. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the octal number you want to convert. * @param places Is the number of characters to use. */ oct2Hex(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a positive number up and negative number down to the nearest odd integer. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the value to round. */ odd(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the price per $100 face value of a security with an odd first period. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param issue Is the security's issue date, expressed as a serial date number. * @param firstCoupon Is the security's first coupon date, expressed as a serial date number. * @param rate Is the security's interest rate. * @param yld Is the security's annual yield. * @param redemption Is the security's redemption value per $100 face value. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ oddFPrice(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstCoupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the yield of a security with an odd first period. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param issue Is the security's issue date, expressed as a serial date number. * @param firstCoupon Is the security's first coupon date, expressed as a serial date number. * @param rate Is the security's interest rate. * @param pr Is the security's price. * @param redemption Is the security's redemption value per $100 face value. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ oddFYield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstCoupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the price per $100 face value of a security with an odd last period. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param lastInterest Is the security's last coupon date, expressed as a serial date number. * @param rate Is the security's interest rate. * @param yld Is the security's annual yield. * @param redemption Is the security's redemption value per $100 face value. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ oddLPrice(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lastInterest: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the yield of a security with an odd last period. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param lastInterest Is the security's last coupon date, expressed as a serial date number. * @param rate Is the security's interest rate. * @param pr Is the security's price. * @param redemption Is the security's redemption value per $100 face value. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ oddLYield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lastInterest: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether any of the arguments are TRUE, and returns TRUE or FALSE. Returns FALSE only if all arguments are FALSE. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 conditions that you want to test that can be either TRUE or FALSE. */ or(...values: Array>): FunctionResult; /** * Returns the number of periods required by an investment to reach a specified value. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate per period. * @param pv Is the present value of the investment. * @param fv Is the desired future value of the investment. */ pduration(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the rank of a value in a data set as a percentage of the data set as a percentage (0..1, exclusive) of the data set. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or range of data with numeric values that defines relative standing. * @param x Is the value for which you want to know the rank. * @param significance Is an optional value that identifies the number of significant digits for the returned percentage, three digits if omitted (0.xxx%). */ percentRank_Exc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the rank of a value in a data set as a percentage of the data set as a percentage (0..1, inclusive) of the data set. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or range of data with numeric values that defines relative standing. * @param x Is the value for which you want to know the rank. * @param significance Is an optional value that identifies the number of significant digits for the returned percentage, three digits if omitted (0.xxx%). */ percentRank_Inc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the k-th percentile of values in a range, where k is in the range 0..1, exclusive. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or range of data that defines relative standing. * @param k Is the percentile value that is between 0 through 1, inclusive. */ percentile_Exc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the k-th percentile of values in a range, where k is in the range 0..1, inclusive. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or range of data that defines relative standing. * @param k Is the percentile value that is between 0 through 1, inclusive. */ percentile_Inc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of permutations for a given number of objects that can be selected from the total objects. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the total number of objects. * @param numberChosen Is the number of objects in each permutation. */ permut(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the total number of objects. * @param numberChosen Is the number of objects in each permutation. */ permutationa(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the value of the density function for a standard normal distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the number for which you want the density of the standard normal distribution. */ phi(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the value of Pi, 3.14159265358979, accurate to 15 digits. * * @remarks * [Api set: ExcelApi 1.2] */ pi(): FunctionResult; /** * Calculates the payment for a loan based on constant payments and a constant interest rate. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate per period for the loan. For example, use 6%/4 for quarterly payments at 6% APR. * @param nper Is the total number of payments for the loan. * @param pv Is the present value: the total amount that a series of future payments is worth now. * @param fv Is the future value, or a cash balance you want to attain after the last payment is made, 0 (zero) if omitted. * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. */ pmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Poisson distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the number of events. * @param mean Is the expected numeric value, a positive number. * @param cumulative Is a logical value: for the cumulative Poisson probability, use TRUE; for the Poisson probability mass function, use FALSE. */ poisson_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the result of a number raised to a power. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the base number, any real number. * @param power Is the exponent, to which the base number is raised. */ power(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, power: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the payment on the principal for a given investment based on periodic, constant payments and a constant interest rate. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. * @param per Specifies the period and must be in the range 1 to nper. * @param nper Is the total number of payment periods in an investment. * @param pv Is the present value: the total amount that a series of future payments is worth now. * @param fv Is the future value, or cash balance you want to attain after the last payment is made. * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. */ ppmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the price per $100 face value of a security that pays periodic interest. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param rate Is the security's annual coupon rate. * @param yld Is the security's annual yield. * @param redemption Is the security's redemption value per $100 face value. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ price(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the price per $100 face value of a discounted security. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param discount Is the security's discount rate. * @param redemption Is the security's redemption value per $100 face value. * @param basis Is the type of day count basis to use. */ priceDisc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the price per $100 face value of a security that pays interest at maturity. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param issue Is the security's issue date, expressed as a serial date number. * @param rate Is the security's interest rate at date of issue. * @param yld Is the security's annual yield. * @param basis Is the type of day count basis to use. */ priceMat(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Multiplies all the numbers given as arguments. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers, logical values, or text representations of numbers that you want to multiply. */ product(...values: Array>): FunctionResult; /** * Converts a text string to proper case; the first letter in each word to uppercase, and all other letters to lowercase. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is text enclosed in quotation marks, a formula that returns text, or a reference to a cell containing text to partially capitalize. */ proper(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the present value of an investment: the total amount that a series of future payments is worth now. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. * @param nper Is the total number of payment periods in an investment. * @param pmt Is the payment made each period and cannot change over the life of the investment. * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. */ pv(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the quartile of a data set, based on percentile values from 0..1, exclusive. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or cell range of numeric values for which you want the quartile value. * @param quart Is a number: minimum value = 0; 1st quartile = 1; median value = 2; 3rd quartile = 3; maximum value = 4. */ quartile_Exc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, quart: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the quartile of a data set, based on percentile values from 0..1, inclusive. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or cell range of numeric values for which you want the quartile value. * @param quart Is a number: minimum value = 0; 1st quartile = 1; median value = 2; 3rd quartile = 3; maximum value = 4. */ quartile_Inc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, quart: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the integer portion of a division. * * @remarks * [Api set: ExcelApi 1.2] * * @param numerator Is the dividend. * @param denominator Is the divisor. */ quotient(numerator: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, denominator: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts degrees to radians. * * @remarks * [Api set: ExcelApi 1.2] * * @param angle Is an angle in degrees that you want to convert. */ radians(angle: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation). * * @remarks * [Api set: ExcelApi 1.2] */ rand(): FunctionResult; /** * Returns a random number between the numbers you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param bottom Is the smallest integer RANDBETWEEN will return. * @param top Is the largest integer RANDBETWEEN will return. */ randBetween(bottom: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, top: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the rank of a number in a list of numbers: its size relative to other values in the list; if more than one value has the same rank, the average rank is returned. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number for which you want to find the rank. * @param ref Is an array of, or a reference to, a list of numbers. Nonnumeric values are ignored. * @param order Is a number: rank in the list sorted descending = 0 or omitted; rank in the list sorted ascending = any nonzero value. */ rank_Avg(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ref: Excel.Range | Excel.RangeReference | Excel.FunctionResult, order?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the rank of a number in a list of numbers: its size relative to other values in the list; if more than one value has the same rank, the top rank of that set of values is returned. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number for which you want to find the rank. * @param ref Is an array of, or a reference to, a list of numbers. Nonnumeric values are ignored. * @param order Is a number: rank in the list sorted descending = 0 or omitted; rank in the list sorted ascending = any nonzero value. */ rank_Eq(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ref: Excel.Range | Excel.RangeReference | Excel.FunctionResult, order?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the interest rate per period of a loan or an investment. For example, use 6%/4 for quarterly payments at 6% APR. * * @remarks * [Api set: ExcelApi 1.2] * * @param nper Is the total number of payment periods for the loan or investment. * @param pmt Is the payment made each period and cannot change over the life of the loan or investment. * @param pv Is the present value: the total amount that a series of future payments is worth now. * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, uses Fv = 0. * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. * @param guess Is your guess for what the rate will be; if omitted, Guess = 0.1 (10 percent). */ rate(nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, guess?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the amount received at maturity for a fully invested security. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param investment Is the amount invested in the security. * @param discount Is the security's discount rate. * @param basis Is the type of day count basis to use. */ received(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, investment: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Replaces part of a text string with a different text string. * * @remarks * [Api set: ExcelApi 1.2] * * @param oldText Is text in which you want to replace some characters. * @param startNum Is the position of the character in oldText that you want to replace with newText. * @param numChars Is the number of characters in oldText that you want to replace. * @param newText Is the text that will replace characters in oldText. */ replace(oldText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, newText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Replaces part of a text string with a different text string. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param oldText Is text in which you want to replace some characters. * @param startNum Is the position of the character in oldText that you want to replace with newText. * @param numBytes Is the number of characters in oldText that you want to replace with newText. * @param newText Is the text that will replace characters in oldText. */ replaceB(oldText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, newText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text you want to repeat. * @param numberTimes Is a positive number specifying the number of times to repeat text. */ rept(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberTimes: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the specified number of characters from the end of a text string. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text string that contains the characters you want to extract. * @param numChars Specifies how many characters you want to extract, 1 if omitted. */ right(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the specified number of characters from the end of a text string. Use with double-byte character sets (DBCS). * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text string containing the characters you want to extract. * @param numBytes Specifies how many characters you want to extract. */ rightb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts an Arabic numeral to Roman, as text. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the Arabic numeral you want to convert. * @param form Is the number specifying the type of Roman numeral you want. */ roman(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, form?: boolean | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number to a specified number of digits. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number you want to round. * @param numDigits Is the number of digits to which you want to round. Negative rounds to the left of the decimal point; zero to the nearest integer. */ round(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number down, toward zero. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number that you want rounded down. * @param numDigits Is the number of digits to which you want to round. Negative rounds to the left of the decimal point; zero or omitted, to the nearest integer. */ roundDown(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Rounds a number up, away from zero. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number that you want rounded up. * @param numDigits Is the number of digits to which you want to round. Negative rounds to the left of the decimal point; zero or omitted, to the nearest integer. */ roundUp(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of rows in a reference or array. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is an array, an array formula, or a reference to a range of cells for which you want the number of rows. */ rows(array: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns an equivalent interest rate for the growth of an investment. * * @remarks * [Api set: ExcelApi 1.2] * * @param nper Is the number of periods for the investment. * @param pv Is the present value of the investment. * @param fv Is the future value of the investment. */ rri(nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the secant of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the secant. */ sec(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic secant of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the hyperbolic secant. */ sech(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the second, a number from 0 to 59. * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is a number in the date-time code used by Microsoft Excel or text in time format, such as 16:48:23 or 4:48:47 PM. */ second(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the sum of a power series based on the formula. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the input value to the power series. * @param n Is the initial power to which you want to raise x. * @param m Is the step by which to increase n for each term in the series. * @param coefficients Is a set of coefficients by which each successive power of x is multiplied. */ seriesSum(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, m: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, coefficients: Excel.Range | string | number | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the sheet number of the referenced sheet. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the name of a sheet or a reference that you want the sheet number of. If omitted the number of the sheet containing the function is returned. */ sheet(value?: Excel.Range | string | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number of sheets in a reference. * * @remarks * [Api set: ExcelApi 1.2] * * @param reference Is a reference for which you want to know the number of sheets it contains. If omitted the number of sheets in the workbook containing the function is returned. */ sheets(reference?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number. */ sign(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the sine of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the sine. Degrees * PI()/180 = radians. */ sin(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic sine of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number. */ sinh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the skewness of a distribution: a characterization of the degree of asymmetry of a distribution around its mean. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the skewness. */ skew(...values: Array>): FunctionResult; /** * Returns the skewness of a distribution based on a population: a characterization of the degree of asymmetry of a distribution around its mean. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 254 numbers or names, arrays, or references that contain numbers for which you want the population skewness. */ skew_p(...values: Array>): FunctionResult; /** * Returns the straight-line depreciation of an asset for one period. * * @remarks * [Api set: ExcelApi 1.2] * * @param cost Is the initial cost of the asset. * @param salvage Is the salvage value at the end of the life of the asset. * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). */ sln(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the k-th smallest value in a data set. For example, the fifth smallest number. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is an array or range of numerical data for which you want to determine the k-th smallest value. * @param k Is the position (from the smallest) in the array or range of the value to return. */ small(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the square root of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number for which you want the square root. */ sqrt(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the square root of (number * Pi). * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number by which p is multiplied. */ sqrtPi(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Estimates standard deviation based on a sample, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 values corresponding to a sample of a population and can be values or names or references to values. */ stDevA(...values: Array>): FunctionResult; /** * Calculates standard deviation based on an entire population, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 values corresponding to a population and can be values, names, arrays, or references that contain values. */ stDevPA(...values: Array>): FunctionResult; /** * Calculates standard deviation based on the entire population given as arguments (ignores logical values and text). * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers corresponding to a population and can be numbers or references that contain numbers. */ stDev_P(...values: Array>): FunctionResult; /** * Estimates standard deviation based on a sample (ignores logical values and text in the sample). * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers corresponding to a sample of a population and can be numbers or references that contain numbers. */ stDev_S(...values: Array>): FunctionResult; /** * Returns a normalized value from a distribution characterized by a mean and standard deviation. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value you want to normalize. * @param mean Is the arithmetic mean of the distribution. * @param standardDev Is the standard deviation of the distribution, a positive number. */ standardize(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Replaces existing text with new text in a text string. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text or the reference to a cell containing text in which you want to substitute characters. * @param oldText Is the existing text you want to replace. If the case of oldText does not match the case of text, SUBSTITUTE will not replace the text. * @param newText Is the text you want to replace oldText with. * @param instanceNum Specifies which occurrence of oldText you want to replace. If omitted, every instance of oldText is replaced. */ substitute(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, oldText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, newText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, instanceNum?: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a subtotal in a list or database. * * @remarks * [Api set: ExcelApi 1.2] * * @param functionNum Is the number 1 to 11 that specifies the summary function for the subtotal. * @param values List of parameters, whose elements are 1 to 254 ranges or references for which you want the subtotal. */ subtotal(functionNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array>): FunctionResult; /** * Adds all the numbers in a range of cells. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers to sum. Logical values and text are ignored in cells, included if typed as arguments. */ sum(...values: Array>): FunctionResult; /** * Adds the cells specified by a given condition or criteria. * * @remarks * [Api set: ExcelApi 1.2] * * @param range Is the range of cells you want evaluated. * @param criteria Is the condition or criteria in the form of a number, expression, or text that defines which cells will be added. * @param sumRange Are the actual cells to sum. If omitted, the cells in range are used. */ sumIf(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, sumRange?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Adds the cells specified by a given set of conditions or criteria. * * @remarks * [Api set: ExcelApi 1.2] * * @param sumRange Are the actual cells to sum. * @param values List of parameters, where the first element of each pair is the Is the range of cells you want evaluated for the particular condition , and the second element is is the condition or criteria in the form of a number, expression, or text that defines which cells will be added. */ sumIfs(sumRange: Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array | number | string | boolean>): FunctionResult; /** * Returns the sum of the squares of the arguments. The arguments can be numbers, arrays, names, or references to cells that contain numbers. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numbers, arrays, names, or references to arrays for which you want the sum of the squares. */ sumSq(...values: Array>): FunctionResult; /** * Returns the sum-of-years' digits depreciation of an asset for a specified period. * * @remarks * [Api set: ExcelApi 1.2] * * @param cost Is the initial cost of the asset. * @param salvage Is the salvage value at the end of the life of the asset. * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). * @param per Is the period and must use the same units as Life. */ syd(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Checks whether a value is text, and returns the text if it is, or returns double quotes (empty text) if it is not. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is the value to test. */ t(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the bond-equivalent yield for a treasury bill. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the Treasury bill's settlement date, expressed as a serial date number. * @param maturity Is the Treasury bill's maturity date, expressed as a serial date number. * @param discount Is the Treasury bill's discount rate. */ tbillEq(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the price per $100 face value for a treasury bill. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the Treasury bill's settlement date, expressed as a serial date number. * @param maturity Is the Treasury bill's maturity date, expressed as a serial date number. * @param discount Is the Treasury bill's discount rate. */ tbillPrice(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the yield for a treasury bill. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the Treasury bill's settlement date, expressed as a serial date number. * @param maturity Is the Treasury bill's maturity date, expressed as a serial date number. * @param pr Is the Treasury Bill's price per $100 face value. */ tbillYield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the left-tailed Student's t-distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the numeric value at which to evaluate the distribution. * @param degFreedom Is an integer indicating the number of degrees of freedom that characterize the distribution. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. */ t_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the two-tailed Student's t-distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the numeric value at which to evaluate the distribution. * @param degFreedom Is an integer indicating the number of degrees of freedom that characterize the distribution. */ t_Dist_2T(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the right-tailed Student's t-distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the numeric value at which to evaluate the distribution. * @param degFreedom Is an integer indicating the number of degrees of freedom that characterize the distribution. */ t_Dist_RT(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the left-tailed inverse of the Student's t-distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is the probability associated with the two-tailed Student's t-distribution, a number between 0 and 1 inclusive. * @param degFreedom Is a positive integer indicating the number of degrees of freedom to characterize the distribution. */ t_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the two-tailed inverse of the Student's t-distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param probability Is the probability associated with the two-tailed Student's t-distribution, a number between 0 and 1 inclusive. * @param degFreedom Is a positive integer indicating the number of degrees of freedom to characterize the distribution. */ t_Inv_2T(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the tangent of an angle. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the angle in radians for which you want the tangent. Degrees * PI()/180 = radians. */ tan(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the hyperbolic tangent of a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is any real number. */ tanh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a value to text in a specific number format. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Is a number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value. * @param formatText Is a number format in text form from the Category box on the Number tab in the Format Cells dialog box (not General). */ text(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, formatText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts hours, minutes, and seconds given as numbers to an Excel serial number, formatted with a time format. * * @remarks * [Api set: ExcelApi 1.2] * * @param hour Is a number from 0 to 23 representing the hour. * @param minute Is a number from 0 to 59 representing the minute. * @param second Is a number from 0 to 59 representing the second. */ time(hour: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, minute: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, second: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a text time to an Excel serial number for a time, a number from 0 (12:00:00 AM) to 0.999988426 (11:59:59 PM). Format the number with a time format after entering the formula. * * @remarks * [Api set: ExcelApi 1.2] * * @param timeText Is a text string that gives a time in any one of the Microsoft Excel time formats (date information in the string is ignored). */ timevalue(timeText: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the current date formatted as a date. * * @remarks * [Api set: ExcelApi 1.2] */ today(): FunctionResult; /** * Removes all spaces from a text string except for single spaces between words. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text from which you want spaces removed. */ trim(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the mean of the interior portion of a set of data values. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the range or array of values to trim and average. * @param percent Is the fractional number of data points to exclude from the top and bottom of the data set. */ trimMean(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, percent: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the logical value TRUE. * * @remarks * [Api set: ExcelApi 1.2] */ true(): FunctionResult; /** * Truncates a number to an integer by removing the decimal, or fractional, part of the number. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the number you want to truncate. * @param numDigits Is a number specifying the precision of the truncation, 0 (zero) if omitted. */ trunc(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns an integer representing the data type of a value: number = 1; text = 2; logical value = 4; error value = 16; array = 64. * * @remarks * [Api set: ExcelApi 1.2] * * @param value Can be any value. */ type(value: boolean | string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a number to text, using currency format. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is a number, a reference to a cell containing a number, or a formula that evaluates to a number. * @param decimals Is the number of digits to the right of the decimal point. */ usdollar(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimals?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Unicode character referenced by the given numeric value. * * @remarks * [Api set: ExcelApi 1.2] * * @param number Is the Unicode number representing a character. */ unichar(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the number (code point) corresponding to the first character of the text. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the character that you want the Unicode value of. */ unicode(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a text string to all uppercase letters. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text you want converted to uppercase, a reference or a text string. */ upper(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order. * * @remarks * [Api set: ExcelApi 1.2] * * @param lookupValue Is the value to be found in the first column of the table, and can be a value, a reference, or a text string. * @param tableArray Is a table of text, numbers, or logical values, in which data is retrieved. tableArray can be a reference to a range or a range name. * @param colIndexNum Is the column number in tableArray from which the matching value should be returned. The first column of values in the table is column 1. * @param rangeLookup Is a logical value: to find the closest match in the first column (sorted in ascending order) = TRUE or omitted; find an exact match = FALSE. */ vlookup(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, tableArray: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, colIndexNum: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, rangeLookup?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Converts a text string that represents a number to a number. * * @remarks * [Api set: ExcelApi 1.2] * * @param text Is the text enclosed in quotation marks or a reference to a cell containing the text you want to convert. */ value(text: string | boolean | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Estimates variance based on a sample, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 value arguments corresponding to a sample of a population. */ varA(...values: Array>): FunctionResult; /** * Calculates variance based on the entire population, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 value arguments corresponding to a population. */ varPA(...values: Array>): FunctionResult; /** * Calculates variance based on the entire population (ignores logical values and text in the population). * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numeric arguments corresponding to a population. */ var_P(...values: Array>): FunctionResult; /** * Estimates variance based on a sample (ignores logical values and text in the sample). * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 255 numeric arguments corresponding to a sample of a population. */ var_S(...values: Array>): FunctionResult; /** * Returns the depreciation of an asset for any period you specify, including partial periods, using the double-declining balance method or some other method you specify. * * @remarks * [Api set: ExcelApi 1.2] * * @param cost Is the initial cost of the asset. * @param salvage Is the salvage value at the end of the life of the asset. * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). * @param startPeriod Is the starting period for which you want to calculate the depreciation, in the same units as Life. * @param endPeriod Is the ending period for which you want to calculate the depreciation, in the same units as Life. * @param factor Is the rate at which the balance declines, 2 (double-declining balance) if omitted. * @param noSwitch Switch to straight-line depreciation when depreciation is greater than the declining balance = FALSE or omitted; do not switch = TRUE. */ vdb(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startPeriod: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endPeriod: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, factor?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, noSwitch?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the week number in the year. * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is the date-time code used by Microsoft Excel for date and time calculation. * @param returnType Is a number (1 or 2) that determines the type of the return value. */ weekNum(serialNumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, returnType?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a number from 1 to 7 identifying the day of the week of a date. * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is a number that represents a date. * @param returnType Is a number: for Sunday=1 through Saturday=7, use 1; for Monday=1 through Sunday=7, use 2; for Monday=0 through Sunday=6, use 3. */ weekday(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, returnType?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the Weibull distribution. * * @remarks * [Api set: ExcelApi 1.2] * * @param x Is the value at which to evaluate the function, a nonnegative number. * @param alpha Is a parameter to the distribution, a positive number. * @param beta Is a parameter to the distribution, a positive number. * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. */ weibull_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the serial number of the date before or after a specified number of workdays. * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate Is a serial date number that represents the start date. * @param days Is the number of nonweekend and non-holiday days before or after startDate. * @param holidays Is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays. */ workDay(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, days: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters. * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate Is a serial date number that represents the start date. * @param days Is the number of nonweekend and non-holiday days before or after startDate. * @param weekend Is a number or string specifying when weekends occur. * @param holidays Is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays. */ workDay_Intl(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, days: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, weekend?: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the internal rate of return for a schedule of cash flows. * * @remarks * [Api set: ExcelApi 1.2] * * @param values Is a series of cash flows that correspond to a schedule of payments in dates. * @param dates Is a schedule of payment dates that corresponds to the cash flow payments. * @param guess Is a number that you guess is close to the result of XIRR. */ xirr(values: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult, dates: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult, guess?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the net present value for a schedule of cash flows. * * @remarks * [Api set: ExcelApi 1.2] * * @param rate Is the discount rate to apply to the cash flows. * @param values Is a series of cash flows that correspond to a schedule of payments in dates. * @param dates Is a schedule of payment dates that corresponds to the cash flow payments. */ xnpv(rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, values: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult, dates: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns a logical 'Exclusive Or' of all arguments. * * @remarks * [Api set: ExcelApi 1.2] * * @param values List of parameters, whose elements are 1 to 254 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references. */ xor(...values: Array>): FunctionResult; /** * Returns the year of a date, an integer in the range 1900 - 9999. * * @remarks * [Api set: ExcelApi 1.2] * * @param serialNumber Is a number in the date-time code used by Microsoft Excel. */ year(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the year fraction representing the number of whole days between start_date and end_date. * * @remarks * [Api set: ExcelApi 1.2] * * @param startDate Is a serial date number that represents the start date. * @param endDate Is a serial date number that represents the end date. * @param basis Is the type of day count basis to use. */ yearFrac(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the yield on a security that pays periodic interest. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param rate Is the security's annual coupon rate. * @param pr Is the security's price per $100 face value. * @param redemption Is the security's redemption value per $100 face value. * @param frequency Is the number of coupon payments per year. * @param basis Is the type of day count basis to use. */ yield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the annual yield for a discounted security. For example, a treasury bill. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param pr Is the security's price per $100 face value. * @param redemption Is the security's redemption value per $100 face value. * @param basis Is the type of day count basis to use. */ yieldDisc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the annual yield of a security that pays interest at maturity. * * @remarks * [Api set: ExcelApi 1.2] * * @param settlement Is the security's settlement date, expressed as a serial date number. * @param maturity Is the security's maturity date, expressed as a serial date number. * @param issue Is the security's issue date, expressed as a serial date number. * @param rate Is the security's interest rate at date of issue. * @param pr Is the security's price per $100 face value. * @param basis Is the type of day count basis to use. */ yieldMat(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * Returns the one-tailed P-value of a z-test. * * @remarks * [Api set: ExcelApi 1.2] * * @param array Is the array or range of data against which to test X. * @param x Is the value to test. * @param sigma Is the population (known) standard deviation. If omitted, the sample standard deviation is used. */ z_Test(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, sigma?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; /** * 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.Functions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FunctionsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): { [key: string]: string; }; } enum ErrorCodes { accessDenied = "AccessDenied", apiNotFound = "ApiNotFound", conflict = "Conflict", emptyChartSeries = "EmptyChartSeries", filteredRangeConflict = "FilteredRangeConflict", formulaLengthExceedsLimit = "FormulaLengthExceedsLimit", generalException = "GeneralException", inactiveWorkbook = "InactiveWorkbook", insertDeleteConflict = "InsertDeleteConflict", invalidArgument = "InvalidArgument", invalidBinding = "InvalidBinding", invalidOperation = "InvalidOperation", invalidReference = "InvalidReference", invalidSelection = "InvalidSelection", itemAlreadyExists = "ItemAlreadyExists", itemNotFound = "ItemNotFound", mergedRangeConflict = "MergedRangeConflict", nonBlankCellOffSheet = "NonBlankCellOffSheet", notImplemented = "NotImplemented", openWorkbookLinksBlocked = "OpenWorkbookLinksBlocked", operationCellsExceedLimit = "OperationCellsExceedLimit", pivotTableRangeConflict = "PivotTableRangeConflict", powerQueryRefreshResourceChallenge = "PowerQueryRefreshResourceChallenge", rangeExceedsLimit = "RangeExceedsLimit", refreshWorkbookLinksBlocked = "RefreshWorkbookLinksBlocked", requestAborted = "RequestAborted", responsePayloadSizeLimitExceeded = "ResponsePayloadSizeLimitExceeded", unsupportedFeature = "UnsupportedFeature", unsupportedFillType = "UnsupportedFillType", unsupportedOperation = "UnsupportedOperation", unsupportedSheet = "UnsupportedSheet", invalidOperationInCellEditMode = "InvalidOperationInCellEditMode" } namespace Interfaces { /** * Provides ways to load properties of only a subset of members of a collection. */ interface CollectionLoadOptions { /** * Specify the number of items in the queried collection to be included in the result. */ $top?: number; /** * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. */ $skip?: number; } /** An interface for updating data on the AllowEditRange object, for use in `allowEditRange.set({ ... })`. */ interface AllowEditRangeUpdateData { /** * Specifies the range associated with the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. * * @remarks * [Api set: ExcelApiOnline 1.1] */ address?: string; /** * Specifies the title of the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. * * @remarks * [Api set: ExcelApiOnline 1.1] */ title?: string; } /** An interface for updating data on the AllowEditRangeCollection object, for use in `allowEditRangeCollection.set({ ... })`. */ interface AllowEditRangeCollectionUpdateData { items?: Excel.Interfaces.AllowEditRangeData[]; } /** An interface for updating data on the QueryCollection object, for use in `queryCollection.set({ ... })`. */ interface QueryCollectionUpdateData { items?: Excel.Interfaces.QueryData[]; } /** An interface for updating data on the LinkedWorkbookCollection object, for use in `linkedWorkbookCollection.set({ ... })`. */ interface LinkedWorkbookCollectionUpdateData { /** * Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. * * @remarks * [Api set: ExcelApiOnline 1.1] */ workbookLinksRefreshMode?: Excel.WorkbookLinksRefreshMode | "Manual" | "Automatic"; items?: Excel.Interfaces.LinkedWorkbookData[]; } /** An interface for updating data on the Runtime object, for use in `runtime.set({ ... })`. */ interface RuntimeUpdateData { /** * Toggle JavaScript events in the current task pane or content add-in. * * @remarks * [Api set: ExcelApi 1.8] */ enableEvents?: boolean; } /** An interface for updating data on the Application object, for use in `application.set({ ... })`. */ interface ApplicationUpdateData { /** * Returns the iterative calculation settings. In Excel on Windows and Mac, the settings will apply to the Excel Application. In Excel on the web and other platforms, the settings will apply to the active workbook. * * @remarks * [Api set: ExcelApi 1.9] */ iterativeCalculation?: Excel.Interfaces.IterativeCalculationUpdateData; /** * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. * * @remarks * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; } /** An interface for updating data on the IterativeCalculation object, for use in `iterativeCalculation.set({ ... })`. */ interface IterativeCalculationUpdateData { /** * True if Excel will use iteration to resolve circular references. * * @remarks * [Api set: ExcelApi 1.9] */ enabled?: boolean; /** * Specifies the maximum amount of change between each iteration as Excel resolves circular references. * * @remarks * [Api set: ExcelApi 1.9] */ maxChange?: number; /** * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. * * @remarks * [Api set: ExcelApi 1.9] */ maxIteration?: number; } /** An interface for updating data on the Workbook object, for use in `workbook.set({ ... })`. */ interface WorkbookUpdateData { /** * Gets the workbook properties. * * @remarks * [Api set: ExcelApi 1.7] */ properties?: Excel.Interfaces.DocumentPropertiesUpdateData; /** * True if all charts in the workbook are tracking the actual data points to which they are attached. False if the charts track the index of the data points. * * @remarks * [Api set: ExcelApi 1.9] */ chartDataPointTrack?: boolean; /** * Specifies if changes have been made since the workbook was last saved. You can set this property to `true` if you want to close a modified workbook without either saving it or being prompted to save it. * * @remarks * [Api set: ExcelApi 1.9] */ isDirty?: boolean; /** * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. Data will permanently lose accuracy when switching this property from `false` to `true`. * * @remarks * [Api set: ExcelApi 1.9] */ usePrecisionAsDisplayed?: boolean; } /** An interface for updating data on the Worksheet object, for use in `worksheet.set({ ... })`. */ interface WorksheetUpdateData { /** * Gets the `PageLayout` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ pageLayout?: Excel.Interfaces.PageLayoutUpdateData; /** * Determines if Excel should recalculate the worksheet when necessary. True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. * * @remarks * [Api set: ExcelApi 1.9] */ enableCalculation?: boolean; /** * The display name of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * The zero-based position of the worksheet within the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ position?: number; /** * Specifies if gridlines are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showGridlines?: boolean; /** * Specifies if headings are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showHeadings?: boolean; /** * Specifies the standard (default) width of all the columns in the worksheet. One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. * * @remarks * [Api set: ExcelApi 1.7] */ standardWidth?: number; /** * The tab color of the worksheet. When retrieving the tab color, if the worksheet is invisible, the value will be `null`. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form #RRGGBB (e.g., "FFA500"). When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. * * @remarks * [Api set: ExcelApi 1.7] */ tabColor?: string; /** * The visibility of the worksheet. * * @remarks * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] */ visibility?: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; } /** An interface for updating data on the WorksheetCollection object, for use in `worksheetCollection.set({ ... })`. */ interface WorksheetCollectionUpdateData { items?: Excel.Interfaces.WorksheetData[]; } /** An interface for updating data on the Range object, for use in `range.set({ ... })`. */ interface RangeUpdateData { /** * Returns a data validation object. * * @remarks * [Api set: ExcelApi 1.8] */ dataValidation?: Excel.Interfaces.DataValidationUpdateData; /** * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.RangeFormatUpdateData; /** * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ columnHidden?: boolean; /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulas?: any[][]; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulasLocal?: any[][]; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.2] */ formulasR1C1?: any[][]; /** * Represents the hyperlink for the current range. * * @remarks * [Api set: ExcelApi 1.7] */ hyperlink?: Excel.RangeHyperlink; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. * * @remarks * [Api set: ExcelApi 1.1] */ numberFormat?: any[][]; /** * Represents Excel's number format code for the given range, based on the language settings of the user. Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. Any returned text uses the locally-formatted strings based on the language specified in the system settings. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: any[][]; /** * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ rowHidden?: boolean; /** * Represents the style of the current range. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ style?: string; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: any[][]; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface for updating data on the RangeAreas object, for use in `rangeAreas.set({ ... })`. */ interface RangeAreasUpdateData { /** * Returns a data validation object for all ranges in the `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ dataValidation?: Excel.Interfaces.DataValidationUpdateData; /** * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.Interfaces.RangeFormatUpdateData; /** * Represents the style for all ranges in this `RangeAreas` object. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.9] */ style?: string; } /** An interface for updating data on the RangeView object, for use in `rangeView.set({ ... })`. */ interface RangeViewUpdateData { /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulas?: any[][]; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasLocal?: any[][]; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasR1C1?: any[][]; /** * Represents Excel's number format code for the given cell. * * @remarks * [Api set: ExcelApi 1.3] */ numberFormat?: any[][]; /** * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. * * @remarks * [Api set: ExcelApi 1.3] */ values?: any[][]; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface for updating data on the RangeViewCollection object, for use in `rangeViewCollection.set({ ... })`. */ interface RangeViewCollectionUpdateData { items?: Excel.Interfaces.RangeViewData[]; } /** An interface for updating data on the SettingCollection object, for use in `settingCollection.set({ ... })`. */ interface SettingCollectionUpdateData { items?: Excel.Interfaces.SettingData[]; } /** An interface for updating data on the Setting object, for use in `setting.set({ ... })`. */ interface SettingUpdateData { /** * Represents the value stored for this setting. * * @remarks * [Api set: ExcelApi 1.4] */ value?: any; } /** An interface for updating data on the NamedItemCollection object, for use in `namedItemCollection.set({ ... })`. */ interface NamedItemCollectionUpdateData { items?: Excel.Interfaces.NamedItemData[]; } /** An interface for updating data on the NamedItem object, for use in `namedItem.set({ ... })`. */ interface NamedItemUpdateData { /** * Specifies the comment associated with this name. * * @remarks * [Api set: ExcelApi 1.4] */ comment?: string; /** * The formula of the named item. Formulas always start with an equal sign ("="). * * @remarks * [Api set: ExcelApi 1.7] */ formula?: any; /** * Specifies if the object is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** An interface for updating data on the BindingCollection object, for use in `bindingCollection.set({ ... })`. */ interface BindingCollectionUpdateData { items?: Excel.Interfaces.BindingData[]; } /** An interface for updating data on the TableCollection object, for use in `tableCollection.set({ ... })`. */ interface TableCollectionUpdateData { items?: Excel.Interfaces.TableData[]; } /** An interface for updating data on the TableScopedCollection object, for use in `tableScopedCollection.set({ ... })`. */ interface TableScopedCollectionUpdateData { items?: Excel.Interfaces.TableData[]; } /** An interface for updating data on the Table object, for use in `table.set({ ... })`. */ interface TableUpdateData { /** * Specifies if the first column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightFirstColumn?: boolean; /** * Specifies if the last column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightLastColumn?: boolean; /** * Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedColumns?: boolean; /** * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedRows?: boolean; /** * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. * * @remarks * [Api set: ExcelApi 1.3] */ showFilterButton?: boolean; /** * Specifies if the header row is visible. This value can be set to show or remove the header row. * * @remarks * [Api set: ExcelApi 1.1] */ showHeaders?: boolean; /** * Specifies if the total row is visible. This value can be set to show or remove the total row. * * @remarks * [Api set: ExcelApi 1.1] */ showTotals?: boolean; /** * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.1] */ style?: string; } /** An interface for updating data on the TableColumnCollection object, for use in `tableColumnCollection.set({ ... })`. */ interface TableColumnCollectionUpdateData { items?: Excel.Interfaces.TableColumnData[]; } /** An interface for updating data on the TableColumn object, for use in `tableColumn.set({ ... })`. */ interface TableColumnUpdateData { /** * Specifies the name of the table column. * * @remarks * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] */ name?: string; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: any[][]; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface for updating data on the TableRowCollection object, for use in `tableRowCollection.set({ ... })`. */ interface TableRowCollectionUpdateData { items?: Excel.Interfaces.TableRowData[]; } /** An interface for updating data on the TableRow object, for use in `tableRow.set({ ... })`. */ interface TableRowUpdateData { /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: any[][]; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface for updating data on the DataValidation object, for use in `dataValidation.set({ ... })`. */ interface DataValidationUpdateData { /** * Error alert when user enters invalid data. * * @remarks * [Api set: ExcelApi 1.8] */ errorAlert?: Excel.DataValidationErrorAlert; /** * Specifies if data validation will be performed on blank cells. Default is `true`. * * @remarks * [Api set: ExcelApi 1.8] */ ignoreBlanks?: boolean; /** * Prompt when users select a cell. * * @remarks * [Api set: ExcelApi 1.8] */ prompt?: Excel.DataValidationPrompt; /** * Data validation rule that contains different type of data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ rule?: Excel.DataValidationRule; } /** An interface for updating data on the RangeFormat object, for use in `rangeFormat.set({ ... })`. */ interface RangeFormatUpdateData { /** * Collection of border objects that apply to the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; /** * Returns the fill object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ fill?: Excel.Interfaces.RangeFillUpdateData; /** * Returns the font object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.RangeFontUpdateData; /** * Returns the format protection object for a range. * * @remarks * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.FormatProtectionUpdateData; /** * Specifies if text is automatically indented when text alignment is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.9] */ autoIndent?: boolean; /** * Specifies the width of all columns within the range. If the column widths are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ columnWidth?: number; /** * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * An integer from 0 to 250 that indicates the indent level. * * @remarks * [Api set: ExcelApi 1.9] */ indentLevel?: number; /** * The reading order for the range. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ rowHeight?: number; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.9] */ shrinkToFit?: boolean; /** * The text orientation of all the cells within the range. The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. If the orientation within a range are not uniform, then `null` will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation?: number; /** * Determines if the row height of the `Range` object equals the standard height of the sheet. Returns `true` if the row height of the `Range` object equals the standard height of the sheet. Returns `null` if the range contains more than one row and the rows aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardHeight?: boolean; /** * Specifies if the column width of the `Range` object equals the standard width of the sheet. Returns `true` if the column width of the `Range` object equals the standard width of the sheet. Returns `null` if the range contains more than one column and the columns aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardWidth?: boolean; /** * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting * * @remarks * [Api set: ExcelApi 1.1] */ wrapText?: boolean; } /** An interface for updating data on the FormatProtection object, for use in `formatProtection.set({ ... })`. */ interface FormatProtectionUpdateData { /** * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. * * @remarks * [Api set: ExcelApi 1.2] */ formulaHidden?: boolean; /** * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. * * @remarks * [Api set: ExcelApi 1.2] */ locked?: boolean; } /** An interface for updating data on the RangeFill object, for use in `rangeFill.set({ ... })`. */ interface RangeFillUpdateData { /** * HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * The pattern of a range. See `Excel.FillPattern` for details. LinearGradient and RectangularGradient are not supported. A `null` value indicates that the entire range doesn't have a uniform pattern setting. * * @remarks * [Api set: ExcelApi 1.9] */ pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; /** * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ patternColor?: string; /** * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ patternTintAndShade?: number; /** * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; } /** An interface for updating data on the RangeBorder object, for use in `rangeBorder.set({ ... })`. */ interface RangeBorderUpdateData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; /** * Specifies a double that lightens or darkens a color for the range border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the border doesn't have a uniform `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; /** * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. * * @remarks * [Api set: ExcelApi 1.1] */ weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; } /** An interface for updating data on the RangeBorderCollection object, for use in `rangeBorderCollection.set({ ... })`. */ interface RangeBorderCollectionUpdateData { /** * Specifies a double that lightens or darkens a color for range borders. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the entire border collection doesn't have a uniform `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; items?: Excel.Interfaces.RangeBorderData[]; } /** An interface for updating data on the RangeFont object, for use in `rangeFont.set({ ... })`. */ interface RangeFontUpdateData { /** * Represents the bold status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * Specifies the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic?: boolean; /** * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Font size. * * @remarks * [Api set: ExcelApi 1.1] */ size?: number; /** * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. * * @remarks * [Api set: ExcelApi 1.9] */ strikethrough?: boolean; /** * Specifies the subscript status of font. Returns `true` if all the fonts of the range are subscript. Returns `false` if all the fonts of the range are superscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ subscript?: boolean; /** * Specifies the superscript status of font. Returns `true` if all the fonts of the range are superscript. Returns `false` if all the fonts of the range are subscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ superscript?: boolean; /** * Specifies a double that lightens or darkens a color for the range font. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the entire range doesn't have a uniform font `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; /** * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; } /** An interface for updating data on the ChartCollection object, for use in `chartCollection.set({ ... })`. */ interface ChartCollectionUpdateData { items?: Excel.Interfaces.ChartData[]; } /** An interface for updating data on the Chart object, for use in `chart.set({ ... })`. */ interface ChartUpdateData { /** * Represents chart axes. * * @remarks * [Api set: ExcelApi 1.1] */ axes?: Excel.Interfaces.ChartAxesUpdateData; /** * Represents the data labels on the chart. * * @remarks * [Api set: ExcelApi 1.1] */ dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; /** * Encapsulates the format properties for the chart area. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAreaFormatUpdateData; /** * Represents the legend for the chart. * * @remarks * [Api set: ExcelApi 1.1] */ legend?: Excel.Interfaces.ChartLegendUpdateData; /** * Encapsulates the options for a pivot chart. * * @remarks * [Api set: ExcelApi 1.9] */ pivotOptions?: Excel.Interfaces.ChartPivotOptionsUpdateData; /** * Represents the plot area for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotArea?: Excel.Interfaces.ChartPlotAreaUpdateData; /** * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * @remarks * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartTitleUpdateData; /** * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. * * @remarks * [Api set: ExcelApi 1.8] */ categoryLabelLevel?: number; /** * Specifies the type of the chart. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; /** * Specifies the way that blank cells are plotted on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; /** * Specifies the height, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ height?: number; /** * The distance, in points, from the left side of the chart to the worksheet origin. * * @remarks * [Api set: ExcelApi 1.1] */ left?: number; /** * Specifies the name of a chart object. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Specifies the way columns or rows are used as data series on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotBy?: Excel.ChartPlotBy | "Rows" | "Columns"; /** * True if only visible cells are plotted. False if both visible and hidden cells are plotted. * * @remarks * [Api set: ExcelApi 1.8] */ plotVisibleOnly?: boolean; /** * Specifies a chart series name level enumeration constant, referring to the level of the source series names. * * @remarks * [Api set: ExcelApi 1.8] */ seriesNameLevel?: number; /** * Specifies whether to display all field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.7] */ showAllFieldButtons?: boolean; /** * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * * @remarks * [Api set: ExcelApi 1.8] */ showDataLabelsOverMaximum?: boolean; /** * Specifies the chart style for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ style?: number; /** * Specifies the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). * * @remarks * [Api set: ExcelApi 1.1] */ top?: number; /** * Specifies the width, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ width?: number; } /** An interface for updating data on the ChartPivotOptions object, for use in `chartPivotOptions.set({ ... })`. */ interface ChartPivotOptionsUpdateData { /** * Specifies whether to display the axis field buttons on a PivotChart. The `showAxisFieldButtons` property corresponds to the "Show Axis Field Buttons" command on the "Field Buttons" drop-down list of the "Analyze" tab, which is available when a PivotChart is selected. * * @remarks * [Api set: ExcelApi 1.9] */ showAxisFieldButtons?: boolean; /** * Specifies whether to display the legend field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showLegendFieldButtons?: boolean; /** * Specifies whether to display the report filter field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showReportFilterFieldButtons?: boolean; /** * Specifies whether to display the show value field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showValueFieldButtons?: boolean; } /** An interface for updating data on the ChartAreaFormat object, for use in `chartAreaFormat.set({ ... })`. */ interface ChartAreaFormatUpdateData { /** * Represents the border format of chart area, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderUpdateData; /** * Represents the font attributes (font name, font size, color, etc.) for the current object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontUpdateData; /** * Specifies the color scheme of the chart. * * @remarks * [Api set: ExcelApi 1.9] */ colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; /** * Specifies if the chart area of the chart has rounded corners. * * @remarks * [Api set: ExcelApi 1.9] */ roundedCorners?: boolean; } /** An interface for updating data on the ChartSeriesCollection object, for use in `chartSeriesCollection.set({ ... })`. */ interface ChartSeriesCollectionUpdateData { items?: Excel.Interfaces.ChartSeriesData[]; } /** An interface for updating data on the ChartSeries object, for use in `chartSeries.set({ ... })`. */ interface ChartSeriesUpdateData { /** * Encapsulates the bin options for histogram charts and pareto charts. * * @remarks * [Api set: ExcelApi 1.9] */ binOptions?: Excel.Interfaces.ChartBinOptionsUpdateData; /** * Encapsulates the options for the box and whisker charts. * * @remarks * [Api set: ExcelApi 1.9] */ boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsUpdateData; /** * Represents a collection of all data labels in the series. * * @remarks * [Api set: ExcelApi 1.8] */ dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; /** * Represents the formatting of a chart series, which includes fill and line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartSeriesFormatUpdateData; /** * Encapsulates the options for a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ mapOptions?: Excel.Interfaces.ChartMapOptionsUpdateData; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ xErrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ yErrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; /** * Specifies the group for the specified series. * * @remarks * [Api set: ExcelApi 1.8] */ axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; /** * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. * * @remarks * [Api set: ExcelApi 1.9] */ bubbleScale?: number; /** * Represents the chart type of a series. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; /** * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws an `InvalidArgument` error on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ doughnutHoleSize?: number; /** * Specifies the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). * * @remarks * [Api set: ExcelApi 1.8] */ explosion?: number; /** * Specifies if the series is filtered. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ filtered?: boolean; /** * Specifies the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. * * @remarks * [Api set: ExcelApi 1.8] */ firstSliceAngle?: number; /** * Represents the gap width of a chart series. Only valid on bar and column charts, as well as specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ gapWidth?: number; /** * Specifies the color for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumColor?: string; /** * Specifies the type for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumValue?: number; /** * Specifies the color for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointColor?: string; /** * Specifies the type for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointValue?: number; /** * Specifies the color for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumColor?: string; /** * Specifies the type for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumValue?: number; /** * Specifies the series gradient style of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; /** * Specifies if the series has data labels. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; /** * Specifies the fill color for negative data points in a series. * * @remarks * [Api set: ExcelApi 1.9] */ invertColor?: string; /** * True if Excel inverts the pattern in the item when it corresponds to a negative number. * * @remarks * [Api set: ExcelApi 1.8] */ invertIfNegative?: boolean; /** * Specifies the marker background color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: string; /** * Specifies the marker foreground color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: string; /** * Specifies the marker size of a chart series. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: number; /** * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; /** * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Specifies how bars and columns are positioned. Can be a value between -100 and 100. Applies only to 2-D bar and 2-D column charts. * * @remarks * [Api set: ExcelApi 1.8] */ overlap?: number; /** * Specifies the series parent label strategy area for a treemap chart. * * @remarks * [Api set: ExcelApi 1.9] */ parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; /** * Specifies the plot order of a chart series within the chart group. * * @remarks * [Api set: ExcelApi 1.7] */ plotOrder?: number; /** * Specifies the size of the secondary section of either a pie-of-pie chart or a bar-of-pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. * * @remarks * [Api set: ExcelApi 1.8] */ secondPlotSize?: number; /** * Specifies whether connector lines are shown in waterfall charts. * * @remarks * [Api set: ExcelApi 1.9] */ showConnectorLines?: boolean; /** * Specifies whether leader lines are displayed for each data label in the series. * * @remarks * [Api set: ExcelApi 1.9] */ showLeaderLines?: boolean; /** * Specifies if the series has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies if the series is smooth. Only applicable to line and scatter charts. * * @remarks * [Api set: ExcelApi 1.7] */ smooth?: boolean; /** * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. * * @remarks * [Api set: ExcelApi 1.8] */ splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; /** * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. * * @remarks * [Api set: ExcelApi 1.9] */ splitValue?: number; /** * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. * * @remarks * [Api set: ExcelApi 1.8] */ varyByCategories?: boolean; } /** An interface for updating data on the ChartSeriesFormat object, for use in `chartSeriesFormat.set({ ... })`. */ interface ChartSeriesFormatUpdateData { /** * Represents line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatUpdateData; } /** An interface for updating data on the ChartPointsCollection object, for use in `chartPointsCollection.set({ ... })`. */ interface ChartPointsCollectionUpdateData { items?: Excel.Interfaces.ChartPointData[]; } /** An interface for updating data on the ChartPoint object, for use in `chartPoint.set({ ... })`. */ interface ChartPointUpdateData { /** * Returns the data label of a chart point. * * @remarks * [Api set: ExcelApi 1.7] */ dataLabel?: Excel.Interfaces.ChartDataLabelUpdateData; /** * Encapsulates the format properties chart point. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartPointFormatUpdateData; /** * Represents whether a data point has a data label. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabel?: boolean; /** * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: string; /** * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: string; /** * Represents marker size of a data point. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: number; /** * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; } /** An interface for updating data on the ChartPointFormat object, for use in `chartPointFormat.set({ ... })`. */ interface ChartPointFormatUpdateData { /** * Represents the border format of a chart data point, which includes color, style, and weight information. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderUpdateData; } /** An interface for updating data on the ChartAxes object, for use in `chartAxes.set({ ... })`. */ interface ChartAxesUpdateData { /** * Represents the category axis in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ categoryAxis?: Excel.Interfaces.ChartAxisUpdateData; /** * Represents the series axis of a 3-D chart. * * @remarks * [Api set: ExcelApi 1.1] */ seriesAxis?: Excel.Interfaces.ChartAxisUpdateData; /** * Represents the value axis in an axis. * * @remarks * [Api set: ExcelApi 1.1] */ valueAxis?: Excel.Interfaces.ChartAxisUpdateData; } /** An interface for updating data on the ChartAxis object, for use in `chartAxis.set({ ... })`. */ interface ChartAxisUpdateData { /** * Represents the formatting of a chart object, which includes line and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAxisFormatUpdateData; /** * Returns an object that represents the major gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ majorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; /** * Returns an object that represents the minor gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ minorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; /** * Represents the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartAxisTitleUpdateData; /** * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. * * @remarks * [Api set: ExcelApi 1.8] */ alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; /** * Specifies the base unit for the specified category axis. * * @remarks * [Api set: ExcelApi 1.7] */ baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Specifies the category axis type. * * @remarks * [Api set: ExcelApi 1.7] */ categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; /** * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. * * @remarks * [Api set: ExcelApi 1.7] */ displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; /** * Specifies if the value axis crosses the category axis between categories. * * @remarks * [Api set: ExcelApi 1.8] */ isBetweenCategories?: boolean; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * Specifies the base of the logarithm when using logarithmic scales. * * @remarks * [Api set: ExcelApi 1.7] */ logBase?: number; /** * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; /** * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ majorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ majorUnit?: any; /** * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ maximum?: any; /** * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minimum?: any; /** * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; /** * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ minorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minorUnit?: any; /** * Specifies if an axis is multilevel. * * @remarks * [Api set: ExcelApi 1.8] */ multiLevel?: boolean; /** * Specifies the format code for the axis tick label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. * * @remarks * [Api set: ExcelApi 1.8] */ offset?: number; /** * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. * * @remarks * [Api set: ExcelApi 1.8] */ position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; /** * Specifies if Excel plots data points from last to first. * * @remarks * [Api set: ExcelApi 1.7] */ reversePlotOrder?: boolean; /** * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; /** * Specifies if the axis display unit label is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showDisplayUnitLabel?: boolean; /** * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: any; /** * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; /** * Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelSpacing?: any; /** * Specifies the number of categories or series between tick marks. * * @remarks * [Api set: ExcelApi 1.7] */ tickMarkSpacing?: number; /** * Specifies if the axis is visible. * * @remarks * [Api set: ExcelApi 1.7] */ visible?: boolean; } /** An interface for updating data on the ChartAxisFormat object, for use in `chartAxisFormat.set({ ... })`. */ interface ChartAxisFormatUpdateData { /** * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontUpdateData; /** * Specifies chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatUpdateData; } /** An interface for updating data on the ChartAxisTitle object, for use in `chartAxisTitle.set({ ... })`. */ interface ChartAxisTitleUpdateData { /** * Specifies the formatting of the chart axis title. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAxisTitleFormatUpdateData; /** * Specifies the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ text?: string; /** * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.12] */ textOrientation?: number; /** * Specifies if the axis title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** An interface for updating data on the ChartAxisTitleFormat object, for use in `chartAxisTitleFormat.set({ ... })`. */ interface ChartAxisTitleFormatUpdateData { /** * Specifies the chart axis title's border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderUpdateData; /** * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontUpdateData; } /** An interface for updating data on the ChartDataLabels object, for use in `chartDataLabels.set({ ... })`. */ interface ChartDataLabelsUpdateData { /** * Specifies the format of chart data labels, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; /** * Specifies if data labels automatically generate appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when the `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * Specifies the format code for data labels. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; /** * String representing the separator used for the data labels on a chart. * * @remarks * [Api set: ExcelApi 1.1] */ separator?: string; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showBubbleSize?: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showCategoryName?: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showLegendKey?: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showPercentage?: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showSeriesName?: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showValue?: boolean; /** * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of the data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; } /** An interface for updating data on the ChartDataLabel object, for use in `chartDataLabel.set({ ... })`. */ interface ChartDataLabelUpdateData { /** * Represents the format of chart data label. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; /** * Specifies if the data label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * String value that represents the formula of chart data label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula?: string; /** * Represents the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left?: number; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * String value that represents the format code for data label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; /** * String representing the separator used for the data label on a chart. * * @remarks * [Api set: ExcelApi 1.7] */ separator?: string; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showBubbleSize?: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showCategoryName?: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showLegendKey?: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showPercentage?: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showSeriesName?: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showValue?: boolean; /** * String representing the text of the data label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text?: string; /** * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top?: number; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; } /** An interface for updating data on the ChartDataLabelFormat object, for use in `chartDataLabelFormat.set({ ... })`. */ interface ChartDataLabelFormatUpdateData { /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderUpdateData; /** * Represents the font attributes (such as font name, font size, and color) for a chart data label. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontUpdateData; } /** An interface for updating data on the `ChartDataTable` object, for use in `chartDataTable.set({ ... })`. */ interface ChartDataTableUpdateData { /** * Represents the format of a chart data table, which includes fill, font, and border format. * * @remarks * [Api set: ExcelApi 1.14] */ format?: Excel.Interfaces.ChartDataTableFormatUpdateData; /** * Specifies whether to display the horizontal border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showHorizontalBorder?: boolean; /** * Specifies whether to show the legend key of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showLegendKey?: boolean; /** * Specifies whether to display the outline border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showOutlineBorder?: boolean; /** * Specifies whether to display the vertical border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showVerticalBorder?: boolean; /** * Specifies whether to show the data table of the chart. * * @remarks * [Api set: ExcelApi 1.14] */ visible?: boolean; } /** An interface for updating data on the `ChartDataTableFormat` object, for use in `chartDataTableFormat.set({ ... })`. */ interface ChartDataTableFormatUpdateData { /** * Represents the border format of chart data table, which includes color, line style, and weight. * * @remarks * [Api set: ExcelApi 1.14] */ border?: Excel.Interfaces.ChartBorderUpdateData; /** * Represents the font attributes (such as font name, font size, and color) for the current object. * * @remarks * [Api set: ExcelApi 1.14] */ font?: Excel.Interfaces.ChartFontUpdateData; } /** An interface for updating data on the ChartErrorBars object, for use in `chartErrorBars.set({ ... })`. */ interface ChartErrorBarsUpdateData { /** * Specifies the formatting type of the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.Interfaces.ChartErrorBarsFormatUpdateData; /** * Specifies if error bars have an end style cap. * * @remarks * [Api set: ExcelApi 1.9] */ endStyleCap?: boolean; /** * Specifies which parts of the error bars to include. * * @remarks * [Api set: ExcelApi 1.9] */ include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; /** * The type of range marked by the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; /** * Specifies whether the error bars are displayed. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; } /** An interface for updating data on the ChartErrorBarsFormat object, for use in `chartErrorBarsFormat.set({ ... })`. */ interface ChartErrorBarsFormatUpdateData { /** * Represents the chart line formatting. * * @remarks * [Api set: ExcelApi 1.9] */ line?: Excel.Interfaces.ChartLineFormatUpdateData; } /** An interface for updating data on the ChartGridlines object, for use in `chartGridlines.set({ ... })`. */ interface ChartGridlinesUpdateData { /** * Represents the formatting of chart gridlines. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartGridlinesFormatUpdateData; /** * Specifies if the axis gridlines are visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** An interface for updating data on the ChartGridlinesFormat object, for use in `chartGridlinesFormat.set({ ... })`. */ interface ChartGridlinesFormatUpdateData { /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatUpdateData; } /** An interface for updating data on the ChartLegend object, for use in `chartLegend.set({ ... })`. */ interface ChartLegendUpdateData { /** * Represents the formatting of a chart legend, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartLegendFormatUpdateData; /** * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height?: number; /** * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: number; /** * Specifies if the chart legend should overlap with the main body of the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay?: boolean; /** * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; /** * Specifies if the legend has a shadow on the chart. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies the top of a chart legend. * * @remarks * [Api set: ExcelApi 1.7] */ top?: number; /** * Specifies if the chart legend is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; /** * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width?: number; } /** An interface for updating data on the ChartLegendEntry object, for use in `chartLegendEntry.set({ ... })`. */ interface ChartLegendEntryUpdateData { /** * Represents the visibility of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.7] */ visible?: boolean; } /** An interface for updating data on the ChartLegendEntryCollection object, for use in `chartLegendEntryCollection.set({ ... })`. */ interface ChartLegendEntryCollectionUpdateData { items?: Excel.Interfaces.ChartLegendEntryData[]; } /** An interface for updating data on the ChartLegendFormat object, for use in `chartLegendFormat.set({ ... })`. */ interface ChartLegendFormatUpdateData { /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderUpdateData; /** * Represents the font attributes such as font name, font size, and color of a chart legend. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontUpdateData; } /** An interface for updating data on the ChartMapOptions object, for use in `chartMapOptions.set({ ... })`. */ interface ChartMapOptionsUpdateData { /** * Specifies the series map labels strategy of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; /** * Specifies the series mapping level of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; /** * Specifies the series projection type of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; } /** An interface for updating data on the ChartTitle object, for use in `chartTitle.set({ ... })`. */ interface ChartTitleUpdateData { /** * Represents the formatting of a chart title, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartTitleFormatUpdateData; /** * Specifies the horizontal alignment for chart title. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: number; /** * Specifies if the chart title will overlay the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay?: boolean; /** * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position?: Excel.ChartTitlePosition | "Automatic" | "Top" | "Bottom" | "Left" | "Right"; /** * Represents a boolean value that determines if the chart title has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies the chart's title text. * * @remarks * [Api set: ExcelApi 1.1] */ text?: string; /** * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation?: number; /** * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ top?: number; /** * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Specifies if the chart title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** An interface for updating data on the ChartFormatString object, for use in `chartFormatString.set({ ... })`. */ interface ChartFormatStringUpdateData { /** * Represents the font attributes, such as font name, font size, and color of a chart characters object. * * @remarks * [Api set: ExcelApi 1.7] */ font?: Excel.Interfaces.ChartFontUpdateData; } /** An interface for updating data on the ChartTitleFormat object, for use in `chartTitleFormat.set({ ... })`. */ interface ChartTitleFormatUpdateData { /** * Represents the border format of chart title, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderUpdateData; /** * Represents the font attributes (such as font name, font size, and color) for an object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontUpdateData; } /** An interface for updating data on the ChartBorder object, for use in `chartBorder.set({ ... })`. */ interface ChartBorderUpdateData { /** * HTML color code representing the color of borders in the chart. * * @remarks * [Api set: ExcelApi 1.7] */ color?: string; /** * Represents the line style of the border. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; /** * Represents weight of the border, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight?: number; } /** An interface for updating data on the ChartBinOptions object, for use in `chartBinOptions.set({ ... })`. */ interface ChartBinOptionsUpdateData { /** * Specifies if bin overflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowOverflow?: boolean; /** * Specifies if bin underflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowUnderflow?: boolean; /** * Specifies the bin count of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ count?: number; /** * Specifies the bin overflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ overflowValue?: number; /** * Specifies the bin's type for a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; /** * Specifies the bin underflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ underflowValue?: number; /** * Specifies the bin width value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ width?: number; } /** An interface for updating data on the ChartBoxwhiskerOptions object, for use in `chartBoxwhiskerOptions.set({ ... })`. */ interface ChartBoxwhiskerOptionsUpdateData { /** * Specifies if the quartile calculation type of a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; /** * Specifies if inner points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showInnerPoints?: boolean; /** * Specifies if the mean line is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanLine?: boolean; /** * Specifies if the mean marker is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanMarker?: boolean; /** * Specifies if outlier points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showOutlierPoints?: boolean; } /** An interface for updating data on the ChartLineFormat object, for use in `chartLineFormat.set({ ... })`. */ interface ChartLineFormatUpdateData { /** * HTML color code representing the color of lines in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * Represents the line style. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; /** * Represents weight of the line, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight?: number; } /** An interface for updating data on the ChartFont object, for use in `chartFont.set({ ... })`. */ interface ChartFontUpdateData { /** * Represents the bold status of font. * * @remarks * [Api set: ExcelApi 1.1] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * Represents the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic?: boolean; /** * Font name (e.g., "Calibri") * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Size of the font (e.g., 11) * * @remarks * [Api set: ExcelApi 1.1] */ size?: number; /** * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline?: Excel.ChartUnderlineStyle | "None" | "Single"; } /** An interface for updating data on the ChartTrendline object, for use in `chartTrendline.set({ ... })`. */ interface ChartTrendlineUpdateData { /** * Represents the formatting of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ format?: Excel.Interfaces.ChartTrendlineFormatUpdateData; /** * Represents the label of a chart trendline. * * @remarks * [Api set: ExcelApi 1.8] */ label?: Excel.Interfaces.ChartTrendlineLabelUpdateData; /** * Represents the number of periods that the trendline extends backward. * * @remarks * [Api set: ExcelApi 1.8] */ backwardPeriod?: number; /** * Represents the number of periods that the trendline extends forward. * * @remarks * [Api set: ExcelApi 1.8] */ forwardPeriod?: number; /** * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ intercept?: any; /** * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. * * @remarks * [Api set: ExcelApi 1.7] */ movingAveragePeriod?: number; /** * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string * * @remarks * [Api set: ExcelApi 1.7] */ name?: string; /** * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. * * @remarks * [Api set: ExcelApi 1.7] */ polynomialOrder?: number; /** * True if the equation for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showEquation?: boolean; /** * True if the r-squared value for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showRSquared?: boolean; /** * Represents the type of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ type?: Excel.ChartTrendlineType | "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"; } /** An interface for updating data on the ChartTrendlineCollection object, for use in `chartTrendlineCollection.set({ ... })`. */ interface ChartTrendlineCollectionUpdateData { items?: Excel.Interfaces.ChartTrendlineData[]; } /** An interface for updating data on the ChartTrendlineFormat object, for use in `chartTrendlineFormat.set({ ... })`. */ interface ChartTrendlineFormatUpdateData { /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.7] */ line?: Excel.Interfaces.ChartLineFormatUpdateData; } /** An interface for updating data on the ChartTrendlineLabel object, for use in `chartTrendlineLabel.set({ ... })`. */ interface ChartTrendlineLabelUpdateData { /** * The format of the chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartTrendlineLabelFormatUpdateData; /** * Specifies if the trendline label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * String value that represents the formula of the chart trendline label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula?: string; /** * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left?: number; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * String value that represents the format code for the trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * String representing the text of the trendline label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text?: string; /** * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top?: number; /** * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; } /** An interface for updating data on the ChartTrendlineLabelFormat object, for use in `chartTrendlineLabelFormat.set({ ... })`. */ interface ChartTrendlineLabelFormatUpdateData { /** * Specifies the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderUpdateData; /** * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ font?: Excel.Interfaces.ChartFontUpdateData; } /** An interface for updating data on the ChartPlotArea object, for use in `chartPlotArea.set({ ... })`. */ interface ChartPlotAreaUpdateData { /** * Specifies the formatting of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartPlotAreaFormatUpdateData; /** * Specifies the height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ height?: number; /** * Specifies the inside height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideHeight?: number; /** * Specifies the inside left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideLeft?: number; /** * Specifies the inside top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideTop?: number; /** * Specifies the inside width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideWidth?: number; /** * Specifies the left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ left?: number; /** * Specifies the position of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; /** * Specifies the top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ top?: number; /** * Specifies the width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ width?: number; } /** An interface for updating data on the ChartPlotAreaFormat object, for use in `chartPlotAreaFormat.set({ ... })`. */ interface ChartPlotAreaFormatUpdateData { /** * Specifies the border attributes of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderUpdateData; } /** An interface for updating data on the CustomXmlPartScopedCollection object, for use in `customXmlPartScopedCollection.set({ ... })`. */ interface CustomXmlPartScopedCollectionUpdateData { items?: Excel.Interfaces.CustomXmlPartData[]; } /** An interface for updating data on the CustomXmlPartCollection object, for use in `customXmlPartCollection.set({ ... })`. */ interface CustomXmlPartCollectionUpdateData { items?: Excel.Interfaces.CustomXmlPartData[]; } /** An interface for updating data on the PivotTableScopedCollection object, for use in `pivotTableScopedCollection.set({ ... })`. */ interface PivotTableScopedCollectionUpdateData { items?: Excel.Interfaces.PivotTableData[]; } /** An interface for updating data on the PivotTableCollection object, for use in `pivotTableCollection.set({ ... })`. */ interface PivotTableCollectionUpdateData { items?: Excel.Interfaces.PivotTableData[]; } /** An interface for updating data on the PivotTable object, for use in `pivotTable.set({ ... })`. */ interface PivotTableUpdateData { /** * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. * * @remarks * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * * @remarks * [Api set: ExcelApi 1.9] */ enableDataValueEditing?: boolean; /** * Name of the PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ name?: string; /** * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. * * @remarks * [Api set: ExcelApi 1.13] */ refreshOnOpen?: boolean; /** * Specifies if the PivotTable uses custom lists when sorting. * * @remarks * [Api set: ExcelApi 1.9] */ useCustomSortLists?: boolean; } /** An interface for updating data on the PivotLayout object, for use in `pivotLayout.set({ ... })`. */ interface PivotLayoutUpdateData { /** * The alt text description of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextDescription?: string; /** * The alt text title of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextTitle?: string; /** * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. * * @remarks * [Api set: ExcelApi 1.9] */ autoFormat?: boolean; /** * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. By default, this is an empty string. * * @remarks * [Api set: ExcelApi 1.13] */ emptyCellText?: string; /** * Specifies if the field list can be shown in the UI. * * @remarks * [Api set: ExcelApi 1.10] */ enableFieldList?: boolean; /** * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. Note that the value of `emptyCellText` persists when this property is set to `false`. * * @remarks * [Api set: ExcelApi 1.13] */ fillEmptyCells?: boolean; /** * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. * * @remarks * [Api set: ExcelApi 1.8] */ layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; /** * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * @remarks * [Api set: ExcelApi 1.9] */ preserveFormatting?: boolean; /** * Specifies if the PivotTable report shows grand totals for columns. * * @remarks * [Api set: ExcelApi 1.8] */ showColumnGrandTotals?: boolean; /** * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). * * @remarks * [Api set: ExcelApi 1.13] */ showFieldHeaders?: boolean; /** * Specifies if the PivotTable report shows grand totals for rows. * * @remarks * [Api set: ExcelApi 1.8] */ showRowGrandTotals?: boolean; /** * This property indicates the `SubtotalLocationType` of all fields on the PivotTable. If fields have different states, this will be `null`. * * @remarks * [Api set: ExcelApi 1.8] */ subtotalLocation?: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; } /** An interface for updating data on the PivotHierarchyCollection object, for use in `pivotHierarchyCollection.set({ ... })`. */ interface PivotHierarchyCollectionUpdateData { items?: Excel.Interfaces.PivotHierarchyData[]; } /** An interface for updating data on the PivotHierarchy object, for use in `pivotHierarchy.set({ ... })`. */ interface PivotHierarchyUpdateData { /** * Name of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; } /** An interface for updating data on the RowColumnPivotHierarchyCollection object, for use in `rowColumnPivotHierarchyCollection.set({ ... })`. */ interface RowColumnPivotHierarchyCollectionUpdateData { items?: Excel.Interfaces.RowColumnPivotHierarchyData[]; } /** An interface for updating data on the RowColumnPivotHierarchy object, for use in `rowColumnPivotHierarchy.set({ ... })`. */ interface RowColumnPivotHierarchyUpdateData { /** * Name of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Position of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: number; } /** An interface for updating data on the FilterPivotHierarchyCollection object, for use in `filterPivotHierarchyCollection.set({ ... })`. */ interface FilterPivotHierarchyCollectionUpdateData { items?: Excel.Interfaces.FilterPivotHierarchyData[]; } /** An interface for updating data on the FilterPivotHierarchy object, for use in `filterPivotHierarchy.set({ ... })`. */ interface FilterPivotHierarchyUpdateData { /** * Determines whether to allow multiple filter items. * * @remarks * [Api set: ExcelApi 1.8] */ enableMultipleFilterItems?: boolean; /** * Name of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Position of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: number; } /** An interface for updating data on the DataPivotHierarchyCollection object, for use in `dataPivotHierarchyCollection.set({ ... })`. */ interface DataPivotHierarchyCollectionUpdateData { items?: Excel.Interfaces.DataPivotHierarchyData[]; } /** An interface for updating data on the DataPivotHierarchy object, for use in `dataPivotHierarchy.set({ ... })`. */ interface DataPivotHierarchyUpdateData { /** * Returns the PivotFields associated with the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ field?: Excel.Interfaces.PivotFieldUpdateData; /** * Name of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Number format of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Position of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: number; /** * Specifies if the data should be shown as a specific summary calculation. * * @remarks * [Api set: ExcelApi 1.8] */ showAs?: Excel.ShowAsRule; /** * Specifies if all items of the DataPivotHierarchy are shown. * * @remarks * [Api set: ExcelApi 1.8] */ summarizeBy?: Excel.AggregationFunction | "Unknown" | "Automatic" | "Sum" | "Count" | "Average" | "Max" | "Min" | "Product" | "CountNumbers" | "StandardDeviation" | "StandardDeviationP" | "Variance" | "VarianceP"; } /** An interface for updating data on the PivotFieldCollection object, for use in `pivotFieldCollection.set({ ... })`. */ interface PivotFieldCollectionUpdateData { items?: Excel.Interfaces.PivotFieldData[]; } /** An interface for updating data on the PivotField object, for use in `pivotField.set({ ... })`. */ interface PivotFieldUpdateData { /** * Name of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Determines whether to show all items of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ showAllItems?: boolean; /** * Subtotals of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ subtotals?: Excel.Subtotals; } /** An interface for updating data on the PivotItemCollection object, for use in `pivotItemCollection.set({ ... })`. */ interface PivotItemCollectionUpdateData { items?: Excel.Interfaces.PivotItemData[]; } /** An interface for updating data on the PivotItem object, for use in `pivotItem.set({ ... })`. */ interface PivotItemUpdateData { /** * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. * * @remarks * [Api set: ExcelApi 1.8] */ isExpanded?: boolean; /** * Name of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Specifies if the PivotItem is visible. * * @remarks * [Api set: ExcelApi 1.8] */ visible?: boolean; } /** An interface for updating data on the WorksheetCustomProperty object, for use in `worksheetCustomProperty.set({ ... })`. */ interface WorksheetCustomPropertyUpdateData { /** * Gets or sets the value of the custom property. * * @remarks * [Api set: ExcelApi 1.12] */ value?: string; } /** An interface for updating data on the WorksheetCustomPropertyCollection object, for use in `worksheetCustomPropertyCollection.set({ ... })`. */ interface WorksheetCustomPropertyCollectionUpdateData { items?: Excel.Interfaces.WorksheetCustomPropertyData[]; } /** An interface for updating data on the DocumentProperties object, for use in `documentProperties.set({ ... })`. */ interface DocumentPropertiesUpdateData { /** * The author of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ author?: string; /** * The category of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ category?: string; /** * The comments of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ comments?: string; /** * The company of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ company?: string; /** * The keywords of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ keywords?: string; /** * The manager of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ manager?: string; /** * Gets the revision number of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ revisionNumber?: number; /** * The subject of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ subject?: string; /** * The title of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ title?: string; } /** An interface for updating data on the CustomProperty object, for use in `customProperty.set({ ... })`. */ interface CustomPropertyUpdateData { /** * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ value?: any; } /** An interface for updating data on the CustomPropertyCollection object, for use in `customPropertyCollection.set({ ... })`. */ interface CustomPropertyCollectionUpdateData { items?: Excel.Interfaces.CustomPropertyData[]; } /** An interface for updating data on the ConditionalFormatCollection object, for use in `conditionalFormatCollection.set({ ... })`. */ interface ConditionalFormatCollectionUpdateData { items?: Excel.Interfaces.ConditionalFormatData[]; } /** An interface for updating data on the ConditionalFormat object, for use in `conditionalFormat.set({ ... })`. */ interface ConditionalFormatUpdateData { /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValue?: Excel.Interfaces.CellValueConditionalFormatUpdateData; /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatUpdateData; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScale?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ custom?: Excel.Interfaces.CustomConditionalFormatUpdateData; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ customOrNullObject?: Excel.Interfaces.CustomConditionalFormatUpdateData; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBar?: Excel.Interfaces.DataBarConditionalFormatUpdateData; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatUpdateData; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSet?: Excel.Interfaces.IconSetConditionalFormatUpdateData; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatUpdateData; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ preset?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparison?: Excel.Interfaces.TextConditionalFormatUpdateData; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatUpdateData; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottom?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; /** * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than the bounds will get and set to the maximum (or minimum if negative) priority. Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. * * @remarks * [Api set: ExcelApi 1.6] */ priority?: number; /** * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. * * @remarks * [Api set: ExcelApi 1.6] */ stopIfTrue?: boolean; } /** An interface for updating data on the DataBarConditionalFormat object, for use in `dataBarConditionalFormat.set({ ... })`. */ interface DataBarConditionalFormatUpdateData { /** * Representation of all values to the left of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatUpdateData; /** * Representation of all values to the right of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatUpdateData; /** * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no axis is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ axisColor?: string; /** * Representation of how the axis is determined for an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; /** * Specifies the direction that the data bar graphic should be based on. * * @remarks * [Api set: ExcelApi 1.6] */ barDirection?: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; /** * The rule for what constitutes the lower bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ lowerBoundRule?: Excel.ConditionalDataBarRule; /** * If `true`, hides the values from the cells where the data bar is applied. * * @remarks * [Api set: ExcelApi 1.6] */ showDataBarOnly?: boolean; /** * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ upperBoundRule?: Excel.ConditionalDataBarRule; } /** An interface for updating data on the ConditionalDataBarPositiveFormat object, for use in `conditionalDataBarPositiveFormat.set({ ... })`. */ interface ConditionalDataBarPositiveFormatUpdateData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * Specifies if the data bar has a gradient. * * @remarks * [Api set: ExcelApi 1.6] */ gradientFill?: boolean; } /** An interface for updating data on the ConditionalDataBarNegativeFormat object, for use in `conditionalDataBarNegativeFormat.set({ ... })`. */ interface ConditionalDataBarNegativeFormatUpdateData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * Specifies if the negative data bar has the same border color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor?: boolean; /** * Specifies if the negative data bar has the same fill color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveFillColor?: boolean; } /** An interface for updating data on the CustomConditionalFormat object, for use in `customConditionalFormat.set({ ... })`. */ interface CustomConditionalFormatUpdateData { /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * Specifies the `Rule` object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.Interfaces.ConditionalFormatRuleUpdateData; } /** An interface for updating data on the ConditionalFormatRule object, for use in `conditionalFormatRule.set({ ... })`. */ interface ConditionalFormatRuleUpdateData { /** * The formula, if required, on which to evaluate the conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ formula?: string; /** * The formula, if required, on which to evaluate the conditional format rule in the user's language. * * @remarks * [Api set: ExcelApi 1.6] */ formulaLocal?: string; /** * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. * * @remarks * [Api set: ExcelApi 1.6] */ formulaR1C1?: string; } /** An interface for updating data on the IconSetConditionalFormat object, for use in `iconSetConditionalFormat.set({ ... })`. */ interface IconSetConditionalFormatUpdateData { /** * An array of criteria and icon sets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. * * @remarks * [Api set: ExcelApi 1.6] */ criteria?: Excel.ConditionalIconCriterion[]; /** * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. * * @remarks * [Api set: ExcelApi 1.6] */ reverseIconOrder?: boolean; /** * If `true`, hides the values and only shows icons. * * @remarks * [Api set: ExcelApi 1.6] */ showIconOnly?: boolean; /** * If set, displays the icon set option for the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; } /** An interface for updating data on the ColorScaleConditionalFormat object, for use in `colorScaleConditionalFormat.set({ ... })`. */ interface ColorScaleConditionalFormatUpdateData { /** * The criteria of the color scale. Midpoint is optional when using a two point color scale. * * @remarks * [Api set: ExcelApi 1.6] */ criteria?: Excel.ConditionalColorScaleCriteria; } /** An interface for updating data on the TopBottomConditionalFormat object, for use in `topBottomConditionalFormat.set({ ... })`. */ interface TopBottomConditionalFormatUpdateData { /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * The criteria of the top/bottom conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTopBottomRule; } /** An interface for updating data on the PresetCriteriaConditionalFormat object, for use in `presetCriteriaConditionalFormat.set({ ... })`. */ interface PresetCriteriaConditionalFormatUpdateData { /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalPresetCriteriaRule; } /** An interface for updating data on the TextConditionalFormat object, for use in `textConditionalFormat.set({ ... })`. */ interface TextConditionalFormatUpdateData { /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTextComparisonRule; } /** An interface for updating data on the CellValueConditionalFormat object, for use in `cellValueConditionalFormat.set({ ... })`. */ interface CellValueConditionalFormatUpdateData { /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * Specifies the rule object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalCellValueRule; } /** An interface for updating data on the ConditionalRangeFormat object, for use in `conditionalRangeFormat.set({ ... })`. */ interface ConditionalRangeFormatUpdateData { /** * Collection of border objects that apply to the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ borders?: Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData; /** * Returns the fill object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ fill?: Excel.Interfaces.ConditionalRangeFillUpdateData; /** * Returns the font object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ font?: Excel.Interfaces.ConditionalRangeFontUpdateData; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. Cleared if `null` is passed in. * * @remarks * [Api set: ExcelApi 1.6] */ numberFormat?: any; } /** An interface for updating data on the ConditionalRangeFont object, for use in `conditionalRangeFont.set({ ... })`. */ interface ConditionalRangeFontUpdateData { /** * Specifies if the font is bold. * * @remarks * [Api set: ExcelApi 1.6] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.6] */ color?: string; /** * Specifies if the font is italic. * * @remarks * [Api set: ExcelApi 1.6] */ italic?: boolean; /** * Specifies the strikethrough status of the font. * * @remarks * [Api set: ExcelApi 1.6] */ strikethrough?: boolean; /** * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ underline?: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; } /** An interface for updating data on the ConditionalRangeFill object, for use in `conditionalRangeFill.set({ ... })`. */ interface ConditionalRangeFillUpdateData { /** * HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color?: string; } /** An interface for updating data on the ConditionalRangeBorder object, for use in `conditionalRangeBorder.set({ ... })`. */ interface ConditionalRangeBorderUpdateData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color?: string; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ style?: Excel.ConditionalRangeBorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"; } /** An interface for updating data on the ConditionalRangeBorderCollection object, for use in `conditionalRangeBorderCollection.set({ ... })`. */ interface ConditionalRangeBorderCollectionUpdateData { /** * Gets the bottom border. * * @remarks * [Api set: ExcelApi 1.6] */ bottom?: Excel.Interfaces.ConditionalRangeBorderUpdateData; /** * Gets the left border. * * @remarks * [Api set: ExcelApi 1.6] */ left?: Excel.Interfaces.ConditionalRangeBorderUpdateData; /** * Gets the right border. * * @remarks * [Api set: ExcelApi 1.6] */ right?: Excel.Interfaces.ConditionalRangeBorderUpdateData; /** * Gets the top border. * * @remarks * [Api set: ExcelApi 1.6] */ top?: Excel.Interfaces.ConditionalRangeBorderUpdateData; items?: Excel.Interfaces.ConditionalRangeBorderData[]; } /** An interface for updating data on the Style object, for use in `style.set({ ... })`. */ interface StyleUpdateData { /** * A collection of four border objects that represent the style of the four borders. * * @remarks * [Api set: ExcelApi 1.7] */ borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; /** * The fill of the style. * * @remarks * [Api set: ExcelApi 1.7] */ fill?: Excel.Interfaces.RangeFillUpdateData; /** * A `Font` object that represents the font of the style. * * @remarks * [Api set: ExcelApi 1.7] */ font?: Excel.Interfaces.RangeFontUpdateData; /** * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.8] */ autoIndent?: boolean; /** * Specifies if the formula will be hidden when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ formulaHidden?: boolean; /** * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeAlignment?: boolean; /** * Specifies if the style includes the color, color index, line style, and weight border properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeBorder?: boolean; /** * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeFont?: boolean; /** * Specifies if the style includes the number format property. * * @remarks * [Api set: ExcelApi 1.7] */ includeNumber?: boolean; /** * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. * * @remarks * [Api set: ExcelApi 1.7] */ includePatterns?: boolean; /** * Specifies if the style includes the formula hidden and locked protection properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeProtection?: boolean; /** * An integer from 0 to 250 that indicates the indent level for the style. * * @remarks * [Api set: ExcelApi 1.7] */ indentLevel?: number; /** * Specifies if the object is locked when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ locked?: boolean; /** * The format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormat?: string; /** * The localized format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: string; /** * The reading order for the style. * * @remarks * [Api set: ExcelApi 1.7] */ readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.7] */ shrinkToFit?: boolean; /** * The text orientation for the style. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * Specifies if Excel wraps the text in the object. * * @remarks * [Api set: ExcelApi 1.7] */ wrapText?: boolean; } /** An interface for updating data on the StyleCollection object, for use in `styleCollection.set({ ... })`. */ interface StyleCollectionUpdateData { items?: Excel.Interfaces.StyleData[]; } /** An interface for updating data on the TableStyleCollection object, for use in `tableStyleCollection.set({ ... })`. */ interface TableStyleCollectionUpdateData { items?: Excel.Interfaces.TableStyleData[]; } /** An interface for updating data on the TableStyle object, for use in `tableStyle.set({ ... })`. */ interface TableStyleUpdateData { /** * Specifies the name of the table style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; } /** An interface for updating data on the PivotTableStyleCollection object, for use in `pivotTableStyleCollection.set({ ... })`. */ interface PivotTableStyleCollectionUpdateData { items?: Excel.Interfaces.PivotTableStyleData[]; } /** An interface for updating data on the PivotTableStyle object, for use in `pivotTableStyle.set({ ... })`. */ interface PivotTableStyleUpdateData { /** * Specifies the name of the PivotTable style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; } /** An interface for updating data on the SlicerStyleCollection object, for use in `slicerStyleCollection.set({ ... })`. */ interface SlicerStyleCollectionUpdateData { items?: Excel.Interfaces.SlicerStyleData[]; } /** An interface for updating data on the SlicerStyle object, for use in `slicerStyle.set({ ... })`. */ interface SlicerStyleUpdateData { /** * Specifies the name of the slicer style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; } /** An interface for updating data on the TimelineStyleCollection object, for use in `timelineStyleCollection.set({ ... })`. */ interface TimelineStyleCollectionUpdateData { items?: Excel.Interfaces.TimelineStyleData[]; } /** An interface for updating data on the TimelineStyle object, for use in `timelineStyle.set({ ... })`. */ interface TimelineStyleUpdateData { /** * Specifies the name of the timeline style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; } /** An interface for updating data on the PageLayout object, for use in `pageLayout.set({ ... })`. */ interface PageLayoutUpdateData { /** * Header and footer configuration for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ headersFooters?: Excel.Interfaces.HeaderFooterGroupUpdateData; /** * The worksheet's black and white print option. * * @remarks * [Api set: ExcelApi 1.9] */ blackAndWhite?: boolean; /** * The worksheet's bottom page margin to use for printing in points. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin?: number; /** * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerHorizontally?: boolean; /** * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerVertically?: boolean; /** * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. * * @remarks * [Api set: ExcelApi 1.9] */ draftMode?: boolean; /** * The worksheet's first page number to print. A `null` value represents "auto" page numbering. * * @remarks * [Api set: ExcelApi 1.9] */ firstPageNumber?: number | ""; /** * The worksheet's footer margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ footerMargin?: number; /** * The worksheet's header margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ headerMargin?: number; /** * The worksheet's left margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin?: number; /** * The worksheet's orientation of the page. * * @remarks * [Api set: ExcelApi 1.9] */ orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; /** * The worksheet's paper size of the page. * * @remarks * [Api set: ExcelApi 1.9] */ paperSize?: Excel.PaperType | "Letter" | "LetterSmall" | "Tabloid" | "Ledger" | "Legal" | "Statement" | "Executive" | "A3" | "A4" | "A4Small" | "A5" | "B4" | "B5" | "Folio" | "Quatro" | "Paper10x14" | "Paper11x17" | "Note" | "Envelope9" | "Envelope10" | "Envelope11" | "Envelope12" | "Envelope14" | "Csheet" | "Dsheet" | "Esheet" | "EnvelopeDL" | "EnvelopeC5" | "EnvelopeC3" | "EnvelopeC4" | "EnvelopeC6" | "EnvelopeC65" | "EnvelopeB4" | "EnvelopeB5" | "EnvelopeB6" | "EnvelopeItaly" | "EnvelopeMonarch" | "EnvelopePersonal" | "FanfoldUS" | "FanfoldStdGerman" | "FanfoldLegalGerman"; /** * Specifies if the worksheet's comments should be displayed when printing. * * @remarks * [Api set: ExcelApi 1.9] */ printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; /** * The worksheet's print errors option. * * @remarks * [Api set: ExcelApi 1.9] */ printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; /** * Specifies if the worksheet's gridlines will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printGridlines?: boolean; /** * Specifies if the worksheet's headings will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printHeadings?: boolean; /** * The worksheet's page print order option. This specifies the order to use for processing the page number printed. * * @remarks * [Api set: ExcelApi 1.9] */ printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; /** * The worksheet's right margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin?: number; /** * The worksheet's top margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin?: number; /** * The worksheet's print zoom options. The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). * * @remarks * [Api set: ExcelApi 1.9] */ zoom?: Excel.PageLayoutZoomOptions; } /** An interface for updating data on the HeaderFooter object, for use in `headerFooter.set({ ... })`. */ interface HeaderFooterUpdateData { /** * The center footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerFooter?: string; /** * The center header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerHeader?: string; /** * The left footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftFooter?: string; /** * The left header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftHeader?: string; /** * The right footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightFooter?: string; /** * The right header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightHeader?: string; } /** An interface for updating data on the HeaderFooterGroup object, for use in `headerFooterGroup.set({ ... })`. */ interface HeaderFooterGroupUpdateData { /** * The general header/footer, used for all pages unless even/odd or first page is specified. * * @remarks * [Api set: ExcelApi 1.9] */ defaultForAllPages?: Excel.Interfaces.HeaderFooterUpdateData; /** * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. * * @remarks * [Api set: ExcelApi 1.9] */ evenPages?: Excel.Interfaces.HeaderFooterUpdateData; /** * The first page header/footer, for all other pages general or even/odd is used. * * @remarks * [Api set: ExcelApi 1.9] */ firstPage?: Excel.Interfaces.HeaderFooterUpdateData; /** * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. * * @remarks * [Api set: ExcelApi 1.9] */ oddPages?: Excel.Interfaces.HeaderFooterUpdateData; /** * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. * * @remarks * [Api set: ExcelApi 1.9] */ state?: Excel.HeaderFooterState | "Default" | "FirstAndDefault" | "OddAndEven" | "FirstOddAndEven"; /** * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetMargins?: boolean; /** * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetScale?: boolean; } /** An interface for updating data on the PageBreakCollection object, for use in `pageBreakCollection.set({ ... })`. */ interface PageBreakCollectionUpdateData { items?: Excel.Interfaces.PageBreakData[]; } /** An interface for updating data on the RangeCollection object, for use in `rangeCollection.set({ ... })`. */ interface RangeCollectionUpdateData { items?: Excel.Interfaces.RangeData[]; } /** An interface for updating data on the RangeAreasCollection object, for use in `rangeAreasCollection.set({ ... })`. */ interface RangeAreasCollectionUpdateData { items?: Excel.Interfaces.RangeAreasData[]; } /** An interface for updating data on the CommentCollection object, for use in `commentCollection.set({ ... })`. */ interface CommentCollectionUpdateData { items?: Excel.Interfaces.CommentData[]; } /** An interface for updating data on the Comment object, for use in `comment.set({ ... })`. */ interface CommentUpdateData { /** * The comment's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: string; /** * The comment thread status. A value of `true` means that the comment thread is resolved. * * @remarks * [Api set: ExcelApi 1.11] */ resolved?: boolean; } /** An interface for updating data on the CommentReplyCollection object, for use in `commentReplyCollection.set({ ... })`. */ interface CommentReplyCollectionUpdateData { items?: Excel.Interfaces.CommentReplyData[]; } /** An interface for updating data on the CommentReply object, for use in `commentReply.set({ ... })`. */ interface CommentReplyUpdateData { /** * The comment reply's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: string; } /** An interface for updating data on the ShapeCollection object, for use in `shapeCollection.set({ ... })`. */ interface ShapeCollectionUpdateData { items?: Excel.Interfaces.ShapeData[]; } /** An interface for updating data on the Shape object, for use in `shape.set({ ... })`. */ interface ShapeUpdateData { /** * Returns the fill formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ fill?: Excel.Interfaces.ShapeFillUpdateData; /** * Returns the line formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ lineFormat?: Excel.Interfaces.ShapeLineFormatUpdateData; /** * Specifies the alternative description text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextDescription?: string; /** * Specifies the alternative title text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextTitle?: string; /** * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShapeType?: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ height?: number; /** * The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ left?: number; /** * Specifies if the aspect ratio of this shape is locked. * * @remarks * [Api set: ExcelApi 1.9] */ lockAspectRatio?: boolean; /** * Specifies the name of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ name?: string; /** * Represents how the object is attached to the cells below it. * * @remarks * [Api set: ExcelApi 1.10] */ placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; /** * Specifies the rotation, in degrees, of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ rotation?: number; /** * The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ top?: number; /** * Specifies if the shape is visible. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ width?: number; } /** An interface for updating data on the GroupShapeCollection object, for use in `groupShapeCollection.set({ ... })`. */ interface GroupShapeCollectionUpdateData { items?: Excel.Interfaces.ShapeData[]; } /** An interface for updating data on the Line object, for use in `line.set({ ... })`. */ interface LineUpdateData { /** * Represents the length of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; /** * Represents the style of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; /** * Represents the width of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; /** * Represents the length of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; /** * Represents the style of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; /** * Represents the width of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; /** * Represents the connector type for the line. * * @remarks * [Api set: ExcelApi 1.9] */ connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; } /** An interface for updating data on the ShapeFill object, for use in `shapeFill.set({ ... })`. */ interface ShapeFillUpdateData { /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.9] */ foregroundColor?: string; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: ExcelApi 1.9] */ transparency?: number; } /** An interface for updating data on the ShapeLineFormat object, for use in `shapeLineFormat.set({ ... })`. */ interface ShapeLineFormatUpdateData { /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ color?: string; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; /** * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. * * @remarks * [Api set: ExcelApi 1.9] */ transparency?: number; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: ExcelApi 1.9] */ weight?: number; } /** An interface for updating data on the TextFrame object, for use in `textFrame.set({ ... })`. */ interface TextFrameUpdateData { /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: ExcelApi 1.9] */ autoSizeSetting?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin?: number; /** * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalAlignment?: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; /** * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalOverflow?: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin?: number; /** * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. * * @remarks * [Api set: ExcelApi 1.9] */ orientation?: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; /** * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder?: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin?: number; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin?: number; /** * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalAlignment?: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; /** * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalOverflow?: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; } /** An interface for updating data on the TextRange object, for use in `textRange.set({ ... })`. */ interface TextRangeUpdateData { /** * Returns a `ShapeFont` object that represents the font attributes for the text range. * * @remarks * [Api set: ExcelApi 1.9] */ font?: Excel.Interfaces.ShapeFontUpdateData; /** * Represents the plain text content of the text range. * * @remarks * [Api set: ExcelApi 1.9] */ text?: string; } /** An interface for updating data on the ShapeFont object, for use in `shapeFont.set({ ... })`. */ interface ShapeFontUpdateData { /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: ExcelApi 1.9] */ color?: string; /** * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ italic?: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: ExcelApi 1.9] */ name?: string; /** * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. * * @remarks * [Api set: ExcelApi 1.9] */ size?: number; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; } /** An interface for updating data on the Slicer object, for use in `slicer.set({ ... })`. */ interface SlicerUpdateData { /** * Represents the worksheet containing the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ worksheet?: Excel.Interfaces.WorksheetUpdateData; /** * Represents the caption of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ caption?: string; /** * Represents the height, in points, of the slicer. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ height?: number; /** * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ left?: number; /** * Represents the name of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; /** * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". * * @remarks * [Api set: ExcelApi 1.10] */ sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; /** * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.10] */ style?: string; /** * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ top?: number; /** * Represents the width, in points, of the slicer. Throws an `InvalidArgument` error when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ width?: number; } /** An interface for updating data on the SlicerCollection object, for use in `slicerCollection.set({ ... })`. */ interface SlicerCollectionUpdateData { items?: Excel.Interfaces.SlicerData[]; } /** An interface for updating data on the SlicerItem object, for use in `slicerItem.set({ ... })`. */ interface SlicerItemUpdateData { /** * Value is `true` if the slicer item is selected. Setting this value will not clear the selected state of other slicer items. By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. * * @remarks * [Api set: ExcelApi 1.10] */ isSelected?: boolean; } /** An interface for updating data on the SlicerItemCollection object, for use in `slicerItemCollection.set({ ... })`. */ interface SlicerItemCollectionUpdateData { items?: Excel.Interfaces.SlicerItemData[]; } /** An interface for updating data on the NamedSheetView object, for use in `namedSheetView.set({ ... })`. */ interface NamedSheetViewUpdateData { /** * Gets or sets the name of the sheet view. The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. * * @remarks * [Api set: ExcelApiOnline 1.1] */ name?: string; } /** An interface for updating data on the NamedSheetViewCollection object, for use in `namedSheetViewCollection.set({ ... })`. */ interface NamedSheetViewCollectionUpdateData { items?: Excel.Interfaces.NamedSheetViewData[]; } /** An interface describing the data returned by calling `allowEditRange.toJSON()`. */ interface AllowEditRangeData { /** * Specifies the range associated with the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. * * @remarks * [Api set: ExcelApiOnline 1.1] */ address?: string; /** * Specifies if the object is password protected. * * @remarks * [Api set: ExcelApiOnline 1.1] */ isPasswordProtected?: boolean; /** * Specifies the title of the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. * * @remarks * [Api set: ExcelApiOnline 1.1] */ title?: string; } /** An interface describing the data returned by calling `allowEditRangeCollection.toJSON()`. */ interface AllowEditRangeCollectionData { items?: Excel.Interfaces.AllowEditRangeData[]; } /** An interface describing the data returned by calling `query.toJSON()`. */ interface QueryData { /** * Gets the query error message from when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ error?: Excel.QueryError | "Unknown" | "None" | "FailedLoadToWorksheet" | "FailedLoadToDataModel" | "FailedDownload" | "FailedToCompleteDownload"; /** * Gets the query loaded to object type. * * @remarks * [Api set: ExcelApi 1.14] */ loadedTo?: Excel.LoadToType | "ConnectionOnly" | "Table" | "PivotTable" | "PivotChart"; /** * Specifies if the query loaded to the data model. * * @remarks * [Api set: ExcelApi 1.14] */ loadedToDataModel?: boolean; /** * Gets the name of the query. Query names cannot contain periods or quotation marks. * * @remarks * [Api set: ExcelApi 1.14] */ name?: string; /** * Gets the date and time when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ refreshDate?: Date; /** * Gets the number of rows that were loaded when the query was last refreshed. If last refresh has errors the value will be -1. * * @remarks * [Api set: ExcelApi 1.14] */ rowsLoadedCount?: number; } /** An interface describing the data returned by calling `queryCollection.toJSON()`. */ interface QueryCollectionData { items?: Excel.Interfaces.QueryData[]; } /** An interface describing the data returned by calling `linkedWorkbook.toJSON()`. */ interface LinkedWorkbookData { /** * The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] */ id?: string; } /** An interface describing the data returned by calling `linkedWorkbookCollection.toJSON()`. */ interface LinkedWorkbookCollectionData { items?: Excel.Interfaces.LinkedWorkbookData[]; } /** An interface describing the data returned by calling `runtime.toJSON()`. */ interface RuntimeData { /** * Toggle JavaScript events in the current task pane or content add-in. * * @remarks * [Api set: ExcelApi 1.8] */ enableEvents?: boolean; } /** An interface describing the data returned by calling `application.toJSON()`. */ interface ApplicationData { /** * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. * * @remarks * [Api set: ExcelApi 1.11] */ cultureInfo?: Excel.Interfaces.CultureInfoData; /** * Returns the iterative calculation settings. In Excel on Windows and Mac, the settings will apply to the Excel Application. In Excel on the web and other platforms, the settings will apply to the active workbook. * * @remarks * [Api set: ExcelApi 1.9] */ iterativeCalculation?: Excel.Interfaces.IterativeCalculationData; /** * Returns the Excel calculation engine version used for the last full recalculation. * * @remarks * [Api set: ExcelApi 1.9] */ calculationEngineVersion?: number; /** * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. * * @remarks * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; /** * Returns the calculation state of the application. See `Excel.CalculationState` for details. * * @remarks * [Api set: ExcelApi 1.9] */ calculationState?: Excel.CalculationState | "Done" | "Calculating" | "Pending"; /** * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. * * @remarks * [Api set: ExcelApi 1.11] */ decimalSeparator?: string; /** * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. * * @remarks * [Api set: ExcelApi 1.11] */ thousandsSeparator?: string; /** * Specifies if the system separators of Excel are enabled. System separators include the decimal separator and thousands separator. * * @remarks * [Api set: ExcelApi 1.11] */ useSystemSeparators?: boolean; } /** An interface describing the data returned by calling `iterativeCalculation.toJSON()`. */ interface IterativeCalculationData { /** * True if Excel will use iteration to resolve circular references. * * @remarks * [Api set: ExcelApi 1.9] */ enabled?: boolean; /** * Specifies the maximum amount of change between each iteration as Excel resolves circular references. * * @remarks * [Api set: ExcelApi 1.9] */ maxChange?: number; /** * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. * * @remarks * [Api set: ExcelApi 1.9] */ maxIteration?: number; } /** An interface describing the data returned by calling `workbook.toJSON()`. */ interface WorkbookData { /** * Represents a collection of bindings that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ bindings?: Excel.Interfaces.BindingData[]; /** * Represents a collection of comments associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ comments?: Excel.Interfaces.CommentData[]; /** * Represents the collection of custom XML parts contained by this workbook. * * @remarks * [Api set: ExcelApi 1.5] */ customXmlParts?: Excel.Interfaces.CustomXmlPartData[]; /** * Represents a collection of workbook-scoped named items (named ranges and constants). * * @remarks * [Api set: ExcelApi 1.1] */ names?: Excel.Interfaces.NamedItemData[]; /** * Represents a collection of PivotTableStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ pivotTableStyles?: Excel.Interfaces.PivotTableStyleData[]; /** * Represents a collection of PivotTables associated with the workbook. * * @remarks * [Api set: ExcelApi 1.3] */ pivotTables?: Excel.Interfaces.PivotTableData[]; /** * Gets the workbook properties. * * @remarks * [Api set: ExcelApi 1.7] */ properties?: Excel.Interfaces.DocumentPropertiesData; /** * Returns the protection object for a workbook. * * @remarks * [Api set: ExcelApi 1.7] */ protection?: Excel.Interfaces.WorkbookProtectionData; /** * Represents a collection of settings associated with the workbook. * * @remarks * [Api set: ExcelApi 1.4] */ settings?: Excel.Interfaces.SettingData[]; /** * Represents a collection of SlicerStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ slicerStyles?: Excel.Interfaces.SlicerStyleData[]; /** * Represents a collection of slicers associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ slicers?: Excel.Interfaces.SlicerData[]; /** * Represents a collection of styles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ styles?: Excel.Interfaces.StyleData[]; /** * Represents a collection of TableStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ tableStyles?: Excel.Interfaces.TableStyleData[]; /** * Represents a collection of tables associated with the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableData[]; /** * Represents a collection of TimelineStyles associated with the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ timelineStyles?: Excel.Interfaces.TimelineStyleData[]; /** * Represents a collection of worksheets associated with the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ worksheets?: Excel.Interfaces.WorksheetData[]; /** * Specifies if the workbook is in AutoSave mode. * * @remarks * [Api set: ExcelApi 1.9] */ autoSave?: boolean; /** * Returns a number about the version of Excel Calculation Engine. * * @remarks * [Api set: ExcelApi 1.9] */ calculationEngineVersion?: number; /** * True if all charts in the workbook are tracking the actual data points to which they are attached. False if the charts track the index of the data points. * * @remarks * [Api set: ExcelApi 1.9] */ chartDataPointTrack?: boolean; /** * Specifies if changes have been made since the workbook was last saved. You can set this property to `true` if you want to close a modified workbook without either saving it or being prompted to save it. * * @remarks * [Api set: ExcelApi 1.9] */ isDirty?: boolean; /** * Gets the workbook name. * * @remarks * [Api set: ExcelApi 1.7] */ name?: string; /** * Specifies if the workbook has ever been saved locally or online. * * @remarks * [Api set: ExcelApi 1.9] */ previouslySaved?: boolean; /** * Returns `true` if the workbook is open in read-only mode. * * @remarks * [Api set: ExcelApi 1.8] */ readOnly?: boolean; /** * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. Data will permanently lose accuracy when switching this property from `false` to `true`. * * @remarks * [Api set: ExcelApi 1.9] */ usePrecisionAsDisplayed?: boolean; } /** An interface describing the data returned by calling `workbookProtection.toJSON()`. */ interface WorkbookProtectionData { /** * Specifies if the workbook is protected. * * @remarks * [Api set: ExcelApi 1.7] */ protected?: boolean; } /** An interface describing the data returned by calling `workbookCreated.toJSON()`. */ interface WorkbookCreatedData { } /** An interface describing the data returned by calling `worksheet.toJSON()`. */ interface WorksheetData { /** * Represents the `AutoFilter` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ autoFilter?: Excel.Interfaces.AutoFilterData; /** * Returns a collection of charts that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ charts?: Excel.Interfaces.ChartData[]; /** * Returns a collection of all the Comments objects on the worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ comments?: Excel.Interfaces.CommentData[]; /** * Gets a collection of worksheet-level custom properties. * * @remarks * [Api set: ExcelApi 1.12] */ customProperties?: Excel.Interfaces.WorksheetCustomPropertyData[]; /** * Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalPageBreaks?: Excel.Interfaces.PageBreakData[]; /** * Collection of names scoped to the current worksheet. * * @remarks * [Api set: ExcelApi 1.4] */ names?: Excel.Interfaces.NamedItemData[]; /** * Gets the `PageLayout` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ pageLayout?: Excel.Interfaces.PageLayoutData; /** * Collection of PivotTables that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.3] */ pivotTables?: Excel.Interfaces.PivotTableData[]; /** * Returns the sheet protection object for a worksheet. * * @remarks * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.WorksheetProtectionData; /** * Returns the collection of all the Shape objects on the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ shapes?: Excel.Interfaces.ShapeData[]; /** * Returns a collection of slicers that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ slicers?: Excel.Interfaces.SlicerData[]; /** * Collection of tables that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableData[]; /** * Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks. * * @remarks * [Api set: ExcelApi 1.9] */ verticalPageBreaks?: Excel.Interfaces.PageBreakData[]; /** * Determines if Excel should recalculate the worksheet when necessary. True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. * * @remarks * [Api set: ExcelApi 1.9] */ enableCalculation?: boolean; /** * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. * * @remarks * [Api set: ExcelApi 1.1] */ id?: string; /** * The display name of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * The zero-based position of the worksheet within the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ position?: number; /** * Specifies if gridlines are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showGridlines?: boolean; /** * Specifies if headings are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showHeadings?: boolean; /** * Returns the standard (default) height of all the rows in the worksheet, in points. * * @remarks * [Api set: ExcelApi 1.7] */ standardHeight?: number; /** * Specifies the standard (default) width of all the columns in the worksheet. One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. * * @remarks * [Api set: ExcelApi 1.7] */ standardWidth?: number; /** * The tab color of the worksheet. When retrieving the tab color, if the worksheet is invisible, the value will be `null`. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form #RRGGBB (e.g., "FFA500"). When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. * * @remarks * [Api set: ExcelApi 1.7] */ tabColor?: string; /** * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). * * @remarks * [Api set: ExcelApi 1.14] */ tabId?: number; /** * The visibility of the worksheet. * * @remarks * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] */ visibility?: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; } /** An interface describing the data returned by calling `worksheetCollection.toJSON()`. */ interface WorksheetCollectionData { items?: Excel.Interfaces.WorksheetData[]; } /** An interface describing the data returned by calling `worksheetProtection.toJSON()`. */ interface WorksheetProtectionData { /** * Specifies the `AllowEditRangeCollection` object found in this worksheet. This is a collection of `AllowEditRange` objects, which work with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ allowEditRanges?: Excel.Interfaces.AllowEditRangeData[]; /** * Specifies if protection can be paused for this worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ canPauseProtection?: boolean; /** * Specifies if the sheet is password protected. * * @remarks * [Api set: ExcelApiOnline 1.1] */ isPasswordProtected?: boolean; /** * Specifies if worksheet protection is paused. * * @remarks * [Api set: ExcelApiOnline 1.1] */ isPaused?: boolean; /** * Specifies the protection options for the worksheet. * * @remarks * [Api set: ExcelApi 1.2] */ options?: Excel.WorksheetProtectionOptions; /** * Specifies if the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.2] */ protected?: boolean; /** * Specifies the protection options saved in the worksheet. This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. * * @remarks * [Api set: ExcelApiOnline 1.1] */ savedOptions?: Excel.WorksheetProtectionOptions; } /** An interface describing the data returned by calling `range.toJSON()`. */ interface RangeData { /** * The collection of `ConditionalFormats` that intersect the range. * * @remarks * [Api set: ExcelApi 1.6] */ conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; /** * Returns a data validation object. * * @remarks * [Api set: ExcelApi 1.8] */ dataValidation?: Excel.Interfaces.DataValidationData; /** * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.RangeFormatData; /** * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). * * @remarks * [Api set: ExcelApi 1.1] */ address?: string; /** * Represents the range reference for the specified range in the language of the user. * * @remarks * [Api set: ExcelApi 1.1] */ addressLocal?: string; /** * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.1] */ cellCount?: number; /** * Specifies the total number of columns in the range. * * @remarks * [Api set: ExcelApi 1.1] */ columnCount?: number; /** * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ columnHidden?: boolean; /** * Specifies the column number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ columnIndex?: number; /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulas?: any[][]; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulasLocal?: any[][]; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.2] */ formulasR1C1?: any[][]; /** * Represents if all cells have a spill border. Returns `true` if all cells have a spill border, or `false` if all cells do not have a spill border. Returns `null` if there are cells both with and without spill borders within the range. * * @remarks * [Api set: ExcelApi 1.12] */ hasSpill?: boolean; /** * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ height?: number; /** * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ hidden?: boolean; /** * Represents the hyperlink for the current range. * * @remarks * [Api set: ExcelApi 1.7] */ hyperlink?: Excel.RangeHyperlink; /** * Represents if the current range is an entire column. * * @remarks * [Api set: ExcelApi 1.7] */ isEntireColumn?: boolean; /** * Represents if the current range is an entire row. * * @remarks * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; /** * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ left?: number; /** * Represents the data type state of each cell. * * @remarks * [Api set: ExcelApi 1.9] */ linkedDataTypeState?: Excel.LinkedDataTypeState[][]; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. * * @remarks * [Api set: ExcelApi 1.1] */ numberFormat?: any[][]; /** * Represents the category of number format of each cell. * * @remarks * [Api set: ExcelApi 1.12] */ numberFormatCategories?: Excel.NumberFormatCategory[][]; /** * Represents Excel's number format code for the given range, based on the language settings of the user. Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. Any returned text uses the locally-formatted strings based on the language specified in the system settings. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: any[][]; /** * Returns the total number of rows in the range. * * @remarks * [Api set: ExcelApi 1.1] */ rowCount?: number; /** * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ rowHidden?: boolean; /** * Returns the row number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ rowIndex?: number; /** * Represents if all the cells would be saved as an array formula. Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. Returns `null` if some cells would be saved as an array formula and some would not be. * * @remarks * [Api set: ExcelApi 1.12] */ savedAsArray?: boolean; /** * Represents the style of the current range. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ style?: string; /** * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.1] */ text?: string[][]; /** * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ top?: number; /** * Specifies the type of data in each cell. * * @remarks * [Api set: ExcelApi 1.1] */ valueTypes?: Excel.RangeValueType[][]; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: any[][]; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; /** * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ width?: number; } /** An interface describing the data returned by calling `rangeAreas.toJSON()`. */ interface RangeAreasData { /** * Returns a collection of rectangular ranges that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ areas?: Excel.Interfaces.RangeData[]; /** * Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; /** * Returns a data validation object for all ranges in the `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ dataValidation?: Excel.Interfaces.DataValidationData; /** * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.Interfaces.RangeFormatData; /** * Returns the `RangeAreas` reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). * * @remarks * [Api set: ExcelApi 1.9] */ address?: string; /** * Returns the `RangeAreas` reference in the user locale. * * @remarks * [Api set: ExcelApi 1.9] */ addressLocal?: string; /** * Returns the number of rectangular ranges that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ areaCount?: number; /** * Returns the number of cells in the `RangeAreas` object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.9] */ cellCount?: number; /** * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). * * @remarks * [Api set: ExcelApi 1.9] */ isEntireColumn?: boolean; /** * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). * * @remarks * [Api set: ExcelApi 1.9] */ isEntireRow?: boolean; /** * Represents the style for all ranges in this `RangeAreas` object. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.9] */ style?: string; } /** An interface describing the data returned by calling `workbookRangeAreas.toJSON()`. */ interface WorkbookRangeAreasData { /** * Returns the `RangeAreasCollection` object. Each `RangeAreas` in the collection represent one or more rectangle ranges in one worksheet. * * @remarks * [Api set: ExcelApi 1.12] */ areas?: Excel.Interfaces.RangeAreasData[]; /** * Returns ranges that comprise this object in a `RangeCollection` object. * * @remarks * [Api set: ExcelApi 1.12] */ ranges?: Excel.Interfaces.RangeData[]; /** * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. * * @remarks * [Api set: ExcelApi 1.12] */ addresses?: string[]; } /** An interface describing the data returned by calling `rangeView.toJSON()`. */ interface RangeViewData { /** * Represents a collection of range views associated with the range. * * @remarks * [Api set: ExcelApi 1.3] */ rows?: Excel.Interfaces.RangeViewData[]; /** * Represents the cell addresses of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ cellAddresses?: any[][]; /** * The number of visible columns. * * @remarks * [Api set: ExcelApi 1.3] */ columnCount?: number; /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulas?: any[][]; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasLocal?: any[][]; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasR1C1?: any[][]; /** * Returns a value that represents the index of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ index?: number; /** * Represents Excel's number format code for the given cell. * * @remarks * [Api set: ExcelApi 1.3] */ numberFormat?: any[][]; /** * The number of visible rows. * * @remarks * [Api set: ExcelApi 1.3] */ rowCount?: number; /** * Text values of the specified range. The text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.3] */ text?: string[][]; /** * Represents the type of data of each cell. * * @remarks * [Api set: ExcelApi 1.3] */ valueTypes?: Excel.RangeValueType[][]; /** * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. * * @remarks * [Api set: ExcelApi 1.3] */ values?: any[][]; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface describing the data returned by calling `rangeViewCollection.toJSON()`. */ interface RangeViewCollectionData { items?: Excel.Interfaces.RangeViewData[]; } /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ interface SettingCollectionData { items?: Excel.Interfaces.SettingData[]; } /** An interface describing the data returned by calling `setting.toJSON()`. */ interface SettingData { /** * The key that represents the ID of the setting. * * @remarks * [Api set: ExcelApi 1.4] */ key?: string; /** * Represents the value stored for this setting. * * @remarks * [Api set: ExcelApi 1.4] */ value?: any; } /** An interface describing the data returned by calling `namedItemCollection.toJSON()`. */ interface NamedItemCollectionData { items?: Excel.Interfaces.NamedItemData[]; } /** An interface describing the data returned by calling `namedItem.toJSON()`. */ interface NamedItemData { /** * Returns an object containing values and types of the named item. * * @remarks * [Api set: ExcelApi 1.7] */ arrayValues?: Excel.Interfaces.NamedItemArrayValuesData; /** * Specifies the comment associated with this name. * * @remarks * [Api set: ExcelApi 1.4] */ comment?: string; /** * The formula of the named item. Formulas always start with an equal sign ("="). * * @remarks * [Api set: ExcelApi 1.7] */ formula?: any; /** * The name of the object. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. * * @remarks * [Api set: ExcelApi 1.4] */ scope?: Excel.NamedItemScope | "Worksheet" | "Workbook"; /** * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. * * @remarks * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ type?: Excel.NamedItemType | "String" | "Integer" | "Double" | "Boolean" | "Range" | "Error" | "Array"; /** * Represents the value computed by the name's formula. For a named range, it will return the range address. This API returns the #VALUE! error in the Excel UI if it refers to a user-defined function. * * @remarks * [Api set: ExcelApi 1.1] */ value?: any; /** * A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJson?: CellValue | string; /** * A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJsonLocal?: CellValue | string; /** * Specifies if the object is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** An interface describing the data returned by calling `namedItemArrayValues.toJSON()`. */ interface NamedItemArrayValuesData { /** * Represents the types for each item in the named item array * * @remarks * [Api set: ExcelApi 1.7] */ types?: Excel.RangeValueType[][]; /** * Represents the values of each item in the named item array. * * @remarks * [Api set: ExcelApi 1.7] */ values?: any[][]; /** * A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface describing the data returned by calling `binding.toJSON()`. */ interface BindingData { /** * Represents the binding identifier. * * @remarks * [Api set: ExcelApi 1.1] */ id?: string; /** * Returns the type of the binding. See `Excel.BindingType` for details. * * @remarks * [Api set: ExcelApi 1.1] */ type?: Excel.BindingType | "Range" | "Table" | "Text"; } /** An interface describing the data returned by calling `bindingCollection.toJSON()`. */ interface BindingCollectionData { items?: Excel.Interfaces.BindingData[]; } /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ interface TableCollectionData { items?: Excel.Interfaces.TableData[]; } /** An interface describing the data returned by calling `tableScopedCollection.toJSON()`. */ interface TableScopedCollectionData { items?: Excel.Interfaces.TableData[]; } /** An interface describing the data returned by calling `table.toJSON()`. */ interface TableData { /** * Represents the `AutoFilter` object of the table. * * @remarks * [Api set: ExcelApi 1.9] */ autoFilter?: Excel.Interfaces.AutoFilterData; /** * Represents a collection of all the columns in the table. * * @remarks * [Api set: ExcelApi 1.1] */ columns?: Excel.Interfaces.TableColumnData[]; /** * Represents a collection of all the rows in the table. * * @remarks * [Api set: ExcelApi 1.1] */ rows?: Excel.Interfaces.TableRowData[]; /** * Represents the sorting for the table. * * @remarks * [Api set: ExcelApi 1.2] */ sort?: Excel.Interfaces.TableSortData; /** * Specifies if the first column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightFirstColumn?: boolean; /** * Specifies if the last column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightLastColumn?: boolean; /** * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. * * @remarks * [Api set: ExcelApi 1.1] */ id?: string; /** * Returns a numeric ID. * * @remarks * [Api set: ExcelApi 1.8] */ legacyId?: string; /** * Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedColumns?: boolean; /** * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedRows?: boolean; /** * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. * * @remarks * [Api set: ExcelApi 1.3] */ showFilterButton?: boolean; /** * Specifies if the header row is visible. This value can be set to show or remove the header row. * * @remarks * [Api set: ExcelApi 1.1] */ showHeaders?: boolean; /** * Specifies if the total row is visible. This value can be set to show or remove the total row. * * @remarks * [Api set: ExcelApi 1.1] */ showTotals?: boolean; /** * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.1] */ style?: string; } /** An interface describing the data returned by calling `tableColumnCollection.toJSON()`. */ interface TableColumnCollectionData { items?: Excel.Interfaces.TableColumnData[]; } /** An interface describing the data returned by calling `tableColumn.toJSON()`. */ interface TableColumnData { /** * Retrieves the filter applied to the column. * * @remarks * [Api set: ExcelApi 1.2] */ filter?: Excel.Interfaces.FilterData; /** * Returns a unique key that identifies the column within the table. * * @remarks * [Api set: ExcelApi 1.1] */ id?: number; /** * Returns the index number of the column within the columns collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ index?: number; /** * Specifies the name of the table column. * * @remarks * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] */ name?: string; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: any[][]; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ interface TableRowCollectionData { items?: Excel.Interfaces.TableRowData[]; } /** An interface describing the data returned by calling `tableRow.toJSON()`. */ interface TableRowData { /** * Returns the index number of the row within the rows collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ index?: number; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: any[][]; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: CellValue[][]; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: CellValue[][]; } /** An interface describing the data returned by calling `dataValidation.toJSON()`. */ interface DataValidationData { /** * Error alert when user enters invalid data. * * @remarks * [Api set: ExcelApi 1.8] */ errorAlert?: Excel.DataValidationErrorAlert; /** * Specifies if data validation will be performed on blank cells. Default is `true`. * * @remarks * [Api set: ExcelApi 1.8] */ ignoreBlanks?: boolean; /** * Prompt when users select a cell. * * @remarks * [Api set: ExcelApi 1.8] */ prompt?: Excel.DataValidationPrompt; /** * Data validation rule that contains different type of data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ rule?: Excel.DataValidationRule; /** * Type of the data validation, see `Excel.DataValidationType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ type?: Excel.DataValidationType | "None" | "WholeNumber" | "Decimal" | "List" | "Date" | "Time" | "TextLength" | "Custom" | "Inconsistent" | "MixedCriteria"; /** * Represents if all cell values are valid according to the data validation rules. Returns `true` if all cell values are valid, or `false` if all cell values are invalid. Returns `null` if there are both valid and invalid cell values within the range. * * @remarks * [Api set: ExcelApi 1.8] */ valid?: boolean; } /** An interface describing the data returned by calling `removeDuplicatesResult.toJSON()`. */ interface RemoveDuplicatesResultData { /** * Number of duplicated rows removed by the operation. * * @remarks * [Api set: ExcelApi 1.9] */ removed?: number; /** * Number of remaining unique rows present in the resulting range. * * @remarks * [Api set: ExcelApi 1.9] */ uniqueRemaining?: number; } /** An interface describing the data returned by calling `rangeFormat.toJSON()`. */ interface RangeFormatData { /** * Collection of border objects that apply to the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ borders?: Excel.Interfaces.RangeBorderData[]; /** * Returns the fill object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ fill?: Excel.Interfaces.RangeFillData; /** * Returns the font object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.RangeFontData; /** * Returns the format protection object for a range. * * @remarks * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.FormatProtectionData; /** * Specifies if text is automatically indented when text alignment is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.9] */ autoIndent?: boolean; /** * Specifies the width of all columns within the range. If the column widths are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ columnWidth?: number; /** * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * An integer from 0 to 250 that indicates the indent level. * * @remarks * [Api set: ExcelApi 1.9] */ indentLevel?: number; /** * The reading order for the range. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ rowHeight?: number; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.9] */ shrinkToFit?: boolean; /** * The text orientation of all the cells within the range. The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. If the orientation within a range are not uniform, then `null` will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation?: number; /** * Determines if the row height of the `Range` object equals the standard height of the sheet. Returns `true` if the row height of the `Range` object equals the standard height of the sheet. Returns `null` if the range contains more than one row and the rows aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardHeight?: boolean; /** * Specifies if the column width of the `Range` object equals the standard width of the sheet. Returns `true` if the column width of the `Range` object equals the standard width of the sheet. Returns `null` if the range contains more than one column and the columns aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardWidth?: boolean; /** * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting * * @remarks * [Api set: ExcelApi 1.1] */ wrapText?: boolean; } /** An interface describing the data returned by calling `formatProtection.toJSON()`. */ interface FormatProtectionData { /** * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. * * @remarks * [Api set: ExcelApi 1.2] */ formulaHidden?: boolean; /** * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. * * @remarks * [Api set: ExcelApi 1.2] */ locked?: boolean; } /** An interface describing the data returned by calling `rangeFill.toJSON()`. */ interface RangeFillData { /** * HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * The pattern of a range. See `Excel.FillPattern` for details. LinearGradient and RectangularGradient are not supported. A `null` value indicates that the entire range doesn't have a uniform pattern setting. * * @remarks * [Api set: ExcelApi 1.9] */ pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; /** * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ patternColor?: string; /** * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ patternTintAndShade?: number; /** * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; } /** An interface describing the data returned by calling `rangeBorder.toJSON()`. */ interface RangeBorderData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.1] */ sideIndex?: Excel.BorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight" | "InsideVertical" | "InsideHorizontal" | "DiagonalDown" | "DiagonalUp"; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; /** * Specifies a double that lightens or darkens a color for the range border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the border doesn't have a uniform `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; /** * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. * * @remarks * [Api set: ExcelApi 1.1] */ weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; } /** An interface describing the data returned by calling `rangeBorderCollection.toJSON()`. */ interface RangeBorderCollectionData { items?: Excel.Interfaces.RangeBorderData[]; } /** An interface describing the data returned by calling `rangeFont.toJSON()`. */ interface RangeFontData { /** * Represents the bold status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * Specifies the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic?: boolean; /** * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Font size. * * @remarks * [Api set: ExcelApi 1.1] */ size?: number; /** * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. * * @remarks * [Api set: ExcelApi 1.9] */ strikethrough?: boolean; /** * Specifies the subscript status of font. Returns `true` if all the fonts of the range are subscript. Returns `false` if all the fonts of the range are superscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ subscript?: boolean; /** * Specifies the superscript status of font. Returns `true` if all the fonts of the range are superscript. Returns `false` if all the fonts of the range are subscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ superscript?: boolean; /** * Specifies a double that lightens or darkens a color for the range font. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the entire range doesn't have a uniform font `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: number; /** * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; } /** An interface describing the data returned by calling `chartCollection.toJSON()`. */ interface ChartCollectionData { items?: Excel.Interfaces.ChartData[]; } /** An interface describing the data returned by calling `chart.toJSON()`. */ interface ChartData { /** * Represents chart axes. * * @remarks * [Api set: ExcelApi 1.1] */ axes?: Excel.Interfaces.ChartAxesData; /** * Represents the data labels on the chart. * * @remarks * [Api set: ExcelApi 1.1] */ dataLabels?: Excel.Interfaces.ChartDataLabelsData; /** * Encapsulates the format properties for the chart area. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAreaFormatData; /** * Represents the legend for the chart. * * @remarks * [Api set: ExcelApi 1.1] */ legend?: Excel.Interfaces.ChartLegendData; /** * Encapsulates the options for a pivot chart. * * @remarks * [Api set: ExcelApi 1.9] */ pivotOptions?: Excel.Interfaces.ChartPivotOptionsData; /** * Represents the plot area for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotArea?: Excel.Interfaces.ChartPlotAreaData; /** * Represents either a single series or collection of series in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ series?: Excel.Interfaces.ChartSeriesData[]; /** * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * @remarks * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartTitleData; /** * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. * * @remarks * [Api set: ExcelApi 1.8] */ categoryLabelLevel?: number; /** * Specifies the type of the chart. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; /** * Specifies the way that blank cells are plotted on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; /** * Specifies the height, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ height?: number; /** * The unique ID of chart. * * @remarks * [Api set: ExcelApi 1.7] */ id?: string; /** * The distance, in points, from the left side of the chart to the worksheet origin. * * @remarks * [Api set: ExcelApi 1.1] */ left?: number; /** * Specifies the name of a chart object. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Specifies the way columns or rows are used as data series on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotBy?: Excel.ChartPlotBy | "Rows" | "Columns"; /** * True if only visible cells are plotted. False if both visible and hidden cells are plotted. * * @remarks * [Api set: ExcelApi 1.8] */ plotVisibleOnly?: boolean; /** * Specifies a chart series name level enumeration constant, referring to the level of the source series names. * * @remarks * [Api set: ExcelApi 1.8] */ seriesNameLevel?: number; /** * Specifies whether to display all field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.7] */ showAllFieldButtons?: boolean; /** * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * * @remarks * [Api set: ExcelApi 1.8] */ showDataLabelsOverMaximum?: boolean; /** * Specifies the chart style for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ style?: number; /** * Specifies the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). * * @remarks * [Api set: ExcelApi 1.1] */ top?: number; /** * Specifies the width, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ width?: number; } /** An interface describing the data returned by calling `chartPivotOptions.toJSON()`. */ interface ChartPivotOptionsData { /** * Specifies whether to display the axis field buttons on a PivotChart. The `showAxisFieldButtons` property corresponds to the "Show Axis Field Buttons" command on the "Field Buttons" drop-down list of the "Analyze" tab, which is available when a PivotChart is selected. * * @remarks * [Api set: ExcelApi 1.9] */ showAxisFieldButtons?: boolean; /** * Specifies whether to display the legend field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showLegendFieldButtons?: boolean; /** * Specifies whether to display the report filter field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showReportFilterFieldButtons?: boolean; /** * Specifies whether to display the show value field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showValueFieldButtons?: boolean; } /** An interface describing the data returned by calling `chartAreaFormat.toJSON()`. */ interface ChartAreaFormatData { /** * Represents the border format of chart area, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderData; /** * Represents the font attributes (font name, font size, color, etc.) for the current object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontData; /** * Specifies the color scheme of the chart. * * @remarks * [Api set: ExcelApi 1.9] */ colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; /** * Specifies if the chart area of the chart has rounded corners. * * @remarks * [Api set: ExcelApi 1.9] */ roundedCorners?: boolean; } /** An interface describing the data returned by calling `chartSeriesCollection.toJSON()`. */ interface ChartSeriesCollectionData { items?: Excel.Interfaces.ChartSeriesData[]; } /** An interface describing the data returned by calling `chartSeries.toJSON()`. */ interface ChartSeriesData { /** * Encapsulates the bin options for histogram charts and pareto charts. * * @remarks * [Api set: ExcelApi 1.9] */ binOptions?: Excel.Interfaces.ChartBinOptionsData; /** * Encapsulates the options for the box and whisker charts. * * @remarks * [Api set: ExcelApi 1.9] */ boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsData; /** * Represents a collection of all data labels in the series. * * @remarks * [Api set: ExcelApi 1.8] */ dataLabels?: Excel.Interfaces.ChartDataLabelsData; /** * Represents the formatting of a chart series, which includes fill and line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartSeriesFormatData; /** * Encapsulates the options for a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ mapOptions?: Excel.Interfaces.ChartMapOptionsData; /** * Returns a collection of all points in the series. * * @remarks * [Api set: ExcelApi 1.1] */ points?: Excel.Interfaces.ChartPointData[]; /** * The collection of trendlines in the series. * * @remarks * [Api set: ExcelApi 1.7] */ trendlines?: Excel.Interfaces.ChartTrendlineData[]; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ xErrorBars?: Excel.Interfaces.ChartErrorBarsData; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ yErrorBars?: Excel.Interfaces.ChartErrorBarsData; /** * Specifies the group for the specified series. * * @remarks * [Api set: ExcelApi 1.8] */ axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; /** * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. * * @remarks * [Api set: ExcelApi 1.9] */ bubbleScale?: number; /** * Represents the chart type of a series. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; /** * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws an `InvalidArgument` error on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ doughnutHoleSize?: number; /** * Specifies the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). * * @remarks * [Api set: ExcelApi 1.8] */ explosion?: number; /** * Specifies if the series is filtered. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ filtered?: boolean; /** * Specifies the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. * * @remarks * [Api set: ExcelApi 1.8] */ firstSliceAngle?: number; /** * Represents the gap width of a chart series. Only valid on bar and column charts, as well as specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ gapWidth?: number; /** * Specifies the color for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumColor?: string; /** * Specifies the type for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumValue?: number; /** * Specifies the color for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointColor?: string; /** * Specifies the type for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointValue?: number; /** * Specifies the color for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumColor?: string; /** * Specifies the type for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; /** * Specifies the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumValue?: number; /** * Specifies the series gradient style of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; /** * Specifies if the series has data labels. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; /** * Specifies the fill color for negative data points in a series. * * @remarks * [Api set: ExcelApi 1.9] */ invertColor?: string; /** * True if Excel inverts the pattern in the item when it corresponds to a negative number. * * @remarks * [Api set: ExcelApi 1.8] */ invertIfNegative?: boolean; /** * Specifies the marker background color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: string; /** * Specifies the marker foreground color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: string; /** * Specifies the marker size of a chart series. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: number; /** * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; /** * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Specifies how bars and columns are positioned. Can be a value between -100 and 100. Applies only to 2-D bar and 2-D column charts. * * @remarks * [Api set: ExcelApi 1.8] */ overlap?: number; /** * Specifies the series parent label strategy area for a treemap chart. * * @remarks * [Api set: ExcelApi 1.9] */ parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; /** * Specifies the plot order of a chart series within the chart group. * * @remarks * [Api set: ExcelApi 1.7] */ plotOrder?: number; /** * Specifies the size of the secondary section of either a pie-of-pie chart or a bar-of-pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. * * @remarks * [Api set: ExcelApi 1.8] */ secondPlotSize?: number; /** * Specifies whether connector lines are shown in waterfall charts. * * @remarks * [Api set: ExcelApi 1.9] */ showConnectorLines?: boolean; /** * Specifies whether leader lines are displayed for each data label in the series. * * @remarks * [Api set: ExcelApi 1.9] */ showLeaderLines?: boolean; /** * Specifies if the series has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies if the series is smooth. Only applicable to line and scatter charts. * * @remarks * [Api set: ExcelApi 1.7] */ smooth?: boolean; /** * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. * * @remarks * [Api set: ExcelApi 1.8] */ splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; /** * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. * * @remarks * [Api set: ExcelApi 1.9] */ splitValue?: number; /** * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. * * @remarks * [Api set: ExcelApi 1.8] */ varyByCategories?: boolean; } /** An interface describing the data returned by calling `chartSeriesFormat.toJSON()`. */ interface ChartSeriesFormatData { /** * Represents line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatData; } /** An interface describing the data returned by calling `chartPointsCollection.toJSON()`. */ interface ChartPointsCollectionData { items?: Excel.Interfaces.ChartPointData[]; } /** An interface describing the data returned by calling `chartPoint.toJSON()`. */ interface ChartPointData { /** * Returns the data label of a chart point. * * @remarks * [Api set: ExcelApi 1.7] */ dataLabel?: Excel.Interfaces.ChartDataLabelData; /** * Encapsulates the format properties chart point. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartPointFormatData; /** * Represents whether a data point has a data label. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabel?: boolean; /** * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: string; /** * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: string; /** * Represents marker size of a data point. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: number; /** * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; /** * Returns the value of a chart point. * * @remarks * [Api set: ExcelApi 1.1] */ value?: any; } /** An interface describing the data returned by calling `chartPointFormat.toJSON()`. */ interface ChartPointFormatData { /** * Represents the border format of a chart data point, which includes color, style, and weight information. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderData; } /** An interface describing the data returned by calling `chartAxes.toJSON()`. */ interface ChartAxesData { /** * Represents the category axis in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ categoryAxis?: Excel.Interfaces.ChartAxisData; /** * Represents the series axis of a 3-D chart. * * @remarks * [Api set: ExcelApi 1.1] */ seriesAxis?: Excel.Interfaces.ChartAxisData; /** * Represents the value axis in an axis. * * @remarks * [Api set: ExcelApi 1.1] */ valueAxis?: Excel.Interfaces.ChartAxisData; } /** An interface describing the data returned by calling `chartAxis.toJSON()`. */ interface ChartAxisData { /** * Represents the formatting of a chart object, which includes line and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAxisFormatData; /** * Returns an object that represents the major gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ majorGridlines?: Excel.Interfaces.ChartGridlinesData; /** * Returns an object that represents the minor gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ minorGridlines?: Excel.Interfaces.ChartGridlinesData; /** * Represents the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartAxisTitleData; /** * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. * * @remarks * [Api set: ExcelApi 1.8] */ alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; /** * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. * * @remarks * [Api set: ExcelApi 1.7] */ axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; /** * Specifies the base unit for the specified category axis. * * @remarks * [Api set: ExcelApi 1.7] */ baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Specifies the category axis type. * * @remarks * [Api set: ExcelApi 1.7] */ categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; /** * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. * * @remarks * [Api set: ExcelApi 1.7] */ customDisplayUnit?: number; /** * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. * * @remarks * [Api set: ExcelApi 1.7] */ displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; /** * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height?: number; /** * Specifies if the value axis crosses the category axis between categories. * * @remarks * [Api set: ExcelApi 1.8] */ isBetweenCategories?: boolean; /** * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: number; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * Specifies the base of the logarithm when using logarithmic scales. * * @remarks * [Api set: ExcelApi 1.7] */ logBase?: number; /** * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; /** * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ majorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ majorUnit?: any; /** * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ maximum?: any; /** * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minimum?: any; /** * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; /** * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ minorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; /** * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minorUnit?: any; /** * Specifies if an axis is multilevel. * * @remarks * [Api set: ExcelApi 1.8] */ multiLevel?: boolean; /** * Specifies the format code for the axis tick label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. * * @remarks * [Api set: ExcelApi 1.8] */ offset?: number; /** * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. * * @remarks * [Api set: ExcelApi 1.8] */ position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; /** * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. * * @remarks * [Api set: ExcelApi 1.8] */ positionAt?: number; /** * Specifies if Excel plots data points from last to first. * * @remarks * [Api set: ExcelApi 1.7] */ reversePlotOrder?: boolean; /** * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; /** * Specifies if the axis display unit label is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showDisplayUnitLabel?: boolean; /** * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: any; /** * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; /** * Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelSpacing?: any; /** * Specifies the number of categories or series between tick marks. * * @remarks * [Api set: ExcelApi 1.7] */ tickMarkSpacing?: number; /** * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ top?: number; /** * Specifies the axis type. See `Excel.ChartAxisType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type?: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; /** * Specifies if the axis is visible. * * @remarks * [Api set: ExcelApi 1.7] */ visible?: boolean; /** * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width?: number; } /** An interface describing the data returned by calling `chartAxisFormat.toJSON()`. */ interface ChartAxisFormatData { /** * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontData; /** * Specifies chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatData; } /** An interface describing the data returned by calling `chartAxisTitle.toJSON()`. */ interface ChartAxisTitleData { /** * Specifies the formatting of the chart axis title. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAxisTitleFormatData; /** * Specifies the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ text?: string; /** * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.12] */ textOrientation?: number; /** * Specifies if the axis title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** An interface describing the data returned by calling `chartAxisTitleFormat.toJSON()`. */ interface ChartAxisTitleFormatData { /** * Specifies the chart axis title's border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderData; /** * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontData; } /** An interface describing the data returned by calling `chartDataLabels.toJSON()`. */ interface ChartDataLabelsData { /** * Specifies the format of chart data labels, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartDataLabelFormatData; /** * Specifies if data labels automatically generate appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when the `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * Specifies the format code for data labels. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; /** * String representing the separator used for the data labels on a chart. * * @remarks * [Api set: ExcelApi 1.1] */ separator?: string; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showBubbleSize?: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showCategoryName?: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showLegendKey?: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showPercentage?: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showSeriesName?: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showValue?: boolean; /** * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of the data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; } /** An interface describing the data returned by calling `chartDataLabel.toJSON()`. */ interface ChartDataLabelData { /** * Represents the format of chart data label. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartDataLabelFormatData; /** * Specifies if the data label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * String value that represents the formula of chart data label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula?: string; /** * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ height?: number; /** * Represents the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left?: number; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * String value that represents the format code for data label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; /** * String representing the separator used for the data label on a chart. * * @remarks * [Api set: ExcelApi 1.7] */ separator?: string; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showBubbleSize?: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showCategoryName?: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showLegendKey?: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showPercentage?: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showSeriesName?: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showValue?: boolean; /** * String representing the text of the data label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text?: string; /** * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top?: number; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ width?: number; } /** An interface describing the data returned by calling `chartDataLabelFormat.toJSON()`. */ interface ChartDataLabelFormatData { /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderData; /** * Represents the font attributes (such as font name, font size, and color) for a chart data label. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontData; } /** An interface describing the data returned by calling `chartDataTable.toJSON()`. */ interface ChartDataTableData { /** * Represents the format of a chart data table, which includes fill, font, and border format. * * @remarks * [Api set: ExcelApi 1.14] */ format?: Excel.Interfaces.ChartDataTableFormatData; /** * Specifies whether to display the horizontal border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showHorizontalBorder?: boolean; /** * Specifies whether to show the legend key of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showLegendKey?: boolean; /** * Specifies whether to display the outline border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showOutlineBorder?: boolean; /** * Specifies whether to display the vertical border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showVerticalBorder?: boolean; /** * Specifies whether to show the data table of the chart. * * @remarks * [Api set: ExcelApi 1.14] */ visible?: boolean; } /** An interface describing the data returned by calling `chartDataTableFormat.toJSON()`. */ interface ChartDataTableFormatData { /** * Represents the border format of chart data table, which includes color, line style, and weight. * * @remarks * [Api set: ExcelApi 1.14] */ border?: Excel.Interfaces.ChartBorderData; /** * Represents the font attributes (such as font name, font size, and color) for the current object. * * @remarks * [Api set: ExcelApi 1.14] */ font?: Excel.Interfaces.ChartFontData; } /** An interface describing the data returned by calling `chartErrorBars.toJSON()`. */ interface ChartErrorBarsData { /** * Specifies the formatting type of the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.Interfaces.ChartErrorBarsFormatData; /** * Specifies if error bars have an end style cap. * * @remarks * [Api set: ExcelApi 1.9] */ endStyleCap?: boolean; /** * Specifies which parts of the error bars to include. * * @remarks * [Api set: ExcelApi 1.9] */ include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; /** * The type of range marked by the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; /** * Specifies whether the error bars are displayed. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; } /** An interface describing the data returned by calling `chartErrorBarsFormat.toJSON()`. */ interface ChartErrorBarsFormatData { /** * Represents the chart line formatting. * * @remarks * [Api set: ExcelApi 1.9] */ line?: Excel.Interfaces.ChartLineFormatData; } /** An interface describing the data returned by calling `chartGridlines.toJSON()`. */ interface ChartGridlinesData { /** * Represents the formatting of chart gridlines. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartGridlinesFormatData; /** * Specifies if the axis gridlines are visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** An interface describing the data returned by calling `chartGridlinesFormat.toJSON()`. */ interface ChartGridlinesFormatData { /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatData; } /** An interface describing the data returned by calling `chartLegend.toJSON()`. */ interface ChartLegendData { /** * Represents the formatting of a chart legend, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartLegendFormatData; /** * Represents a collection of legendEntries in the legend. * * @remarks * [Api set: ExcelApi 1.7] */ legendEntries?: Excel.Interfaces.ChartLegendEntryData[]; /** * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height?: number; /** * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: number; /** * Specifies if the chart legend should overlap with the main body of the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay?: boolean; /** * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; /** * Specifies if the legend has a shadow on the chart. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies the top of a chart legend. * * @remarks * [Api set: ExcelApi 1.7] */ top?: number; /** * Specifies if the chart legend is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; /** * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width?: number; } /** An interface describing the data returned by calling `chartLegendEntry.toJSON()`. */ interface ChartLegendEntryData { /** * Specifies the height of the legend entry on the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ height?: number; /** * Specifies the index of the legend entry in the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ index?: number; /** * Specifies the left value of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ left?: number; /** * Specifies the top of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ top?: number; /** * Represents the visibility of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.7] */ visible?: boolean; /** * Represents the width of the legend entry on the chart Legend. * * @remarks * [Api set: ExcelApi 1.8] */ width?: number; } /** An interface describing the data returned by calling `chartLegendEntryCollection.toJSON()`. */ interface ChartLegendEntryCollectionData { items?: Excel.Interfaces.ChartLegendEntryData[]; } /** An interface describing the data returned by calling `chartLegendFormat.toJSON()`. */ interface ChartLegendFormatData { /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderData; /** * Represents the font attributes such as font name, font size, and color of a chart legend. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontData; } /** An interface describing the data returned by calling `chartMapOptions.toJSON()`. */ interface ChartMapOptionsData { /** * Specifies the series map labels strategy of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; /** * Specifies the series mapping level of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; /** * Specifies the series projection type of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; } /** An interface describing the data returned by calling `chartTitle.toJSON()`. */ interface ChartTitleData { /** * Represents the formatting of a chart title, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartTitleFormatData; /** * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height?: number; /** * Specifies the horizontal alignment for chart title. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: number; /** * Specifies if the chart title will overlay the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay?: boolean; /** * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position?: Excel.ChartTitlePosition | "Automatic" | "Top" | "Bottom" | "Left" | "Right"; /** * Represents a boolean value that determines if the chart title has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies the chart's title text. * * @remarks * [Api set: ExcelApi 1.1] */ text?: string; /** * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation?: number; /** * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ top?: number; /** * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Specifies if the chart title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; /** * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width?: number; } /** An interface describing the data returned by calling `chartFormatString.toJSON()`. */ interface ChartFormatStringData { /** * Represents the font attributes, such as font name, font size, and color of a chart characters object. * * @remarks * [Api set: ExcelApi 1.7] */ font?: Excel.Interfaces.ChartFontData; } /** An interface describing the data returned by calling `chartTitleFormat.toJSON()`. */ interface ChartTitleFormatData { /** * Represents the border format of chart title, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderData; /** * Represents the font attributes (such as font name, font size, and color) for an object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontData; } /** An interface describing the data returned by calling `chartBorder.toJSON()`. */ interface ChartBorderData { /** * HTML color code representing the color of borders in the chart. * * @remarks * [Api set: ExcelApi 1.7] */ color?: string; /** * Represents the line style of the border. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; /** * Represents weight of the border, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight?: number; } /** An interface describing the data returned by calling `chartBinOptions.toJSON()`. */ interface ChartBinOptionsData { /** * Specifies if bin overflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowOverflow?: boolean; /** * Specifies if bin underflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowUnderflow?: boolean; /** * Specifies the bin count of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ count?: number; /** * Specifies the bin overflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ overflowValue?: number; /** * Specifies the bin's type for a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; /** * Specifies the bin underflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ underflowValue?: number; /** * Specifies the bin width value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ width?: number; } /** An interface describing the data returned by calling `chartBoxwhiskerOptions.toJSON()`. */ interface ChartBoxwhiskerOptionsData { /** * Specifies if the quartile calculation type of a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; /** * Specifies if inner points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showInnerPoints?: boolean; /** * Specifies if the mean line is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanLine?: boolean; /** * Specifies if the mean marker is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanMarker?: boolean; /** * Specifies if outlier points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showOutlierPoints?: boolean; } /** An interface describing the data returned by calling `chartLineFormat.toJSON()`. */ interface ChartLineFormatData { /** * HTML color code representing the color of lines in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * Represents the line style. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; /** * Represents weight of the line, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight?: number; } /** An interface describing the data returned by calling `chartFont.toJSON()`. */ interface ChartFontData { /** * Represents the bold status of font. * * @remarks * [Api set: ExcelApi 1.1] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color?: string; /** * Represents the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic?: boolean; /** * Font name (e.g., "Calibri") * * @remarks * [Api set: ExcelApi 1.1] */ name?: string; /** * Size of the font (e.g., 11) * * @remarks * [Api set: ExcelApi 1.1] */ size?: number; /** * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline?: Excel.ChartUnderlineStyle | "None" | "Single"; } /** An interface describing the data returned by calling `chartTrendline.toJSON()`. */ interface ChartTrendlineData { /** * Represents the formatting of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ format?: Excel.Interfaces.ChartTrendlineFormatData; /** * Represents the label of a chart trendline. * * @remarks * [Api set: ExcelApi 1.8] */ label?: Excel.Interfaces.ChartTrendlineLabelData; /** * Represents the number of periods that the trendline extends backward. * * @remarks * [Api set: ExcelApi 1.8] */ backwardPeriod?: number; /** * Represents the number of periods that the trendline extends forward. * * @remarks * [Api set: ExcelApi 1.8] */ forwardPeriod?: number; /** * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ intercept?: any; /** * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. * * @remarks * [Api set: ExcelApi 1.7] */ movingAveragePeriod?: number; /** * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string * * @remarks * [Api set: ExcelApi 1.7] */ name?: string; /** * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. * * @remarks * [Api set: ExcelApi 1.7] */ polynomialOrder?: number; /** * True if the equation for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showEquation?: boolean; /** * True if the r-squared value for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showRSquared?: boolean; /** * Represents the type of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ type?: Excel.ChartTrendlineType | "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"; } /** An interface describing the data returned by calling `chartTrendlineCollection.toJSON()`. */ interface ChartTrendlineCollectionData { items?: Excel.Interfaces.ChartTrendlineData[]; } /** An interface describing the data returned by calling `chartTrendlineFormat.toJSON()`. */ interface ChartTrendlineFormatData { /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.7] */ line?: Excel.Interfaces.ChartLineFormatData; } /** An interface describing the data returned by calling `chartTrendlineLabel.toJSON()`. */ interface ChartTrendlineLabelData { /** * The format of the chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartTrendlineLabelFormatData; /** * Specifies if the trendline label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * String value that represents the formula of the chart trendline label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula?: string; /** * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ height?: number; /** * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; /** * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left?: number; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * String value that represents the format code for the trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * String representing the text of the trendline label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text?: string; /** * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top?: number; /** * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ width?: number; } /** An interface describing the data returned by calling `chartTrendlineLabelFormat.toJSON()`. */ interface ChartTrendlineLabelFormatData { /** * Specifies the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderData; /** * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ font?: Excel.Interfaces.ChartFontData; } /** An interface describing the data returned by calling `chartPlotArea.toJSON()`. */ interface ChartPlotAreaData { /** * Specifies the formatting of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartPlotAreaFormatData; /** * Specifies the height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ height?: number; /** * Specifies the inside height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideHeight?: number; /** * Specifies the inside left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideLeft?: number; /** * Specifies the inside top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideTop?: number; /** * Specifies the inside width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideWidth?: number; /** * Specifies the left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ left?: number; /** * Specifies the position of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; /** * Specifies the top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ top?: number; /** * Specifies the width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ width?: number; } /** An interface describing the data returned by calling `chartPlotAreaFormat.toJSON()`. */ interface ChartPlotAreaFormatData { /** * Specifies the border attributes of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderData; } /** An interface describing the data returned by calling `tableSort.toJSON()`. */ interface TableSortData { /** * Specifies the current conditions used to last sort the table. * * @remarks * [Api set: ExcelApi 1.2] */ fields?: Excel.SortField[]; /** * Specifies if the casing impacts the last sort of the table. * * @remarks * [Api set: ExcelApi 1.2] */ matchCase?: boolean; /** * Represents the Chinese character ordering method last used to sort the table. * * @remarks * [Api set: ExcelApi 1.2] */ method?: Excel.SortMethod | "PinYin" | "StrokeCount"; } /** An interface describing the data returned by calling `filter.toJSON()`. */ interface FilterData { /** * The currently applied filter on the given column. * * @remarks * [Api set: ExcelApi 1.2] */ criteria?: Excel.FilterCriteria; } /** An interface describing the data returned by calling `autoFilter.toJSON()`. */ interface AutoFilterData { /** * An array that holds all the filter criteria in the autofiltered range. * * @remarks * [Api set: ExcelApi 1.9] */ criteria?: Excel.FilterCriteria[]; /** * Specifies if the AutoFilter is enabled. * * @remarks * [Api set: ExcelApi 1.9] */ enabled?: boolean; /** * Specifies if the AutoFilter has filter criteria. * * @remarks * [Api set: ExcelApi 1.9] */ isDataFiltered?: boolean; } /** An interface describing the data returned by calling `cultureInfo.toJSON()`. */ interface CultureInfoData { /** * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.12] */ datetimeFormat?: Excel.Interfaces.DatetimeFormatInfoData; /** * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.11] */ numberFormat?: Excel.Interfaces.NumberFormatInfoData; /** * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ name?: string; } /** An interface describing the data returned by calling `numberFormatInfo.toJSON()`. */ interface NumberFormatInfoData { /** * Gets the currency symbol for currency values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.17] */ currencySymbol?: string; /** * Gets the string used as the decimal separator for numeric values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ numberDecimalSeparator?: string; /** * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ numberGroupSeparator?: string; } /** An interface describing the data returned by calling `datetimeFormatInfo.toJSON()`. */ interface DatetimeFormatInfoData { /** * Gets the string used as the date separator. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ dateSeparator?: string; /** * Gets the format string for a long date value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ longDatePattern?: string; /** * Gets the format string for a long time value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ longTimePattern?: string; /** * Gets the format string for a short date value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ shortDatePattern?: string; /** * Gets the string used as the time separator. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ timeSeparator?: string; } /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ interface CustomXmlPartScopedCollectionData { items?: Excel.Interfaces.CustomXmlPartData[]; } /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ interface CustomXmlPartCollectionData { items?: Excel.Interfaces.CustomXmlPartData[]; } /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ interface CustomXmlPartData { /** * The custom XML part's ID. * * @remarks * [Api set: ExcelApi 1.5] */ id?: string; /** * The custom XML part's namespace URI. * * @remarks * [Api set: ExcelApi 1.5] */ namespaceUri?: string; } /** An interface describing the data returned by calling `pivotTableScopedCollection.toJSON()`. */ interface PivotTableScopedCollectionData { items?: Excel.Interfaces.PivotTableData[]; } /** An interface describing the data returned by calling `pivotTableCollection.toJSON()`. */ interface PivotTableCollectionData { items?: Excel.Interfaces.PivotTableData[]; } /** An interface describing the data returned by calling `pivotTable.toJSON()`. */ interface PivotTableData { /** * The Column Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ columnHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; /** * The Data Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ dataHierarchies?: Excel.Interfaces.DataPivotHierarchyData[]; /** * The Filter Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ filterHierarchies?: Excel.Interfaces.FilterPivotHierarchyData[]; /** * The Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ hierarchies?: Excel.Interfaces.PivotHierarchyData[]; /** * The Row Pivot Hierarchies of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ rowHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; /** * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. * * @remarks * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * * @remarks * [Api set: ExcelApi 1.9] */ enableDataValueEditing?: boolean; /** * ID of the PivotTable. * * @remarks * [Api set: ExcelApi 1.5] */ id?: string; /** * Name of the PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ name?: string; /** * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. * * @remarks * [Api set: ExcelApi 1.13] */ refreshOnOpen?: boolean; /** * Specifies if the PivotTable uses custom lists when sorting. * * @remarks * [Api set: ExcelApi 1.9] */ useCustomSortLists?: boolean; } /** An interface describing the data returned by calling `pivotLayout.toJSON()`. */ interface PivotLayoutData { /** * The alt text description of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextDescription?: string; /** * The alt text title of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextTitle?: string; /** * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. * * @remarks * [Api set: ExcelApi 1.9] */ autoFormat?: boolean; /** * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. By default, this is an empty string. * * @remarks * [Api set: ExcelApi 1.13] */ emptyCellText?: string; /** * Specifies if the field list can be shown in the UI. * * @remarks * [Api set: ExcelApi 1.10] */ enableFieldList?: boolean; /** * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. Note that the value of `emptyCellText` persists when this property is set to `false`. * * @remarks * [Api set: ExcelApi 1.13] */ fillEmptyCells?: boolean; /** * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. * * @remarks * [Api set: ExcelApi 1.8] */ layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; /** * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * @remarks * [Api set: ExcelApi 1.9] */ preserveFormatting?: boolean; /** * Specifies if the PivotTable report shows grand totals for columns. * * @remarks * [Api set: ExcelApi 1.8] */ showColumnGrandTotals?: boolean; /** * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). * * @remarks * [Api set: ExcelApi 1.13] */ showFieldHeaders?: boolean; /** * Specifies if the PivotTable report shows grand totals for rows. * * @remarks * [Api set: ExcelApi 1.8] */ showRowGrandTotals?: boolean; /** * This property indicates the `SubtotalLocationType` of all fields on the PivotTable. If fields have different states, this will be `null`. * * @remarks * [Api set: ExcelApi 1.8] */ subtotalLocation?: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; } /** An interface describing the data returned by calling `pivotHierarchyCollection.toJSON()`. */ interface PivotHierarchyCollectionData { items?: Excel.Interfaces.PivotHierarchyData[]; } /** An interface describing the data returned by calling `pivotHierarchy.toJSON()`. */ interface PivotHierarchyData { /** * Returns the PivotFields associated with the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ fields?: Excel.Interfaces.PivotFieldData[]; /** * ID of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: string; /** * Name of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; } /** An interface describing the data returned by calling `rowColumnPivotHierarchyCollection.toJSON()`. */ interface RowColumnPivotHierarchyCollectionData { items?: Excel.Interfaces.RowColumnPivotHierarchyData[]; } /** An interface describing the data returned by calling `rowColumnPivotHierarchy.toJSON()`. */ interface RowColumnPivotHierarchyData { /** * Returns the PivotFields associated with the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ fields?: Excel.Interfaces.PivotFieldData[]; /** * ID of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: string; /** * Name of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Position of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: number; } /** An interface describing the data returned by calling `filterPivotHierarchyCollection.toJSON()`. */ interface FilterPivotHierarchyCollectionData { items?: Excel.Interfaces.FilterPivotHierarchyData[]; } /** An interface describing the data returned by calling `filterPivotHierarchy.toJSON()`. */ interface FilterPivotHierarchyData { /** * Returns the PivotFields associated with the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ fields?: Excel.Interfaces.PivotFieldData[]; /** * Determines whether to allow multiple filter items. * * @remarks * [Api set: ExcelApi 1.8] */ enableMultipleFilterItems?: boolean; /** * ID of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: string; /** * Name of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Position of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: number; } /** An interface describing the data returned by calling `dataPivotHierarchyCollection.toJSON()`. */ interface DataPivotHierarchyCollectionData { items?: Excel.Interfaces.DataPivotHierarchyData[]; } /** An interface describing the data returned by calling `dataPivotHierarchy.toJSON()`. */ interface DataPivotHierarchyData { /** * Returns the PivotFields associated with the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ field?: Excel.Interfaces.PivotFieldData; /** * ID of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: string; /** * Name of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Number format of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: string; /** * Position of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: number; /** * Specifies if the data should be shown as a specific summary calculation. * * @remarks * [Api set: ExcelApi 1.8] */ showAs?: Excel.ShowAsRule; /** * Specifies if all items of the DataPivotHierarchy are shown. * * @remarks * [Api set: ExcelApi 1.8] */ summarizeBy?: Excel.AggregationFunction | "Unknown" | "Automatic" | "Sum" | "Count" | "Average" | "Max" | "Min" | "Product" | "CountNumbers" | "StandardDeviation" | "StandardDeviationP" | "Variance" | "VarianceP"; } /** An interface describing the data returned by calling `pivotFieldCollection.toJSON()`. */ interface PivotFieldCollectionData { items?: Excel.Interfaces.PivotFieldData[]; } /** An interface describing the data returned by calling `pivotField.toJSON()`. */ interface PivotFieldData { /** * Returns the PivotItems associated with the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ items?: Excel.Interfaces.PivotItemData[]; /** * ID of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ id?: string; /** * Name of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Determines whether to show all items of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ showAllItems?: boolean; /** * Subtotals of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ subtotals?: Excel.Subtotals; } /** An interface describing the data returned by calling `pivotItemCollection.toJSON()`. */ interface PivotItemCollectionData { items?: Excel.Interfaces.PivotItemData[]; } /** An interface describing the data returned by calling `pivotItem.toJSON()`. */ interface PivotItemData { /** * ID of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ id?: string; /** * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. * * @remarks * [Api set: ExcelApi 1.8] */ isExpanded?: boolean; /** * Name of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ name?: string; /** * Specifies if the PivotItem is visible. * * @remarks * [Api set: ExcelApi 1.8] */ visible?: boolean; } /** An interface describing the data returned by calling `worksheetCustomProperty.toJSON()`. */ interface WorksheetCustomPropertyData { /** * Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) * * @remarks * [Api set: ExcelApi 1.12] */ key?: string; /** * Gets or sets the value of the custom property. * * @remarks * [Api set: ExcelApi 1.12] */ value?: string; } /** An interface describing the data returned by calling `worksheetCustomPropertyCollection.toJSON()`. */ interface WorksheetCustomPropertyCollectionData { items?: Excel.Interfaces.WorksheetCustomPropertyData[]; } /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ interface DocumentPropertiesData { /** * Gets the collection of custom properties of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ custom?: Excel.Interfaces.CustomPropertyData[]; /** * The author of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ author?: string; /** * The category of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ category?: string; /** * The comments of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ comments?: string; /** * The company of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ company?: string; /** * Gets the creation date of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ creationDate?: Date; /** * The keywords of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ keywords?: string; /** * Gets the last author of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ lastAuthor?: string; /** * The manager of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ manager?: string; /** * Gets the revision number of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ revisionNumber?: number; /** * The subject of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ subject?: string; /** * The title of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ title?: string; } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ interface CustomPropertyData { /** * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ key?: string; /** * The type of the value used for the custom property. * * @remarks * [Api set: ExcelApi 1.7] */ type?: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; /** * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ value?: any; } /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ interface CustomPropertyCollectionData { items?: Excel.Interfaces.CustomPropertyData[]; } /** An interface describing the data returned by calling `conditionalFormatCollection.toJSON()`. */ interface ConditionalFormatCollectionData { items?: Excel.Interfaces.ConditionalFormatData[]; } /** An interface describing the data returned by calling `conditionalFormat.toJSON()`. */ interface ConditionalFormatData { /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValue?: Excel.Interfaces.CellValueConditionalFormatData; /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatData; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScale?: Excel.Interfaces.ColorScaleConditionalFormatData; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatData; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ custom?: Excel.Interfaces.CustomConditionalFormatData; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ customOrNullObject?: Excel.Interfaces.CustomConditionalFormatData; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBar?: Excel.Interfaces.DataBarConditionalFormatData; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatData; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSet?: Excel.Interfaces.IconSetConditionalFormatData; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatData; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ preset?: Excel.Interfaces.PresetCriteriaConditionalFormatData; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatData; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparison?: Excel.Interfaces.TextConditionalFormatData; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatData; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottom?: Excel.Interfaces.TopBottomConditionalFormatData; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatData; /** * The priority of the conditional format in the current `ConditionalFormatCollection`. * * @remarks * [Api set: ExcelApi 1.6] */ id?: string; /** * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than the bounds will get and set to the maximum (or minimum if negative) priority. Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. * * @remarks * [Api set: ExcelApi 1.6] */ priority?: number; /** * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. * * @remarks * [Api set: ExcelApi 1.6] */ stopIfTrue?: boolean; /** * A type of conditional format. Only one can be set at a time. * * @remarks * [Api set: ExcelApi 1.6] */ type?: Excel.ConditionalFormatType | "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"; } /** An interface describing the data returned by calling `dataBarConditionalFormat.toJSON()`. */ interface DataBarConditionalFormatData { /** * Representation of all values to the left of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatData; /** * Representation of all values to the right of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatData; /** * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no axis is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ axisColor?: string; /** * Representation of how the axis is determined for an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; /** * Specifies the direction that the data bar graphic should be based on. * * @remarks * [Api set: ExcelApi 1.6] */ barDirection?: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; /** * The rule for what constitutes the lower bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ lowerBoundRule?: Excel.ConditionalDataBarRule; /** * If `true`, hides the values from the cells where the data bar is applied. * * @remarks * [Api set: ExcelApi 1.6] */ showDataBarOnly?: boolean; /** * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ upperBoundRule?: Excel.ConditionalDataBarRule; } /** An interface describing the data returned by calling `conditionalDataBarPositiveFormat.toJSON()`. */ interface ConditionalDataBarPositiveFormatData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * Specifies if the data bar has a gradient. * * @remarks * [Api set: ExcelApi 1.6] */ gradientFill?: boolean; } /** An interface describing the data returned by calling `conditionalDataBarNegativeFormat.toJSON()`. */ interface ConditionalDataBarNegativeFormatData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * Specifies if the negative data bar has the same border color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor?: boolean; /** * Specifies if the negative data bar has the same fill color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveFillColor?: boolean; } /** An interface describing the data returned by calling `customConditionalFormat.toJSON()`. */ interface CustomConditionalFormatData { /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatData; /** * Specifies the `Rule` object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.Interfaces.ConditionalFormatRuleData; } /** An interface describing the data returned by calling `conditionalFormatRule.toJSON()`. */ interface ConditionalFormatRuleData { /** * The formula, if required, on which to evaluate the conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ formula?: string; /** * The formula, if required, on which to evaluate the conditional format rule in the user's language. * * @remarks * [Api set: ExcelApi 1.6] */ formulaLocal?: string; /** * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. * * @remarks * [Api set: ExcelApi 1.6] */ formulaR1C1?: string; } /** An interface describing the data returned by calling `iconSetConditionalFormat.toJSON()`. */ interface IconSetConditionalFormatData { /** * An array of criteria and icon sets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. * * @remarks * [Api set: ExcelApi 1.6] */ criteria?: Excel.ConditionalIconCriterion[]; /** * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. * * @remarks * [Api set: ExcelApi 1.6] */ reverseIconOrder?: boolean; /** * If `true`, hides the values and only shows icons. * * @remarks * [Api set: ExcelApi 1.6] */ showIconOnly?: boolean; /** * If set, displays the icon set option for the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; } /** An interface describing the data returned by calling `colorScaleConditionalFormat.toJSON()`. */ interface ColorScaleConditionalFormatData { /** * The criteria of the color scale. Midpoint is optional when using a two point color scale. * * @remarks * [Api set: ExcelApi 1.6] */ criteria?: Excel.ConditionalColorScaleCriteria; /** * If `true`, the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). * * @remarks * [Api set: ExcelApi 1.6] */ threeColorScale?: boolean; } /** An interface describing the data returned by calling `topBottomConditionalFormat.toJSON()`. */ interface TopBottomConditionalFormatData { /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatData; /** * The criteria of the top/bottom conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTopBottomRule; } /** An interface describing the data returned by calling `presetCriteriaConditionalFormat.toJSON()`. */ interface PresetCriteriaConditionalFormatData { /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatData; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalPresetCriteriaRule; } /** An interface describing the data returned by calling `textConditionalFormat.toJSON()`. */ interface TextConditionalFormatData { /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatData; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTextComparisonRule; } /** An interface describing the data returned by calling `cellValueConditionalFormat.toJSON()`. */ interface CellValueConditionalFormatData { /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatData; /** * Specifies the rule object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalCellValueRule; } /** An interface describing the data returned by calling `conditionalRangeFormat.toJSON()`. */ interface ConditionalRangeFormatData { /** * Collection of border objects that apply to the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ borders?: Excel.Interfaces.ConditionalRangeBorderData[]; /** * Returns the fill object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ fill?: Excel.Interfaces.ConditionalRangeFillData; /** * Returns the font object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ font?: Excel.Interfaces.ConditionalRangeFontData; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. Cleared if `null` is passed in. * * @remarks * [Api set: ExcelApi 1.6] */ numberFormat?: any; } /** An interface describing the data returned by calling `conditionalRangeFont.toJSON()`. */ interface ConditionalRangeFontData { /** * Specifies if the font is bold. * * @remarks * [Api set: ExcelApi 1.6] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.6] */ color?: string; /** * Specifies if the font is italic. * * @remarks * [Api set: ExcelApi 1.6] */ italic?: boolean; /** * Specifies the strikethrough status of the font. * * @remarks * [Api set: ExcelApi 1.6] */ strikethrough?: boolean; /** * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ underline?: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; } /** An interface describing the data returned by calling `conditionalRangeFill.toJSON()`. */ interface ConditionalRangeFillData { /** * HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color?: string; } /** An interface describing the data returned by calling `conditionalRangeBorder.toJSON()`. */ interface ConditionalRangeBorderData { /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color?: string; /** * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.6] */ sideIndex?: Excel.ConditionalRangeBorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight"; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ style?: Excel.ConditionalRangeBorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"; } /** An interface describing the data returned by calling `conditionalRangeBorderCollection.toJSON()`. */ interface ConditionalRangeBorderCollectionData { items?: Excel.Interfaces.ConditionalRangeBorderData[]; } /** An interface describing the data returned by calling `style.toJSON()`. */ interface StyleData { /** * A collection of four border objects that represent the style of the four borders. * * @remarks * [Api set: ExcelApi 1.7] */ borders?: Excel.Interfaces.RangeBorderData[]; /** * The fill of the style. * * @remarks * [Api set: ExcelApi 1.7] */ fill?: Excel.Interfaces.RangeFillData; /** * A `Font` object that represents the font of the style. * * @remarks * [Api set: ExcelApi 1.7] */ font?: Excel.Interfaces.RangeFontData; /** * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.8] */ autoIndent?: boolean; /** * Specifies if the style is a built-in style. * * @remarks * [Api set: ExcelApi 1.7] */ builtIn?: boolean; /** * Specifies if the formula will be hidden when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ formulaHidden?: boolean; /** * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeAlignment?: boolean; /** * Specifies if the style includes the color, color index, line style, and weight border properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeBorder?: boolean; /** * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeFont?: boolean; /** * Specifies if the style includes the number format property. * * @remarks * [Api set: ExcelApi 1.7] */ includeNumber?: boolean; /** * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. * * @remarks * [Api set: ExcelApi 1.7] */ includePatterns?: boolean; /** * Specifies if the style includes the formula hidden and locked protection properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeProtection?: boolean; /** * An integer from 0 to 250 that indicates the indent level for the style. * * @remarks * [Api set: ExcelApi 1.7] */ indentLevel?: number; /** * Specifies if the object is locked when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ locked?: boolean; /** * The name of the style. * * @remarks * [Api set: ExcelApi 1.7] */ name?: string; /** * The format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormat?: string; /** * The localized format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: string; /** * The reading order for the style. * * @remarks * [Api set: ExcelApi 1.7] */ readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.7] */ shrinkToFit?: boolean; /** * The text orientation for the style. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: number; /** * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * Specifies if Excel wraps the text in the object. * * @remarks * [Api set: ExcelApi 1.7] */ wrapText?: boolean; } /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ interface StyleCollectionData { items?: Excel.Interfaces.StyleData[]; } /** An interface describing the data returned by calling `tableStyleCollection.toJSON()`. */ interface TableStyleCollectionData { items?: Excel.Interfaces.TableStyleData[]; } /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ interface TableStyleData { /** * Specifies the name of the table style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; /** * Specifies if this `TableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** An interface describing the data returned by calling `pivotTableStyleCollection.toJSON()`. */ interface PivotTableStyleCollectionData { items?: Excel.Interfaces.PivotTableStyleData[]; } /** An interface describing the data returned by calling `pivotTableStyle.toJSON()`. */ interface PivotTableStyleData { /** * Specifies the name of the PivotTable style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; /** * Specifies if this `PivotTableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** An interface describing the data returned by calling `slicerStyleCollection.toJSON()`. */ interface SlicerStyleCollectionData { items?: Excel.Interfaces.SlicerStyleData[]; } /** An interface describing the data returned by calling `slicerStyle.toJSON()`. */ interface SlicerStyleData { /** * Specifies the name of the slicer style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; /** * Specifies if this `SlicerStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** An interface describing the data returned by calling `timelineStyleCollection.toJSON()`. */ interface TimelineStyleCollectionData { items?: Excel.Interfaces.TimelineStyleData[]; } /** An interface describing the data returned by calling `timelineStyle.toJSON()`. */ interface TimelineStyleData { /** * Specifies the name of the timeline style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; /** * Specifies if this `TimelineStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** An interface describing the data returned by calling `pageLayout.toJSON()`. */ interface PageLayoutData { /** * Header and footer configuration for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ headersFooters?: Excel.Interfaces.HeaderFooterGroupData; /** * The worksheet's black and white print option. * * @remarks * [Api set: ExcelApi 1.9] */ blackAndWhite?: boolean; /** * The worksheet's bottom page margin to use for printing in points. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin?: number; /** * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerHorizontally?: boolean; /** * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerVertically?: boolean; /** * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. * * @remarks * [Api set: ExcelApi 1.9] */ draftMode?: boolean; /** * The worksheet's first page number to print. A `null` value represents "auto" page numbering. * * @remarks * [Api set: ExcelApi 1.9] */ firstPageNumber?: number | ""; /** * The worksheet's footer margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ footerMargin?: number; /** * The worksheet's header margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ headerMargin?: number; /** * The worksheet's left margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin?: number; /** * The worksheet's orientation of the page. * * @remarks * [Api set: ExcelApi 1.9] */ orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; /** * The worksheet's paper size of the page. * * @remarks * [Api set: ExcelApi 1.9] */ paperSize?: Excel.PaperType | "Letter" | "LetterSmall" | "Tabloid" | "Ledger" | "Legal" | "Statement" | "Executive" | "A3" | "A4" | "A4Small" | "A5" | "B4" | "B5" | "Folio" | "Quatro" | "Paper10x14" | "Paper11x17" | "Note" | "Envelope9" | "Envelope10" | "Envelope11" | "Envelope12" | "Envelope14" | "Csheet" | "Dsheet" | "Esheet" | "EnvelopeDL" | "EnvelopeC5" | "EnvelopeC3" | "EnvelopeC4" | "EnvelopeC6" | "EnvelopeC65" | "EnvelopeB4" | "EnvelopeB5" | "EnvelopeB6" | "EnvelopeItaly" | "EnvelopeMonarch" | "EnvelopePersonal" | "FanfoldUS" | "FanfoldStdGerman" | "FanfoldLegalGerman"; /** * Specifies if the worksheet's comments should be displayed when printing. * * @remarks * [Api set: ExcelApi 1.9] */ printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; /** * The worksheet's print errors option. * * @remarks * [Api set: ExcelApi 1.9] */ printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; /** * Specifies if the worksheet's gridlines will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printGridlines?: boolean; /** * Specifies if the worksheet's headings will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printHeadings?: boolean; /** * The worksheet's page print order option. This specifies the order to use for processing the page number printed. * * @remarks * [Api set: ExcelApi 1.9] */ printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; /** * The worksheet's right margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin?: number; /** * The worksheet's top margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin?: number; /** * The worksheet's print zoom options. The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). * * @remarks * [Api set: ExcelApi 1.9] */ zoom?: Excel.PageLayoutZoomOptions; } /** An interface describing the data returned by calling `headerFooter.toJSON()`. */ interface HeaderFooterData { /** * The center footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerFooter?: string; /** * The center header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerHeader?: string; /** * The left footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftFooter?: string; /** * The left header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftHeader?: string; /** * The right footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightFooter?: string; /** * The right header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightHeader?: string; } /** An interface describing the data returned by calling `headerFooterGroup.toJSON()`. */ interface HeaderFooterGroupData { /** * The general header/footer, used for all pages unless even/odd or first page is specified. * * @remarks * [Api set: ExcelApi 1.9] */ defaultForAllPages?: Excel.Interfaces.HeaderFooterData; /** * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. * * @remarks * [Api set: ExcelApi 1.9] */ evenPages?: Excel.Interfaces.HeaderFooterData; /** * The first page header/footer, for all other pages general or even/odd is used. * * @remarks * [Api set: ExcelApi 1.9] */ firstPage?: Excel.Interfaces.HeaderFooterData; /** * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. * * @remarks * [Api set: ExcelApi 1.9] */ oddPages?: Excel.Interfaces.HeaderFooterData; /** * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. * * @remarks * [Api set: ExcelApi 1.9] */ state?: Excel.HeaderFooterState | "Default" | "FirstAndDefault" | "OddAndEven" | "FirstOddAndEven"; /** * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetMargins?: boolean; /** * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetScale?: boolean; } /** An interface describing the data returned by calling `pageBreak.toJSON()`. */ interface PageBreakData { /** * Specifies the column index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ columnIndex?: number; /** * Specifies the row index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ rowIndex?: number; } /** An interface describing the data returned by calling `pageBreakCollection.toJSON()`. */ interface PageBreakCollectionData { items?: Excel.Interfaces.PageBreakData[]; } /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ interface RangeCollectionData { items?: Excel.Interfaces.RangeData[]; } /** An interface describing the data returned by calling `rangeAreasCollection.toJSON()`. */ interface RangeAreasCollectionData { items?: Excel.Interfaces.RangeAreasData[]; } /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ interface CommentCollectionData { items?: Excel.Interfaces.CommentData[]; } /** An interface describing the data returned by calling `comment.toJSON()`. */ interface CommentData { /** * Represents a collection of reply objects associated with the comment. * * @remarks * [Api set: ExcelApi 1.10] */ replies?: Excel.Interfaces.CommentReplyData[]; /** * Gets the email of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorEmail?: string; /** * Gets the name of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorName?: string; /** * The comment's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: string; /** * Gets the content type of the comment. * * @remarks * [Api set: ExcelApi 1.12] */ contentType?: Excel.ContentType | "Plain" | "Mention"; /** * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. * * @remarks * [Api set: ExcelApi 1.10] */ creationDate?: Date; /** * Specifies the comment identifier. * * @remarks * [Api set: ExcelApi 1.10] */ id?: string; /** * Gets the entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ mentions?: Excel.CommentMention[]; /** * The comment thread status. A value of `true` means that the comment thread is resolved. * * @remarks * [Api set: ExcelApi 1.11] */ resolved?: boolean; /** * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ richContent?: string; } /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ interface CommentReplyCollectionData { items?: Excel.Interfaces.CommentReplyData[]; } /** An interface describing the data returned by calling `commentReply.toJSON()`. */ interface CommentReplyData { /** * Gets the email of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorEmail?: string; /** * Gets the name of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorName?: string; /** * The comment reply's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: string; /** * The content type of the reply. * * @remarks * [Api set: ExcelApi 1.12] */ contentType?: Excel.ContentType | "Plain" | "Mention"; /** * Gets the creation time of the comment reply. * * @remarks * [Api set: ExcelApi 1.10] */ creationDate?: Date; /** * Specifies the comment reply identifier. * * @remarks * [Api set: ExcelApi 1.10] */ id?: string; /** * The entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ mentions?: Excel.CommentMention[]; /** * The comment reply status. A value of `true` means the reply is in the resolved state. * * @remarks * [Api set: ExcelApi 1.11] */ resolved?: boolean; /** * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ richContent?: string; } /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ interface ShapeCollectionData { items?: Excel.Interfaces.ShapeData[]; } /** An interface describing the data returned by calling `shape.toJSON()`. */ interface ShapeData { /** * Returns the fill formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ fill?: Excel.Interfaces.ShapeFillData; /** * Returns the line formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ lineFormat?: Excel.Interfaces.ShapeLineFormatData; /** * Specifies the alternative description text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextDescription?: string; /** * Specifies the alternative title text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextTitle?: string; /** * Returns the number of connection sites on this shape. * * @remarks * [Api set: ExcelApi 1.9] */ connectionSiteCount?: number; /** * Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its `name`. In this scenario, you can use this API to get the name that is displayed in the UI. * * @remarks * [Api set: ExcelApi 1.15] */ displayName?: string; /** * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShapeType?: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ height?: number; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: string; /** * The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ left?: number; /** * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. * * @remarks * [Api set: ExcelApi 1.9] */ level?: number; /** * Specifies if the aspect ratio of this shape is locked. * * @remarks * [Api set: ExcelApi 1.9] */ lockAspectRatio?: boolean; /** * Specifies the name of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ name?: string; /** * Represents how the object is attached to the cells below it. * * @remarks * [Api set: ExcelApi 1.10] */ placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; /** * Specifies the rotation, in degrees, of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ rotation?: number; /** * The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ top?: number; /** * Returns the type of this shape. See `Excel.ShapeType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type?: Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; /** * Specifies if the shape is visible. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ width?: number; /** * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. * * @remarks * [Api set: ExcelApi 1.9] */ zOrderPosition?: number; } /** An interface describing the data returned by calling `geometricShape.toJSON()`. */ interface GeometricShapeData { /** * Returns the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: string; } /** An interface describing the data returned by calling `image.toJSON()`. */ interface ImageData { /** * Specifies the shape identifier for the image object. * * @remarks * [Api set: ExcelApi 1.9] */ id?: string; /** * Returns the format of the image. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.PictureFormat | "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"; } /** An interface describing the data returned by calling `shapeGroup.toJSON()`. */ interface ShapeGroupData { /** * Returns the collection of `Shape` objects. * * @remarks * [Api set: ExcelApi 1.9] */ shapes?: Excel.Interfaces.ShapeData[]; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: string; } /** An interface describing the data returned by calling `groupShapeCollection.toJSON()`. */ interface GroupShapeCollectionData { items?: Excel.Interfaces.ShapeData[]; } /** An interface describing the data returned by calling `line.toJSON()`. */ interface LineData { /** * Represents the length of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; /** * Represents the style of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; /** * Represents the width of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; /** * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. * * @remarks * [Api set: ExcelApi 1.9] */ beginConnectedSite?: number; /** * Represents the length of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; /** * Represents the style of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; /** * Represents the width of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; /** * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. * * @remarks * [Api set: ExcelApi 1.9] */ endConnectedSite?: number; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: string; /** * Specifies if the beginning of the specified line is connected to a shape. * * @remarks * [Api set: ExcelApi 1.9] */ isBeginConnected?: boolean; /** * Specifies if the end of the specified line is connected to a shape. * * @remarks * [Api set: ExcelApi 1.9] */ isEndConnected?: boolean; /** * Represents the connector type for the line. * * @remarks * [Api set: ExcelApi 1.9] */ connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; } /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ interface ShapeFillData { /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.9] */ foregroundColor?: string; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: ExcelApi 1.9] */ transparency?: number; /** * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type?: Excel.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "Mixed"; } /** An interface describing the data returned by calling `shapeLineFormat.toJSON()`. */ interface ShapeLineFormatData { /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ color?: string; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; /** * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. * * @remarks * [Api set: ExcelApi 1.9] */ transparency?: number; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: ExcelApi 1.9] */ weight?: number; } /** An interface describing the data returned by calling `textFrame.toJSON()`. */ interface TextFrameData { /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: ExcelApi 1.9] */ autoSizeSetting?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin?: number; /** * Specifies if the text frame contains text. * * @remarks * [Api set: ExcelApi 1.9] */ hasText?: boolean; /** * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalAlignment?: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; /** * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalOverflow?: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin?: number; /** * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. * * @remarks * [Api set: ExcelApi 1.9] */ orientation?: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; /** * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder?: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin?: number; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin?: number; /** * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalAlignment?: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; /** * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalOverflow?: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; } /** An interface describing the data returned by calling `textRange.toJSON()`. */ interface TextRangeData { /** * Returns a `ShapeFont` object that represents the font attributes for the text range. * * @remarks * [Api set: ExcelApi 1.9] */ font?: Excel.Interfaces.ShapeFontData; /** * Represents the plain text content of the text range. * * @remarks * [Api set: ExcelApi 1.9] */ text?: string; } /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ interface ShapeFontData { /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: ExcelApi 1.9] */ color?: string; /** * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ italic?: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: ExcelApi 1.9] */ name?: string; /** * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. * * @remarks * [Api set: ExcelApi 1.9] */ size?: number; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; } /** An interface describing the data returned by calling `slicer.toJSON()`. */ interface SlicerData { /** * Represents the collection of slicer items that are part of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ slicerItems?: Excel.Interfaces.SlicerItemData[]; /** * Represents the worksheet containing the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ worksheet?: Excel.Interfaces.WorksheetData; /** * Represents the caption of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ caption?: string; /** * Represents the height, in points, of the slicer. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ height?: number; /** * Represents the unique ID of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ id?: string; /** * Value is `true` if all filters currently applied on the slicer are cleared. * * @remarks * [Api set: ExcelApi 1.10] */ isFilterCleared?: boolean; /** * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ left?: number; /** * Represents the name of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; /** * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". * * @remarks * [Api set: ExcelApi 1.10] */ sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; /** * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.10] */ style?: string; /** * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ top?: number; /** * Represents the width, in points, of the slicer. Throws an `InvalidArgument` error when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ width?: number; } /** An interface describing the data returned by calling `slicerCollection.toJSON()`. */ interface SlicerCollectionData { items?: Excel.Interfaces.SlicerData[]; } /** An interface describing the data returned by calling `slicerItem.toJSON()`. */ interface SlicerItemData { /** * Value is `true` if the slicer item has data. * * @remarks * [Api set: ExcelApi 1.10] */ hasData?: boolean; /** * Value is `true` if the slicer item is selected. Setting this value will not clear the selected state of other slicer items. By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. * * @remarks * [Api set: ExcelApi 1.10] */ isSelected?: boolean; /** * Represents the unique value representing the slicer item. * * @remarks * [Api set: ExcelApi 1.10] */ key?: string; /** * Represents the title displayed in the Excel UI. * * @remarks * [Api set: ExcelApi 1.10] */ name?: string; } /** An interface describing the data returned by calling `slicerItemCollection.toJSON()`. */ interface SlicerItemCollectionData { items?: Excel.Interfaces.SlicerItemData[]; } /** An interface describing the data returned by calling `namedSheetView.toJSON()`. */ interface NamedSheetViewData { /** * Gets or sets the name of the sheet view. The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. * * @remarks * [Api set: ExcelApiOnline 1.1] */ name?: string; } /** An interface describing the data returned by calling `namedSheetViewCollection.toJSON()`. */ interface NamedSheetViewCollectionData { items?: Excel.Interfaces.NamedSheetViewData[]; } /** An interface describing the data returned by calling `functionResult.toJSON()`. */ interface FunctionResultData { /** * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. * * @remarks * [Api set: ExcelApi 1.2] */ error?: string; /** * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). * * @remarks * [Api set: ExcelApi 1.2] */ value?: T; } /** * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ interface AllowEditRangeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the range associated with the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. * * @remarks * [Api set: ExcelApiOnline 1.1] */ address?: boolean; /** * Specifies if the object is password protected. * * @remarks * [Api set: ExcelApiOnline 1.1] */ isPasswordProtected?: boolean; /** * Specifies the title of the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. * * @remarks * [Api set: ExcelApiOnline 1.1] */ title?: boolean; } /** * Represents the set of `AllowEditRange` objects found in a worksheet. `AllowEditRange` objects work with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ interface AllowEditRangeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the range associated with the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. * * @remarks * [Api set: ExcelApiOnline 1.1] */ address?: boolean; /** * For EACH ITEM in the collection: Specifies if the object is password protected. * * @remarks * [Api set: ExcelApiOnline 1.1] */ isPasswordProtected?: boolean; /** * For EACH ITEM in the collection: Specifies the title of the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. * * @remarks * [Api set: ExcelApiOnline 1.1] */ title?: boolean; } /** * Represents a Power Query query. * * @remarks * [Api set: ExcelApi 1.14] */ interface QueryLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the query error message from when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ error?: boolean; /** * Gets the query loaded to object type. * * @remarks * [Api set: ExcelApi 1.14] */ loadedTo?: boolean; /** * Specifies if the query loaded to the data model. * * @remarks * [Api set: ExcelApi 1.14] */ loadedToDataModel?: boolean; /** * Gets the name of the query. Query names cannot contain periods or quotation marks. * * @remarks * [Api set: ExcelApi 1.14] */ name?: boolean; /** * Gets the date and time when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ refreshDate?: boolean; /** * Gets the number of rows that were loaded when the query was last refreshed. If last refresh has errors the value will be -1. * * @remarks * [Api set: ExcelApi 1.14] */ rowsLoadedCount?: boolean; } /** * Represents the collection of queries in the workbook. * * @remarks * [Api set: ExcelApi 1.14] */ interface QueryCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the query error message from when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ error?: boolean; /** * For EACH ITEM in the collection: Gets the query loaded to object type. * * @remarks * [Api set: ExcelApi 1.14] */ loadedTo?: boolean; /** * For EACH ITEM in the collection: Specifies if the query loaded to the data model. * * @remarks * [Api set: ExcelApi 1.14] */ loadedToDataModel?: boolean; /** * For EACH ITEM in the collection: Gets the name of the query. Query names cannot contain periods or quotation marks. * * @remarks * [Api set: ExcelApi 1.14] */ name?: boolean; /** * For EACH ITEM in the collection: Gets the date and time when the query was last refreshed. * * @remarks * [Api set: ExcelApi 1.14] */ refreshDate?: boolean; /** * For EACH ITEM in the collection: Gets the number of rows that were loaded when the query was last refreshed. If last refresh has errors the value will be -1. * * @remarks * [Api set: ExcelApi 1.14] */ rowsLoadedCount?: boolean; } /** * Contains information about a linked workbook. If a workbook has links pointing to data in another workbook, the second workbook is linked to the first workbook. In this scenario, the second workbook is called the "linked workbook". * * @remarks * [Api set: ExcelApiOnline 1.1] */ interface LinkedWorkbookLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] */ id?: boolean; } /** * Represents a collection of linked workbook objects. * * @remarks * [Api set: ExcelApiOnline 1.1] */ interface LinkedWorkbookCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. * * @remarks * [Api set: ExcelApiOnline 1.1] */ id?: boolean; } /** * Represents the Excel Runtime class. * * @remarks * [Api set: ExcelApi 1.5] */ interface RuntimeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Toggle JavaScript events in the current task pane or content add-in. * * @remarks * [Api set: ExcelApi 1.8] */ enableEvents?: boolean; } /** * Represents the Excel application that manages the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ interface ApplicationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. * * @remarks * [Api set: ExcelApi 1.11] */ cultureInfo?: Excel.Interfaces.CultureInfoLoadOptions; /** * Returns the iterative calculation settings. In Excel on Windows and Mac, the settings will apply to the Excel Application. In Excel on the web and other platforms, the settings will apply to the active workbook. * * @remarks * [Api set: ExcelApi 1.9] */ iterativeCalculation?: Excel.Interfaces.IterativeCalculationLoadOptions; /** * Returns the Excel calculation engine version used for the last full recalculation. * * @remarks * [Api set: ExcelApi 1.9] */ calculationEngineVersion?: boolean; /** * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. * * @remarks * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ calculationMode?: boolean; /** * Returns the calculation state of the application. See `Excel.CalculationState` for details. * * @remarks * [Api set: ExcelApi 1.9] */ calculationState?: boolean; /** * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. * * @remarks * [Api set: ExcelApi 1.11] */ decimalSeparator?: boolean; /** * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. * * @remarks * [Api set: ExcelApi 1.11] */ thousandsSeparator?: boolean; /** * Specifies if the system separators of Excel are enabled. System separators include the decimal separator and thousands separator. * * @remarks * [Api set: ExcelApi 1.11] */ useSystemSeparators?: boolean; } /** * Represents the iterative calculation settings. * * @remarks * [Api set: ExcelApi 1.9] */ interface IterativeCalculationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * True if Excel will use iteration to resolve circular references. * * @remarks * [Api set: ExcelApi 1.9] */ enabled?: boolean; /** * Specifies the maximum amount of change between each iteration as Excel resolves circular references. * * @remarks * [Api set: ExcelApi 1.9] */ maxChange?: boolean; /** * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. * * @remarks * [Api set: ExcelApi 1.9] */ maxIteration?: boolean; } /** * Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges. To learn more about the workbook object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ interface WorkbookLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the Excel application instance that contains this workbook. * * @remarks * [Api set: ExcelApi 1.1] */ application?: Excel.Interfaces.ApplicationLoadOptions; /** * Represents a collection of bindings that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ bindings?: Excel.Interfaces.BindingCollectionLoadOptions; /** * Returns a collection of linked workbooks. In formulas, the workbook links can be used to reference data (cell values and names) outside of the current workbook. * * @remarks * [Api set: ExcelApiOnline 1.1] */ linkedWorkbooks?: Excel.Interfaces.LinkedWorkbookCollectionLoadOptions; /** * Gets the workbook properties. * * @remarks * [Api set: ExcelApi 1.7] */ properties?: Excel.Interfaces.DocumentPropertiesLoadOptions; /** * Returns the protection object for a workbook. * * @remarks * [Api set: ExcelApi 1.7] */ protection?: Excel.Interfaces.WorkbookProtectionLoadOptions; /** * Represents a collection of tables associated with the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableCollectionLoadOptions; /** * Specifies if the workbook is in AutoSave mode. * * @remarks * [Api set: ExcelApi 1.9] */ autoSave?: boolean; /** * Returns a number about the version of Excel Calculation Engine. * * @remarks * [Api set: ExcelApi 1.9] */ calculationEngineVersion?: boolean; /** * True if all charts in the workbook are tracking the actual data points to which they are attached. False if the charts track the index of the data points. * * @remarks * [Api set: ExcelApi 1.9] */ chartDataPointTrack?: boolean; /** * Specifies if changes have been made since the workbook was last saved. You can set this property to `true` if you want to close a modified workbook without either saving it or being prompted to save it. * * @remarks * [Api set: ExcelApi 1.9] */ isDirty?: boolean; /** * Gets the workbook name. * * @remarks * [Api set: ExcelApi 1.7] */ name?: boolean; /** * Specifies if the workbook has ever been saved locally or online. * * @remarks * [Api set: ExcelApi 1.9] */ previouslySaved?: boolean; /** * Returns `true` if the workbook is open in read-only mode. * * @remarks * [Api set: ExcelApi 1.8] */ readOnly?: boolean; /** * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. Data will permanently lose accuracy when switching this property from `false` to `true`. * * @remarks * [Api set: ExcelApi 1.9] */ usePrecisionAsDisplayed?: boolean; } /** * Represents the protection of a workbook object. * * @remarks * [Api set: ExcelApi 1.7] */ interface WorkbookProtectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies if the workbook is protected. * * @remarks * [Api set: ExcelApi 1.7] */ protected?: boolean; } /** * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. To learn more about the worksheet object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | Work with worksheets using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ interface WorksheetLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the `AutoFilter` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; /** * Returns a collection of charts that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ charts?: Excel.Interfaces.ChartCollectionLoadOptions; /** * Gets the `PageLayout` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; /** * Returns the sheet protection object for a worksheet. * * @remarks * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; /** * Collection of tables that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableCollectionLoadOptions; /** * Determines if Excel should recalculate the worksheet when necessary. True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. * * @remarks * [Api set: ExcelApi 1.9] */ enableCalculation?: boolean; /** * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * The display name of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * The zero-based position of the worksheet within the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ position?: boolean; /** * Specifies if gridlines are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showGridlines?: boolean; /** * Specifies if headings are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showHeadings?: boolean; /** * Returns the standard (default) height of all the rows in the worksheet, in points. * * @remarks * [Api set: ExcelApi 1.7] */ standardHeight?: boolean; /** * Specifies the standard (default) width of all the columns in the worksheet. One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. * * @remarks * [Api set: ExcelApi 1.7] */ standardWidth?: boolean; /** * The tab color of the worksheet. When retrieving the tab color, if the worksheet is invisible, the value will be `null`. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form #RRGGBB (e.g., "FFA500"). When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. * * @remarks * [Api set: ExcelApi 1.7] */ tabColor?: boolean; /** * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). * * @remarks * [Api set: ExcelApi 1.14] */ tabId?: boolean; /** * The visibility of the worksheet. * * @remarks * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] */ visibility?: boolean; } /** * Represents a collection of worksheet objects that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ interface WorksheetCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the `AutoFilter` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; /** * For EACH ITEM in the collection: Returns a collection of charts that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ charts?: Excel.Interfaces.ChartCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the `PageLayout` object of the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; /** * For EACH ITEM in the collection: Returns the sheet protection object for a worksheet. * * @remarks * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; /** * For EACH ITEM in the collection: Collection of tables that are part of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableCollectionLoadOptions; /** * For EACH ITEM in the collection: Determines if Excel should recalculate the worksheet when necessary. True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. * * @remarks * [Api set: ExcelApi 1.9] */ enableCalculation?: boolean; /** * For EACH ITEM in the collection: Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: The display name of the worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: The zero-based position of the worksheet within the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ position?: boolean; /** * For EACH ITEM in the collection: Specifies if gridlines are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showGridlines?: boolean; /** * For EACH ITEM in the collection: Specifies if headings are visible to the user. * * @remarks * [Api set: ExcelApi 1.8] */ showHeadings?: boolean; /** * For EACH ITEM in the collection: Returns the standard (default) height of all the rows in the worksheet, in points. * * @remarks * [Api set: ExcelApi 1.7] */ standardHeight?: boolean; /** * For EACH ITEM in the collection: Specifies the standard (default) width of all the columns in the worksheet. One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. * * @remarks * [Api set: ExcelApi 1.7] */ standardWidth?: boolean; /** * For EACH ITEM in the collection: The tab color of the worksheet. When retrieving the tab color, if the worksheet is invisible, the value will be `null`. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form #RRGGBB (e.g., "FFA500"). When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. * * @remarks * [Api set: ExcelApi 1.7] */ tabColor?: boolean; /** * For EACH ITEM in the collection: Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). * * @remarks * [Api set: ExcelApi 1.14] */ tabId?: boolean; /** * For EACH ITEM in the collection: The visibility of the worksheet. * * @remarks * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] */ visibility?: boolean; } /** * Represents the protection of a worksheet object. * * @remarks * [Api set: ExcelApi 1.2] */ interface WorksheetProtectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies if protection can be paused for this worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ canPauseProtection?: boolean; /** * Specifies if the sheet is password protected. * * @remarks * [Api set: ExcelApiOnline 1.1] */ isPasswordProtected?: boolean; /** * Specifies if worksheet protection is paused. * * @remarks * [Api set: ExcelApiOnline 1.1] */ isPaused?: boolean; /** * Specifies the protection options for the worksheet. * * @remarks * [Api set: ExcelApi 1.2] */ options?: boolean; /** * Specifies if the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.2] */ protected?: boolean; /** * Specifies the protection options saved in the worksheet. This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. * * @remarks * [Api set: ExcelApiOnline 1.1] */ savedOptions?: boolean; } /** * Range represents a set of one or more contiguous cells such as a cell, a row, a column, or a block of cells. To learn more about how ranges are used throughout the API, start with {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-core-concepts#ranges | Ranges in the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ interface RangeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a data validation object. * * @remarks * [Api set: ExcelApi 1.8] */ dataValidation?: Excel.Interfaces.DataValidationLoadOptions; /** * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.RangeFormatLoadOptions; /** * The worksheet containing the current range. * * @remarks * [Api set: ExcelApi 1.1] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). * * @remarks * [Api set: ExcelApi 1.1] */ address?: boolean; /** * Represents the range reference for the specified range in the language of the user. * * @remarks * [Api set: ExcelApi 1.1] */ addressLocal?: boolean; /** * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.1] */ cellCount?: boolean; /** * Specifies the total number of columns in the range. * * @remarks * [Api set: ExcelApi 1.1] */ columnCount?: boolean; /** * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ columnHidden?: boolean; /** * Specifies the column number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ columnIndex?: boolean; /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulas?: boolean; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulasLocal?: boolean; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.2] */ formulasR1C1?: boolean; /** * Represents if all cells have a spill border. Returns `true` if all cells have a spill border, or `false` if all cells do not have a spill border. Returns `null` if there are cells both with and without spill borders within the range. * * @remarks * [Api set: ExcelApi 1.12] */ hasSpill?: boolean; /** * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ height?: boolean; /** * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ hidden?: boolean; /** * Represents the hyperlink for the current range. * * @remarks * [Api set: ExcelApi 1.7] */ hyperlink?: boolean; /** * Represents if the current range is an entire column. * * @remarks * [Api set: ExcelApi 1.7] */ isEntireColumn?: boolean; /** * Represents if the current range is an entire row. * * @remarks * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; /** * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ left?: boolean; /** * Represents the data type state of each cell. * * @remarks * [Api set: ExcelApi 1.9] */ linkedDataTypeState?: boolean; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. * * @remarks * [Api set: ExcelApi 1.1] */ numberFormat?: boolean; /** * Represents the category of number format of each cell. * * @remarks * [Api set: ExcelApi 1.12] */ numberFormatCategories?: boolean; /** * Represents Excel's number format code for the given range, based on the language settings of the user. Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. Any returned text uses the locally-formatted strings based on the language specified in the system settings. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: boolean; /** * Returns the total number of rows in the range. * * @remarks * [Api set: ExcelApi 1.1] */ rowCount?: boolean; /** * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ rowHidden?: boolean; /** * Returns the row number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ rowIndex?: boolean; /** * Represents if all the cells would be saved as an array formula. Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. Returns `null` if some cells would be saved as an array formula and some would not be. * * @remarks * [Api set: ExcelApi 1.12] */ savedAsArray?: boolean; /** * Represents the style of the current range. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ style?: boolean; /** * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.1] */ text?: boolean; /** * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ top?: boolean; /** * Specifies the type of data in each cell. * * @remarks * [Api set: ExcelApi 1.1] */ valueTypes?: boolean; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: boolean; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; /** * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ width?: boolean; } /** * `RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. To learn how to use discontiguous ranges, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges | Work with multiple ranges simultaneously in Excel add-ins}. * * @remarks * [Api set: ExcelApi 1.9] */ interface RangeAreasLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a data validation object for all ranges in the `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ dataValidation?: Excel.Interfaces.DataValidationLoadOptions; /** * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.Interfaces.RangeFormatLoadOptions; /** * Returns the worksheet for the current `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * Returns the `RangeAreas` reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). * * @remarks * [Api set: ExcelApi 1.9] */ address?: boolean; /** * Returns the `RangeAreas` reference in the user locale. * * @remarks * [Api set: ExcelApi 1.9] */ addressLocal?: boolean; /** * Returns the number of rectangular ranges that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ areaCount?: boolean; /** * Returns the number of cells in the `RangeAreas` object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.9] */ cellCount?: boolean; /** * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). * * @remarks * [Api set: ExcelApi 1.9] */ isEntireColumn?: boolean; /** * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). * * @remarks * [Api set: ExcelApi 1.9] */ isEntireRow?: boolean; /** * Represents the style for all ranges in this `RangeAreas` object. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.9] */ style?: boolean; } /** * Represents a collection of one or more rectangular ranges in multiple worksheets. * * @remarks * [Api set: ExcelApi 1.12] */ interface WorkbookRangeAreasLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. * * @remarks * [Api set: ExcelApi 1.12] */ addresses?: boolean; } /** * RangeView represents a set of visible cells of the parent range. * * @remarks * [Api set: ExcelApi 1.3] */ interface RangeViewLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the cell addresses of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ cellAddresses?: boolean; /** * The number of visible columns. * * @remarks * [Api set: ExcelApi 1.3] */ columnCount?: boolean; /** * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulas?: boolean; /** * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasLocal?: boolean; /** * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasR1C1?: boolean; /** * Returns a value that represents the index of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ index?: boolean; /** * Represents Excel's number format code for the given cell. * * @remarks * [Api set: ExcelApi 1.3] */ numberFormat?: boolean; /** * The number of visible rows. * * @remarks * [Api set: ExcelApi 1.3] */ rowCount?: boolean; /** * Text values of the specified range. The text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.3] */ text?: boolean; /** * Represents the type of data of each cell. * * @remarks * [Api set: ExcelApi 1.3] */ valueTypes?: boolean; /** * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. * * @remarks * [Api set: ExcelApi 1.3] */ values?: boolean; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; } /** * Represents a collection of `RangeView` objects. * * @remarks * [Api set: ExcelApi 1.3] */ interface RangeViewCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the cell addresses of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ cellAddresses?: boolean; /** * For EACH ITEM in the collection: The number of visible columns. * * @remarks * [Api set: ExcelApi 1.3] */ columnCount?: boolean; /** * For EACH ITEM in the collection: Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulas?: boolean; /** * For EACH ITEM in the collection: Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasLocal?: boolean; /** * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.3] */ formulasR1C1?: boolean; /** * For EACH ITEM in the collection: Returns a value that represents the index of the `RangeView`. * * @remarks * [Api set: ExcelApi 1.3] */ index?: boolean; /** * For EACH ITEM in the collection: Represents Excel's number format code for the given cell. * * @remarks * [Api set: ExcelApi 1.3] */ numberFormat?: boolean; /** * For EACH ITEM in the collection: The number of visible rows. * * @remarks * [Api set: ExcelApi 1.3] */ rowCount?: boolean; /** * For EACH ITEM in the collection: Text values of the specified range. The text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.3] */ text?: boolean; /** * For EACH ITEM in the collection: Represents the type of data of each cell. * * @remarks * [Api set: ExcelApi 1.3] */ valueTypes?: boolean; /** * For EACH ITEM in the collection: Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. * * @remarks * [Api set: ExcelApi 1.3] */ values?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; } /** * Represents a collection of key-value pair setting objects that are part of the workbook. The scope is limited to per file and add-in (task-pane or content) combination. * * @remarks * [Api set: ExcelApi 1.4] */ interface SettingCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The key that represents the ID of the setting. * * @remarks * [Api set: ExcelApi 1.4] */ key?: boolean; /** * For EACH ITEM in the collection: Represents the value stored for this setting. * * @remarks * [Api set: ExcelApi 1.4] */ value?: boolean; } /** * Setting represents a key-value pair of a setting persisted to the document (per file, per add-in). These custom key-value pair can be used to store state or lifecycle information needed by the content or task-pane add-in. Note that settings are persisted in the document and hence it is not a place to store any sensitive or protected information such as user information and password. * * @remarks * [Api set: ExcelApi 1.4] */ interface SettingLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The key that represents the ID of the setting. * * @remarks * [Api set: ExcelApi 1.4] */ key?: boolean; /** * Represents the value stored for this setting. * * @remarks * [Api set: ExcelApi 1.4] */ value?: boolean; } /** * A collection of all the `NamedItem` objects that are part of the workbook or worksheet, depending on how it was reached. * * @remarks * [Api set: ExcelApi 1.1] */ interface NamedItemCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns an object containing values and types of the named item. * * @remarks * [Api set: ExcelApi 1.7] */ arrayValues?: Excel.Interfaces.NamedItemArrayValuesLoadOptions; /** * For EACH ITEM in the collection: Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. * * @remarks * [Api set: ExcelApi 1.4] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] */ worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Specifies the comment associated with this name. * * @remarks * [Api set: ExcelApi 1.4] */ comment?: boolean; /** * For EACH ITEM in the collection: The formula of the named item. Formulas always start with an equal sign ("="). * * @remarks * [Api set: ExcelApi 1.7] */ formula?: boolean; /** * For EACH ITEM in the collection: The name of the object. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. * * @remarks * [Api set: ExcelApi 1.4] */ scope?: boolean; /** * For EACH ITEM in the collection: Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. * * @remarks * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ type?: boolean; /** * For EACH ITEM in the collection: Represents the value computed by the name's formula. For a named range, it will return the range address. This API returns the #VALUE! error in the Excel UI if it refers to a user-defined function. * * @remarks * [Api set: ExcelApi 1.1] */ value?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJson?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJsonLocal?: boolean; /** * For EACH ITEM in the collection: Specifies if the object is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** * Represents a defined name for a range of cells or value. Names can be primitive named objects (as seen in the type below), range object, or a reference to a range. This object can be used to obtain range object associated with names. * * @remarks * [Api set: ExcelApi 1.1] */ interface NamedItemLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns an object containing values and types of the named item. * * @remarks * [Api set: ExcelApi 1.7] */ arrayValues?: Excel.Interfaces.NamedItemArrayValuesLoadOptions; /** * Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. * * @remarks * [Api set: ExcelApi 1.4] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: ExcelApi 1.4] */ worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; /** * Specifies the comment associated with this name. * * @remarks * [Api set: ExcelApi 1.4] */ comment?: boolean; /** * The formula of the named item. Formulas always start with an equal sign ("="). * * @remarks * [Api set: ExcelApi 1.7] */ formula?: boolean; /** * The name of the object. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. * * @remarks * [Api set: ExcelApi 1.4] */ scope?: boolean; /** * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. * * @remarks * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ type?: boolean; /** * Represents the value computed by the name's formula. For a named range, it will return the range address. This API returns the #VALUE! error in the Excel UI if it refers to a user-defined function. * * @remarks * [Api set: ExcelApi 1.1] */ value?: boolean; /** * A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJson?: boolean; /** * A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valueAsJsonLocal?: boolean; /** * Specifies if the object is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** * Represents an object containing values and types of a named item. * * @remarks * [Api set: ExcelApi 1.7] */ interface NamedItemArrayValuesLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the types for each item in the named item array * * @remarks * [Api set: ExcelApi 1.7] */ types?: boolean; /** * Represents the values of each item in the named item array. * * @remarks * [Api set: ExcelApi 1.7] */ values?: boolean; /** * A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; } /** * Represents an Office.js binding that is defined in the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ interface BindingLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the binding identifier. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * Returns the type of the binding. See `Excel.BindingType` for details. * * @remarks * [Api set: ExcelApi 1.1] */ type?: boolean; } /** * Represents the collection of all the binding objects that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.1] */ interface BindingCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the binding identifier. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Returns the type of the binding. See `Excel.BindingType` for details. * * @remarks * [Api set: ExcelApi 1.1] */ type?: boolean; } /** * Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached. * * @remarks * [Api set: ExcelApi 1.1] */ interface TableCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the `AutoFilter` object of the table. * * @remarks * [Api set: ExcelApi 1.9] */ autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; /** * For EACH ITEM in the collection: Represents a collection of all the columns in the table. * * @remarks * [Api set: ExcelApi 1.1] */ columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; /** * For EACH ITEM in the collection: Represents a collection of all the rows in the table. * * @remarks * [Api set: ExcelApi 1.1] */ rows?: Excel.Interfaces.TableRowCollectionLoadOptions; /** * For EACH ITEM in the collection: Represents the sorting for the table. * * @remarks * [Api set: ExcelApi 1.2] */ sort?: Excel.Interfaces.TableSortLoadOptions; /** * For EACH ITEM in the collection: The worksheet containing the current table. * * @remarks * [Api set: ExcelApi 1.2] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Specifies if the first column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightFirstColumn?: boolean; /** * For EACH ITEM in the collection: Specifies if the last column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightLastColumn?: boolean; /** * For EACH ITEM in the collection: Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Returns a numeric ID. * * @remarks * [Api set: ExcelApi 1.8] */ legacyId?: boolean; /** * For EACH ITEM in the collection: Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedColumns?: boolean; /** * For EACH ITEM in the collection: Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedRows?: boolean; /** * For EACH ITEM in the collection: Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. * * @remarks * [Api set: ExcelApi 1.3] */ showFilterButton?: boolean; /** * For EACH ITEM in the collection: Specifies if the header row is visible. This value can be set to show or remove the header row. * * @remarks * [Api set: ExcelApi 1.1] */ showHeaders?: boolean; /** * For EACH ITEM in the collection: Specifies if the total row is visible. This value can be set to show or remove the total row. * * @remarks * [Api set: ExcelApi 1.1] */ showTotals?: boolean; /** * For EACH ITEM in the collection: Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.1] */ style?: boolean; } /** * Represents a scoped collection of tables. For each table its top-left corner is considered its anchor location, and the tables are sorted top-to-bottom and then left-to-right. * * @remarks * [Api set: ExcelApi 1.9] */ interface TableScopedCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the `AutoFilter` object of the table. * * @remarks * [Api set: ExcelApi 1.9] */ autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; /** * For EACH ITEM in the collection: Represents a collection of all the columns in the table. * * @remarks * [Api set: ExcelApi 1.1] */ columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; /** * For EACH ITEM in the collection: Represents a collection of all the rows in the table. * * @remarks * [Api set: ExcelApi 1.1] */ rows?: Excel.Interfaces.TableRowCollectionLoadOptions; /** * For EACH ITEM in the collection: Represents the sorting for the table. * * @remarks * [Api set: ExcelApi 1.2] */ sort?: Excel.Interfaces.TableSortLoadOptions; /** * For EACH ITEM in the collection: The worksheet containing the current table. * * @remarks * [Api set: ExcelApi 1.2] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Specifies if the first column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightFirstColumn?: boolean; /** * For EACH ITEM in the collection: Specifies if the last column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightLastColumn?: boolean; /** * For EACH ITEM in the collection: Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Returns a numeric ID. * * @remarks * [Api set: ExcelApi 1.8] */ legacyId?: boolean; /** * For EACH ITEM in the collection: Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedColumns?: boolean; /** * For EACH ITEM in the collection: Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedRows?: boolean; /** * For EACH ITEM in the collection: Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. * * @remarks * [Api set: ExcelApi 1.3] */ showFilterButton?: boolean; /** * For EACH ITEM in the collection: Specifies if the header row is visible. This value can be set to show or remove the header row. * * @remarks * [Api set: ExcelApi 1.1] */ showHeaders?: boolean; /** * For EACH ITEM in the collection: Specifies if the total row is visible. This value can be set to show or remove the total row. * * @remarks * [Api set: ExcelApi 1.1] */ showTotals?: boolean; /** * For EACH ITEM in the collection: Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.1] */ style?: boolean; } /** * Represents an Excel table. To learn more about the table object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | Work with tables using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ interface TableLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the `AutoFilter` object of the table. * * @remarks * [Api set: ExcelApi 1.9] */ autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; /** * Represents a collection of all the columns in the table. * * @remarks * [Api set: ExcelApi 1.1] */ columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; /** * Represents a collection of all the rows in the table. * * @remarks * [Api set: ExcelApi 1.1] */ rows?: Excel.Interfaces.TableRowCollectionLoadOptions; /** * Represents the sorting for the table. * * @remarks * [Api set: ExcelApi 1.2] */ sort?: Excel.Interfaces.TableSortLoadOptions; /** * The worksheet containing the current table. * * @remarks * [Api set: ExcelApi 1.2] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * Specifies if the first column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightFirstColumn?: boolean; /** * Specifies if the last column contains special formatting. * * @remarks * [Api set: ExcelApi 1.3] */ highlightLastColumn?: boolean; /** * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * Returns a numeric ID. * * @remarks * [Api set: ExcelApi 1.8] */ legacyId?: boolean; /** * Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedColumns?: boolean; /** * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. * * @remarks * [Api set: ExcelApi 1.3] */ showBandedRows?: boolean; /** * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. * * @remarks * [Api set: ExcelApi 1.3] */ showFilterButton?: boolean; /** * Specifies if the header row is visible. This value can be set to show or remove the header row. * * @remarks * [Api set: ExcelApi 1.1] */ showHeaders?: boolean; /** * Specifies if the total row is visible. This value can be set to show or remove the total row. * * @remarks * [Api set: ExcelApi 1.1] */ showTotals?: boolean; /** * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.1] */ style?: boolean; } /** * Represents a collection of all the columns that are part of the table. * * @remarks * [Api set: ExcelApi 1.1] */ interface TableColumnCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Retrieves the filter applied to the column. * * @remarks * [Api set: ExcelApi 1.2] */ filter?: Excel.Interfaces.FilterLoadOptions; /** * For EACH ITEM in the collection: Returns a unique key that identifies the column within the table. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Returns the index number of the column within the columns collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ index?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the table column. * * @remarks * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] */ name?: boolean; /** * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; } /** * Represents a column in a table. * * @remarks * [Api set: ExcelApi 1.1] */ interface TableColumnLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Retrieves the filter applied to the column. * * @remarks * [Api set: ExcelApi 1.2] */ filter?: Excel.Interfaces.FilterLoadOptions; /** * Returns a unique key that identifies the column within the table. * * @remarks * [Api set: ExcelApi 1.1] */ id?: boolean; /** * Returns the index number of the column within the columns collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ index?: boolean; /** * Specifies the name of the table column. * * @remarks * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] */ name?: boolean; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: boolean; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; } /** * Represents a collection of all the rows that are part of the table. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents the physical location of the table row, but not the data. That is, if the data is sorted or if new rows are added, a table row will continue to point at the index for which it was created. * * @remarks * [Api set: ExcelApi 1.1] */ interface TableRowCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the index number of the row within the rows collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ index?: boolean; /** * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; } /** * Represents a row in a table. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents the physical location of the table row, but not the data. That is, if the data is sorted or if new rows are added, a table row will continue to point at the index for which it was created. * * @remarks * [Api set: ExcelApi 1.1] */ interface TableRowLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the index number of the row within the rows collection of the table. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ index?: boolean; /** * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: boolean; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; } /** * Represents the data validation applied to the current range. To learn more about the data validation object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-data-validation | Add data validation to Excel ranges}. * * @remarks * [Api set: ExcelApi 1.8] */ interface DataValidationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Error alert when user enters invalid data. * * @remarks * [Api set: ExcelApi 1.8] */ errorAlert?: boolean; /** * Specifies if data validation will be performed on blank cells. Default is `true`. * * @remarks * [Api set: ExcelApi 1.8] */ ignoreBlanks?: boolean; /** * Prompt when users select a cell. * * @remarks * [Api set: ExcelApi 1.8] */ prompt?: boolean; /** * Data validation rule that contains different type of data validation criteria. * * @remarks * [Api set: ExcelApi 1.8] */ rule?: boolean; /** * Type of the data validation, see `Excel.DataValidationType` for details. * * @remarks * [Api set: ExcelApi 1.8] */ type?: boolean; /** * Represents if all cell values are valid according to the data validation rules. Returns `true` if all cell values are valid, or `false` if all cell values are invalid. Returns `null` if there are both valid and invalid cell values within the range. * * @remarks * [Api set: ExcelApi 1.8] */ valid?: boolean; } /** * Represents the results from `Range.removeDuplicates`. * * @remarks * [Api set: ExcelApi 1.9] */ interface RemoveDuplicatesResultLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Number of duplicated rows removed by the operation. * * @remarks * [Api set: ExcelApi 1.9] */ removed?: boolean; /** * Number of remaining unique rows present in the resulting range. * * @remarks * [Api set: ExcelApi 1.9] */ uniqueRemaining?: boolean; } /** * A format object encapsulating the range's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.1] */ interface RangeFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Collection of border objects that apply to the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; /** * Returns the fill object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ fill?: Excel.Interfaces.RangeFillLoadOptions; /** * Returns the font object defined on the overall range. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.RangeFontLoadOptions; /** * Returns the format protection object for a range. * * @remarks * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.FormatProtectionLoadOptions; /** * Specifies if text is automatically indented when text alignment is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.9] */ autoIndent?: boolean; /** * Specifies the width of all columns within the range. If the column widths are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ columnWidth?: boolean; /** * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ horizontalAlignment?: boolean; /** * An integer from 0 to 250 that indicates the indent level. * * @remarks * [Api set: ExcelApi 1.9] */ indentLevel?: boolean; /** * The reading order for the range. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder?: boolean; /** * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. * * @remarks * [Api set: ExcelApi 1.2] */ rowHeight?: boolean; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.9] */ shrinkToFit?: boolean; /** * The text orientation of all the cells within the range. The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. If the orientation within a range are not uniform, then `null` will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation?: boolean; /** * Determines if the row height of the `Range` object equals the standard height of the sheet. Returns `true` if the row height of the `Range` object equals the standard height of the sheet. Returns `null` if the range contains more than one row and the rows aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardHeight?: boolean; /** * Specifies if the column width of the `Range` object equals the standard width of the sheet. Returns `true` if the column width of the `Range` object equals the standard width of the sheet. Returns `null` if the range contains more than one column and the columns aren't all the same height. Returns `false` otherwise. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. * * @remarks * [Api set: ExcelApi 1.7] */ useStandardWidth?: boolean; /** * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.1] */ verticalAlignment?: boolean; /** * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting * * @remarks * [Api set: ExcelApi 1.1] */ wrapText?: boolean; } /** * Represents the format protection of a range object. * * @remarks * [Api set: ExcelApi 1.2] */ interface FormatProtectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. * * @remarks * [Api set: ExcelApi 1.2] */ formulaHidden?: boolean; /** * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. * * @remarks * [Api set: ExcelApi 1.2] */ locked?: boolean; } /** * Represents the background of a range object. * * @remarks * [Api set: ExcelApi 1.1] */ interface RangeFillLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.1] */ color?: boolean; /** * The pattern of a range. See `Excel.FillPattern` for details. LinearGradient and RectangularGradient are not supported. A `null` value indicates that the entire range doesn't have a uniform pattern setting. * * @remarks * [Api set: ExcelApi 1.9] */ pattern?: boolean; /** * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ patternColor?: boolean; /** * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ patternTintAndShade?: boolean; /** * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: boolean; } /** * Represents the border of an object. * * @remarks * [Api set: ExcelApi 1.1] */ interface RangeBorderLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.1] */ color?: boolean; /** * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.1] */ sideIndex?: boolean; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ style?: boolean; /** * Specifies a double that lightens or darkens a color for the range border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the border doesn't have a uniform `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: boolean; /** * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. * * @remarks * [Api set: ExcelApi 1.1] */ weight?: boolean; } /** * Represents the border objects that make up the range border. * * @remarks * [Api set: ExcelApi 1.1] */ interface RangeBorderCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.1] */ color?: boolean; /** * For EACH ITEM in the collection: Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.1] */ sideIndex?: boolean; /** * For EACH ITEM in the collection: One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ style?: boolean; /** * For EACH ITEM in the collection: Specifies a double that lightens or darkens a color for the range border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the border doesn't have a uniform `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: boolean; /** * For EACH ITEM in the collection: Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. * * @remarks * [Api set: ExcelApi 1.1] */ weight?: boolean; } /** * This object represents the font attributes (font name, font size, color, etc.) for an object. * * @remarks * [Api set: ExcelApi 1.1] */ interface RangeFontLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the bold status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color?: boolean; /** * Specifies the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic?: boolean; /** * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * Font size. * * @remarks * [Api set: ExcelApi 1.1] */ size?: boolean; /** * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. * * @remarks * [Api set: ExcelApi 1.9] */ strikethrough?: boolean; /** * Specifies the subscript status of font. Returns `true` if all the fonts of the range are subscript. Returns `false` if all the fonts of the range are superscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ subscript?: boolean; /** * Specifies the superscript status of font. Returns `true` if all the fonts of the range are superscript. Returns `false` if all the fonts of the range are subscript or normal (neither superscript, nor subscript). Returns `null` otherwise. * * @remarks * [Api set: ExcelApi 1.9] */ superscript?: boolean; /** * Specifies a double that lightens or darkens a color for the range font. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the entire range doesn't have a uniform font `tintAndShade` setting. * * @remarks * [Api set: ExcelApi 1.9] */ tintAndShade?: boolean; /** * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline?: boolean; } /** * A collection of all the chart objects on a worksheet. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents chart axes. * * @remarks * [Api set: ExcelApi 1.1] */ axes?: Excel.Interfaces.ChartAxesLoadOptions; /** * For EACH ITEM in the collection: Represents the data labels on the chart. * * @remarks * [Api set: ExcelApi 1.1] */ dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; /** * For EACH ITEM in the collection: Encapsulates the format properties for the chart area. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAreaFormatLoadOptions; /** * For EACH ITEM in the collection: Represents the legend for the chart. * * @remarks * [Api set: ExcelApi 1.1] */ legend?: Excel.Interfaces.ChartLegendLoadOptions; /** * For EACH ITEM in the collection: Encapsulates the options for a pivot chart. * * @remarks * [Api set: ExcelApi 1.9] */ pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; /** * For EACH ITEM in the collection: Represents the plot area for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotArea?: Excel.Interfaces.ChartPlotAreaLoadOptions; /** * For EACH ITEM in the collection: Represents either a single series or collection of series in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; /** * For EACH ITEM in the collection: Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * @remarks * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartTitleLoadOptions; /** * For EACH ITEM in the collection: The worksheet containing the current chart. * * @remarks * [Api set: ExcelApi 1.2] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Specifies a chart category label level enumeration constant, referring to the level of the source category labels. * * @remarks * [Api set: ExcelApi 1.8] */ categoryLabelLevel?: boolean; /** * For EACH ITEM in the collection: Specifies the type of the chart. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: boolean; /** * For EACH ITEM in the collection: Specifies the way that blank cells are plotted on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ displayBlanksAs?: boolean; /** * For EACH ITEM in the collection: Specifies the height, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ height?: boolean; /** * For EACH ITEM in the collection: The unique ID of chart. * * @remarks * [Api set: ExcelApi 1.7] */ id?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the chart to the worksheet origin. * * @remarks * [Api set: ExcelApi 1.1] */ left?: boolean; /** * For EACH ITEM in the collection: Specifies the name of a chart object. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies the way columns or rows are used as data series on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotBy?: boolean; /** * For EACH ITEM in the collection: True if only visible cells are plotted. False if both visible and hidden cells are plotted. * * @remarks * [Api set: ExcelApi 1.8] */ plotVisibleOnly?: boolean; /** * For EACH ITEM in the collection: Specifies a chart series name level enumeration constant, referring to the level of the source series names. * * @remarks * [Api set: ExcelApi 1.8] */ seriesNameLevel?: boolean; /** * For EACH ITEM in the collection: Specifies whether to display all field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.7] */ showAllFieldButtons?: boolean; /** * For EACH ITEM in the collection: Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * * @remarks * [Api set: ExcelApi 1.8] */ showDataLabelsOverMaximum?: boolean; /** * For EACH ITEM in the collection: Specifies the chart style for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ style?: boolean; /** * For EACH ITEM in the collection: Specifies the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). * * @remarks * [Api set: ExcelApi 1.1] */ top?: boolean; /** * For EACH ITEM in the collection: Specifies the width, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ width?: boolean; } /** * Represents a chart object in a workbook. To learn more about the chart object model, see {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | Work with charts using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents chart axes. * * @remarks * [Api set: ExcelApi 1.1] */ axes?: Excel.Interfaces.ChartAxesLoadOptions; /** * Represents the data labels on the chart. * * @remarks * [Api set: ExcelApi 1.1] */ dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; /** * Encapsulates the format properties for the chart area. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAreaFormatLoadOptions; /** * Represents the legend for the chart. * * @remarks * [Api set: ExcelApi 1.1] */ legend?: Excel.Interfaces.ChartLegendLoadOptions; /** * Encapsulates the options for a pivot chart. * * @remarks * [Api set: ExcelApi 1.9] */ pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; /** * Represents the plot area for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotArea?: Excel.Interfaces.ChartPlotAreaLoadOptions; /** * Represents either a single series or collection of series in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; /** * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * @remarks * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartTitleLoadOptions; /** * The worksheet containing the current chart. * * @remarks * [Api set: ExcelApi 1.2] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. * * @remarks * [Api set: ExcelApi 1.8] */ categoryLabelLevel?: boolean; /** * Specifies the type of the chart. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: boolean; /** * Specifies the way that blank cells are plotted on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ displayBlanksAs?: boolean; /** * Specifies the height, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ height?: boolean; /** * The unique ID of chart. * * @remarks * [Api set: ExcelApi 1.7] */ id?: boolean; /** * The distance, in points, from the left side of the chart to the worksheet origin. * * @remarks * [Api set: ExcelApi 1.1] */ left?: boolean; /** * Specifies the name of a chart object. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * Specifies the way columns or rows are used as data series on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ plotBy?: boolean; /** * True if only visible cells are plotted. False if both visible and hidden cells are plotted. * * @remarks * [Api set: ExcelApi 1.8] */ plotVisibleOnly?: boolean; /** * Specifies a chart series name level enumeration constant, referring to the level of the source series names. * * @remarks * [Api set: ExcelApi 1.8] */ seriesNameLevel?: boolean; /** * Specifies whether to display all field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.7] */ showAllFieldButtons?: boolean; /** * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * * @remarks * [Api set: ExcelApi 1.8] */ showDataLabelsOverMaximum?: boolean; /** * Specifies the chart style for the chart. * * @remarks * [Api set: ExcelApi 1.8] */ style?: boolean; /** * Specifies the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). * * @remarks * [Api set: ExcelApi 1.1] */ top?: boolean; /** * Specifies the width, in points, of the chart object. * * @remarks * [Api set: ExcelApi 1.1] */ width?: boolean; } /** * Encapsulates the options for the pivot chart. * * @remarks * [Api set: ExcelApi 1.9] */ interface ChartPivotOptionsLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies whether to display the axis field buttons on a PivotChart. The `showAxisFieldButtons` property corresponds to the "Show Axis Field Buttons" command on the "Field Buttons" drop-down list of the "Analyze" tab, which is available when a PivotChart is selected. * * @remarks * [Api set: ExcelApi 1.9] */ showAxisFieldButtons?: boolean; /** * Specifies whether to display the legend field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showLegendFieldButtons?: boolean; /** * Specifies whether to display the report filter field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showReportFilterFieldButtons?: boolean; /** * Specifies whether to display the show value field buttons on a PivotChart. * * @remarks * [Api set: ExcelApi 1.9] */ showValueFieldButtons?: boolean; } /** * Encapsulates the format properties for the overall chart area. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartAreaFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the border format of chart area, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderLoadOptions; /** * Represents the font attributes (font name, font size, color, etc.) for the current object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontLoadOptions; /** * Specifies the color scheme of the chart. * * @remarks * [Api set: ExcelApi 1.9] */ colorScheme?: boolean; /** * Specifies if the chart area of the chart has rounded corners. * * @remarks * [Api set: ExcelApi 1.9] */ roundedCorners?: boolean; } /** * Represents a collection of chart series. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartSeriesCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Encapsulates the bin options for histogram charts and pareto charts. * * @remarks * [Api set: ExcelApi 1.9] */ binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; /** * For EACH ITEM in the collection: Encapsulates the options for the box and whisker charts. * * @remarks * [Api set: ExcelApi 1.9] */ boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; /** * For EACH ITEM in the collection: Represents a collection of all data labels in the series. * * @remarks * [Api set: ExcelApi 1.8] */ dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; /** * For EACH ITEM in the collection: Represents the formatting of a chart series, which includes fill and line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; /** * For EACH ITEM in the collection: Encapsulates the options for a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; /** * For EACH ITEM in the collection: Returns a collection of all points in the series. * * @remarks * [Api set: ExcelApi 1.1] */ points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; /** * For EACH ITEM in the collection: Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ xErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; /** * For EACH ITEM in the collection: Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ yErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; /** * For EACH ITEM in the collection: Specifies the group for the specified series. * * @remarks * [Api set: ExcelApi 1.8] */ axisGroup?: boolean; /** * For EACH ITEM in the collection: This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. * * @remarks * [Api set: ExcelApi 1.9] */ bubbleScale?: boolean; /** * For EACH ITEM in the collection: Represents the chart type of a series. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: boolean; /** * For EACH ITEM in the collection: Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws an `InvalidArgument` error on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ doughnutHoleSize?: boolean; /** * For EACH ITEM in the collection: Specifies the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). * * @remarks * [Api set: ExcelApi 1.8] */ explosion?: boolean; /** * For EACH ITEM in the collection: Specifies if the series is filtered. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ filtered?: boolean; /** * For EACH ITEM in the collection: Specifies the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. * * @remarks * [Api set: ExcelApi 1.8] */ firstSliceAngle?: boolean; /** * For EACH ITEM in the collection: Represents the gap width of a chart series. Only valid on bar and column charts, as well as specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ gapWidth?: boolean; /** * For EACH ITEM in the collection: Specifies the color for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumColor?: boolean; /** * For EACH ITEM in the collection: Specifies the type for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumType?: boolean; /** * For EACH ITEM in the collection: Specifies the maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumValue?: boolean; /** * For EACH ITEM in the collection: Specifies the color for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointColor?: boolean; /** * For EACH ITEM in the collection: Specifies the type for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointType?: boolean; /** * For EACH ITEM in the collection: Specifies the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointValue?: boolean; /** * For EACH ITEM in the collection: Specifies the color for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumColor?: boolean; /** * For EACH ITEM in the collection: Specifies the type for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumType?: boolean; /** * For EACH ITEM in the collection: Specifies the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumValue?: boolean; /** * For EACH ITEM in the collection: Specifies the series gradient style of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ gradientStyle?: boolean; /** * For EACH ITEM in the collection: Specifies if the series has data labels. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; /** * For EACH ITEM in the collection: Specifies the fill color for negative data points in a series. * * @remarks * [Api set: ExcelApi 1.9] */ invertColor?: boolean; /** * For EACH ITEM in the collection: True if Excel inverts the pattern in the item when it corresponds to a negative number. * * @remarks * [Api set: ExcelApi 1.8] */ invertIfNegative?: boolean; /** * For EACH ITEM in the collection: Specifies the marker background color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: boolean; /** * For EACH ITEM in the collection: Specifies the marker foreground color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: boolean; /** * For EACH ITEM in the collection: Specifies the marker size of a chart series. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: boolean; /** * For EACH ITEM in the collection: Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: boolean; /** * For EACH ITEM in the collection: Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies how bars and columns are positioned. Can be a value between -100 and 100. Applies only to 2-D bar and 2-D column charts. * * @remarks * [Api set: ExcelApi 1.8] */ overlap?: boolean; /** * For EACH ITEM in the collection: Specifies the series parent label strategy area for a treemap chart. * * @remarks * [Api set: ExcelApi 1.9] */ parentLabelStrategy?: boolean; /** * For EACH ITEM in the collection: Specifies the plot order of a chart series within the chart group. * * @remarks * [Api set: ExcelApi 1.7] */ plotOrder?: boolean; /** * For EACH ITEM in the collection: Specifies the size of the secondary section of either a pie-of-pie chart or a bar-of-pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. * * @remarks * [Api set: ExcelApi 1.8] */ secondPlotSize?: boolean; /** * For EACH ITEM in the collection: Specifies whether connector lines are shown in waterfall charts. * * @remarks * [Api set: ExcelApi 1.9] */ showConnectorLines?: boolean; /** * For EACH ITEM in the collection: Specifies whether leader lines are displayed for each data label in the series. * * @remarks * [Api set: ExcelApi 1.9] */ showLeaderLines?: boolean; /** * For EACH ITEM in the collection: Specifies if the series has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * For EACH ITEM in the collection: Specifies if the series is smooth. Only applicable to line and scatter charts. * * @remarks * [Api set: ExcelApi 1.7] */ smooth?: boolean; /** * For EACH ITEM in the collection: Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. * * @remarks * [Api set: ExcelApi 1.8] */ splitType?: boolean; /** * For EACH ITEM in the collection: Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. * * @remarks * [Api set: ExcelApi 1.9] */ splitValue?: boolean; /** * For EACH ITEM in the collection: True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. * * @remarks * [Api set: ExcelApi 1.8] */ varyByCategories?: boolean; } /** * Represents a series in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartSeriesLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Encapsulates the bin options for histogram charts and pareto charts. * * @remarks * [Api set: ExcelApi 1.9] */ binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; /** * Encapsulates the options for the box and whisker charts. * * @remarks * [Api set: ExcelApi 1.9] */ boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; /** * Represents a collection of all data labels in the series. * * @remarks * [Api set: ExcelApi 1.8] */ dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; /** * Represents the formatting of a chart series, which includes fill and line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; /** * Encapsulates the options for a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; /** * Returns a collection of all points in the series. * * @remarks * [Api set: ExcelApi 1.1] */ points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ xErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; /** * Represents the error bar object of a chart series. * * @remarks * [Api set: ExcelApi 1.9] */ yErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; /** * Specifies the group for the specified series. * * @remarks * [Api set: ExcelApi 1.8] */ axisGroup?: boolean; /** * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. * * @remarks * [Api set: ExcelApi 1.9] */ bubbleScale?: boolean; /** * Represents the chart type of a series. See `Excel.ChartType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ chartType?: boolean; /** * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws an `InvalidArgument` error on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ doughnutHoleSize?: boolean; /** * Specifies the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). * * @remarks * [Api set: ExcelApi 1.8] */ explosion?: boolean; /** * Specifies if the series is filtered. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ filtered?: boolean; /** * Specifies the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. * * @remarks * [Api set: ExcelApi 1.8] */ firstSliceAngle?: boolean; /** * Represents the gap width of a chart series. Only valid on bar and column charts, as well as specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. * * @remarks * [Api set: ExcelApi 1.7] */ gapWidth?: boolean; /** * Specifies the color for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumColor?: boolean; /** * Specifies the type for maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumType?: boolean; /** * Specifies the maximum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMaximumValue?: boolean; /** * Specifies the color for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointColor?: boolean; /** * Specifies the type for the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointType?: boolean; /** * Specifies the midpoint value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMidpointValue?: boolean; /** * Specifies the color for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumColor?: boolean; /** * Specifies the type for the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumType?: boolean; /** * Specifies the minimum value of a region map chart series. * * @remarks * [Api set: ExcelApi 1.9] */ gradientMinimumValue?: boolean; /** * Specifies the series gradient style of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ gradientStyle?: boolean; /** * Specifies if the series has data labels. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; /** * Specifies the fill color for negative data points in a series. * * @remarks * [Api set: ExcelApi 1.9] */ invertColor?: boolean; /** * True if Excel inverts the pattern in the item when it corresponds to a negative number. * * @remarks * [Api set: ExcelApi 1.8] */ invertIfNegative?: boolean; /** * Specifies the marker background color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: boolean; /** * Specifies the marker foreground color of a chart series. * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: boolean; /** * Specifies the marker size of a chart series. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: boolean; /** * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: boolean; /** * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * Specifies how bars and columns are positioned. Can be a value between -100 and 100. Applies only to 2-D bar and 2-D column charts. * * @remarks * [Api set: ExcelApi 1.8] */ overlap?: boolean; /** * Specifies the series parent label strategy area for a treemap chart. * * @remarks * [Api set: ExcelApi 1.9] */ parentLabelStrategy?: boolean; /** * Specifies the plot order of a chart series within the chart group. * * @remarks * [Api set: ExcelApi 1.7] */ plotOrder?: boolean; /** * Specifies the size of the secondary section of either a pie-of-pie chart or a bar-of-pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. * * @remarks * [Api set: ExcelApi 1.8] */ secondPlotSize?: boolean; /** * Specifies whether connector lines are shown in waterfall charts. * * @remarks * [Api set: ExcelApi 1.9] */ showConnectorLines?: boolean; /** * Specifies whether leader lines are displayed for each data label in the series. * * @remarks * [Api set: ExcelApi 1.9] */ showLeaderLines?: boolean; /** * Specifies if the series has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies if the series is smooth. Only applicable to line and scatter charts. * * @remarks * [Api set: ExcelApi 1.7] */ smooth?: boolean; /** * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. * * @remarks * [Api set: ExcelApi 1.8] */ splitType?: boolean; /** * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. * * @remarks * [Api set: ExcelApi 1.9] */ splitValue?: boolean; /** * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. * * @remarks * [Api set: ExcelApi 1.8] */ varyByCategories?: boolean; } /** * Encapsulates the format properties for the chart series * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartSeriesFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatLoadOptions; } /** * A collection of all the chart points within a series inside a chart. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartPointsCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the data label of a chart point. * * @remarks * [Api set: ExcelApi 1.7] */ dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; /** * For EACH ITEM in the collection: Encapsulates the format properties chart point. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartPointFormatLoadOptions; /** * For EACH ITEM in the collection: Represents whether a data point has a data label. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabel?: boolean; /** * For EACH ITEM in the collection: HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: boolean; /** * For EACH ITEM in the collection: HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: boolean; /** * For EACH ITEM in the collection: Represents marker size of a data point. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: boolean; /** * For EACH ITEM in the collection: Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: boolean; /** * For EACH ITEM in the collection: Returns the value of a chart point. * * @remarks * [Api set: ExcelApi 1.1] */ value?: boolean; } /** * Represents a point of a series in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartPointLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the data label of a chart point. * * @remarks * [Api set: ExcelApi 1.7] */ dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; /** * Encapsulates the format properties chart point. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartPointFormatLoadOptions; /** * Represents whether a data point has a data label. Not applicable for surface charts. * * @remarks * [Api set: ExcelApi 1.7] */ hasDataLabel?: boolean; /** * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerBackgroundColor?: boolean; /** * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.7] */ markerForegroundColor?: boolean; /** * Represents marker size of a data point. The supported size range is 2 to 72. This method returns an InvalidArgument error if it's set with a size outside of the supported range. * * @remarks * [Api set: ExcelApi 1.7] */ markerSize?: boolean; /** * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ markerStyle?: boolean; /** * Returns the value of a chart point. * * @remarks * [Api set: ExcelApi 1.1] */ value?: boolean; } /** * Represents the formatting object for chart points. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartPointFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the border format of a chart data point, which includes color, style, and weight information. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderLoadOptions; } /** * Represents the chart axes. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartAxesLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the category axis in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ categoryAxis?: Excel.Interfaces.ChartAxisLoadOptions; /** * Represents the series axis of a 3-D chart. * * @remarks * [Api set: ExcelApi 1.1] */ seriesAxis?: Excel.Interfaces.ChartAxisLoadOptions; /** * Represents the value axis in an axis. * * @remarks * [Api set: ExcelApi 1.1] */ valueAxis?: Excel.Interfaces.ChartAxisLoadOptions; } /** * Represents a single axis in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartAxisLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the formatting of a chart object, which includes line and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAxisFormatLoadOptions; /** * Returns an object that represents the major gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ majorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; /** * Returns an object that represents the minor gridlines for the specified axis. * * @remarks * [Api set: ExcelApi 1.1] */ minorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; /** * Represents the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartAxisTitleLoadOptions; /** * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. * * @remarks * [Api set: ExcelApi 1.8] */ alignment?: boolean; /** * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. * * @remarks * [Api set: ExcelApi 1.7] */ axisGroup?: boolean; /** * Specifies the base unit for the specified category axis. * * @remarks * [Api set: ExcelApi 1.7] */ baseTimeUnit?: boolean; /** * Specifies the category axis type. * * @remarks * [Api set: ExcelApi 1.7] */ categoryType?: boolean; /** * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. * * @remarks * [Api set: ExcelApi 1.7] */ customDisplayUnit?: boolean; /** * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. * * @remarks * [Api set: ExcelApi 1.7] */ displayUnit?: boolean; /** * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height?: boolean; /** * Specifies if the value axis crosses the category axis between categories. * * @remarks * [Api set: ExcelApi 1.8] */ isBetweenCategories?: boolean; /** * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: boolean; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * Specifies the base of the logarithm when using logarithmic scales. * * @remarks * [Api set: ExcelApi 1.7] */ logBase?: boolean; /** * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ majorTickMark?: boolean; /** * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ majorTimeUnitScale?: boolean; /** * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ majorUnit?: boolean; /** * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ maximum?: boolean; /** * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minimum?: boolean; /** * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. * * @remarks * [Api set: ExcelApi 1.7] */ minorTickMark?: boolean; /** * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. * * @remarks * [Api set: ExcelApi 1.7] */ minorTimeUnitScale?: boolean; /** * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.1] */ minorUnit?: boolean; /** * Specifies if an axis is multilevel. * * @remarks * [Api set: ExcelApi 1.8] */ multiLevel?: boolean; /** * Specifies the format code for the axis tick label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: boolean; /** * Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. * * @remarks * [Api set: ExcelApi 1.8] */ offset?: boolean; /** * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; /** * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. * * @remarks * [Api set: ExcelApi 1.8] */ positionAt?: boolean; /** * Specifies if Excel plots data points from last to first. * * @remarks * [Api set: ExcelApi 1.7] */ reversePlotOrder?: boolean; /** * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ scaleType?: boolean; /** * Specifies if the axis display unit label is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showDisplayUnitLabel?: boolean; /** * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: boolean; /** * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelPosition?: boolean; /** * Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ tickLabelSpacing?: boolean; /** * Specifies the number of categories or series between tick marks. * * @remarks * [Api set: ExcelApi 1.7] */ tickMarkSpacing?: boolean; /** * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ top?: boolean; /** * Specifies the axis type. See `Excel.ChartAxisType` for details. * * @remarks * [Api set: ExcelApi 1.7] */ type?: boolean; /** * Specifies if the axis is visible. * * @remarks * [Api set: ExcelApi 1.7] */ visible?: boolean; /** * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width?: boolean; } /** * Encapsulates the format properties for the chart axis. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartAxisFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontLoadOptions; /** * Specifies chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatLoadOptions; } /** * Represents the title of a chart axis. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartAxisTitleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the formatting of the chart axis title. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions; /** * Specifies the axis title. * * @remarks * [Api set: ExcelApi 1.1] */ text?: boolean; /** * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.12] */ textOrientation?: boolean; /** * Specifies if the axis title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** * Represents the chart axis title formatting. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartAxisTitleFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the chart axis title's border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderLoadOptions; /** * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontLoadOptions; } /** * Represents a collection of all the data labels on a chart point. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartDataLabelsLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the format of chart data labels, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; /** * Specifies if data labels automatically generate appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when the `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: boolean; /** * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * Specifies the format code for data labels. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: boolean; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position?: boolean; /** * String representing the separator used for the data labels on a chart. * * @remarks * [Api set: ExcelApi 1.1] */ separator?: boolean; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showBubbleSize?: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showCategoryName?: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showLegendKey?: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showPercentage?: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showSeriesName?: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.1] */ showValue?: boolean; /** * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: boolean; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of the data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: boolean; } /** * Represents the data label of a chart point. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartDataLabelLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the format of chart data label. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; /** * Specifies if the data label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * String value that represents the formula of chart data label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula?: boolean; /** * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ height?: boolean; /** * Represents the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of data label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: boolean; /** * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left?: boolean; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * String value that represents the format code for data label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: boolean; /** * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position?: boolean; /** * String representing the separator used for the data label on a chart. * * @remarks * [Api set: ExcelApi 1.7] */ separator?: boolean; /** * Specifies if the data label bubble size is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showBubbleSize?: boolean; /** * Specifies if the data label category name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showCategoryName?: boolean; /** * Specifies if the data label legend key is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showLegendKey?: boolean; /** * Specifies if the data label percentage is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showPercentage?: boolean; /** * Specifies if the data label series name is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showSeriesName?: boolean; /** * Specifies if the data label value is visible. * * @remarks * [Api set: ExcelApi 1.7] */ showValue?: boolean; /** * String representing the text of the data label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text?: boolean; /** * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: boolean; /** * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top?: boolean; /** * Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of data label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: boolean; /** * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ width?: boolean; } /** * Encapsulates the format properties for the chart data labels. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartDataLabelFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderLoadOptions; /** * Represents the font attributes (such as font name, font size, and color) for a chart data label. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontLoadOptions; } /** * Represents the data table object of a chart. * * @remarks * [Api set: ExcelApi 1.14] */ interface ChartDataTableLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the format of a chart data table, which includes fill, font, and border format. * * @remarks * [Api set: ExcelApi 1.14] */ format?: Excel.Interfaces.ChartDataTableFormatLoadOptions; /** * Specifies whether to display the horizontal border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showHorizontalBorder?: boolean; /** * Specifies whether to show the legend key of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showLegendKey?: boolean; /** * Specifies whether to display the outline border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showOutlineBorder?: boolean; /** * Specifies whether to display the vertical border of the data table. * * @remarks * [Api set: ExcelApi 1.14] */ showVerticalBorder?: boolean; /** * Specifies whether to show the data table of the chart. * * @remarks * [Api set: ExcelApi 1.14] */ visible?: boolean; } /** * Represents the format of a chart data table. * * @remarks * [Api set: ExcelApi 1.14] */ interface ChartDataTableFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the border format of chart data table, which includes color, line style, and weight. * * @remarks * [Api set: ExcelApi 1.14] */ border?: Excel.Interfaces.ChartBorderLoadOptions; /** * Represents the font attributes (such as font name, font size, and color) for the current object. * * @remarks * [Api set: ExcelApi 1.14] */ font?: Excel.Interfaces.ChartFontLoadOptions; } /** * This object represents the attributes for a chart's error bars. * * @remarks * [Api set: ExcelApi 1.9] */ interface ChartErrorBarsLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the formatting type of the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions; /** * Specifies if error bars have an end style cap. * * @remarks * [Api set: ExcelApi 1.9] */ endStyleCap?: boolean; /** * Specifies which parts of the error bars to include. * * @remarks * [Api set: ExcelApi 1.9] */ include?: boolean; /** * The type of range marked by the error bars. * * @remarks * [Api set: ExcelApi 1.9] */ type?: boolean; /** * Specifies whether the error bars are displayed. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; } /** * Encapsulates the format properties for chart error bars. * * @remarks * [Api set: ExcelApi 1.9] */ interface ChartErrorBarsFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the chart line formatting. * * @remarks * [Api set: ExcelApi 1.9] */ line?: Excel.Interfaces.ChartLineFormatLoadOptions; } /** * Represents major or minor gridlines on a chart axis. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartGridlinesLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the formatting of chart gridlines. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartGridlinesFormatLoadOptions; /** * Specifies if the axis gridlines are visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; } /** * Encapsulates the format properties for chart gridlines. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartGridlinesFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.1] */ line?: Excel.Interfaces.ChartLineFormatLoadOptions; } /** * Represents the legend in a chart. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartLegendLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the formatting of a chart legend, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartLegendFormatLoadOptions; /** * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height?: boolean; /** * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: boolean; /** * Specifies if the chart legend should overlap with the main body of the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay?: boolean; /** * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. * * @remarks * [Api set: ExcelApi 1.1] */ position?: boolean; /** * Specifies if the legend has a shadow on the chart. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies the top of a chart legend. * * @remarks * [Api set: ExcelApi 1.7] */ top?: boolean; /** * Specifies if the chart legend is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; /** * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width?: boolean; } /** * Represents the legend entry in `legendEntryCollection`. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartLegendEntryLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the height of the legend entry on the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ height?: boolean; /** * Specifies the index of the legend entry in the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ index?: boolean; /** * Specifies the left value of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ left?: boolean; /** * Specifies the top of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ top?: boolean; /** * Represents the visibility of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.7] */ visible?: boolean; /** * Represents the width of the legend entry on the chart Legend. * * @remarks * [Api set: ExcelApi 1.8] */ width?: boolean; } /** * Represents a collection of legend entries. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartLegendEntryCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the height of the legend entry on the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ height?: boolean; /** * For EACH ITEM in the collection: Specifies the index of the legend entry in the chart legend. * * @remarks * [Api set: ExcelApi 1.8] */ index?: boolean; /** * For EACH ITEM in the collection: Specifies the left value of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ left?: boolean; /** * For EACH ITEM in the collection: Specifies the top of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.8] */ top?: boolean; /** * For EACH ITEM in the collection: Represents the visibility of a chart legend entry. * * @remarks * [Api set: ExcelApi 1.7] */ visible?: boolean; /** * For EACH ITEM in the collection: Represents the width of the legend entry on the chart Legend. * * @remarks * [Api set: ExcelApi 1.8] */ width?: boolean; } /** * Encapsulates the format properties of a chart legend. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartLegendFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderLoadOptions; /** * Represents the font attributes such as font name, font size, and color of a chart legend. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontLoadOptions; } /** * Encapsulates the properties for a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ interface ChartMapOptionsLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the series map labels strategy of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ labelStrategy?: boolean; /** * Specifies the series mapping level of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ level?: boolean; /** * Specifies the series projection type of a region map chart. * * @remarks * [Api set: ExcelApi 1.9] */ projectionType?: boolean; } /** * Represents a chart title object of a chart. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartTitleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the formatting of a chart title, which includes fill and font formatting. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartTitleFormatLoadOptions; /** * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ height?: boolean; /** * Specifies the horizontal alignment for chart title. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment?: boolean; /** * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ left?: boolean; /** * Specifies if the chart title will overlay the chart. * * @remarks * [Api set: ExcelApi 1.1] */ overlay?: boolean; /** * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. * * @remarks * [Api set: ExcelApi 1.7] */ position?: boolean; /** * Represents a boolean value that determines if the chart title has a shadow. * * @remarks * [Api set: ExcelApi 1.7] */ showShadow?: boolean; /** * Specifies the chart's title text. * * @remarks * [Api set: ExcelApi 1.1] */ text?: boolean; /** * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.7] */ textOrientation?: boolean; /** * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ top?: boolean; /** * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment?: boolean; /** * Specifies if the chart title is visible. * * @remarks * [Api set: ExcelApi 1.1] */ visible?: boolean; /** * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. * * @remarks * [Api set: ExcelApi 1.7] */ width?: boolean; } /** * Represents the substring in chart related objects that contain text, like a `ChartTitle` object or `ChartAxisTitle` object. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartFormatStringLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the font attributes, such as font name, font size, and color of a chart characters object. * * @remarks * [Api set: ExcelApi 1.7] */ font?: Excel.Interfaces.ChartFontLoadOptions; } /** * Provides access to the formatting options for a chart title. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartTitleFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the border format of chart title, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.7] */ border?: Excel.Interfaces.ChartBorderLoadOptions; /** * Represents the font attributes (such as font name, font size, and color) for an object. * * @remarks * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontLoadOptions; } /** * Represents the border formatting of a chart element. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartBorderLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of borders in the chart. * * @remarks * [Api set: ExcelApi 1.7] */ color?: boolean; /** * Represents the line style of the border. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle?: boolean; /** * Represents weight of the border, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight?: boolean; } /** * Encapsulates the bin options for histogram charts and pareto charts. * * @remarks * [Api set: ExcelApi 1.9] */ interface ChartBinOptionsLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies if bin overflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowOverflow?: boolean; /** * Specifies if bin underflow is enabled in a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ allowUnderflow?: boolean; /** * Specifies the bin count of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ count?: boolean; /** * Specifies the bin overflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ overflowValue?: boolean; /** * Specifies the bin's type for a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ type?: boolean; /** * Specifies the bin underflow value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ underflowValue?: boolean; /** * Specifies the bin width value of a histogram chart or pareto chart. * * @remarks * [Api set: ExcelApi 1.9] */ width?: boolean; } /** * Represents the properties of a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ interface ChartBoxwhiskerOptionsLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies if the quartile calculation type of a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ quartileCalculation?: boolean; /** * Specifies if inner points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showInnerPoints?: boolean; /** * Specifies if the mean line is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanLine?: boolean; /** * Specifies if the mean marker is shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showMeanMarker?: boolean; /** * Specifies if outlier points are shown in a box and whisker chart. * * @remarks * [Api set: ExcelApi 1.9] */ showOutlierPoints?: boolean; } /** * Encapsulates the formatting options for line elements. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartLineFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of lines in the chart. * * @remarks * [Api set: ExcelApi 1.1] */ color?: boolean; /** * Represents the line style. See `Excel.ChartLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.7] */ lineStyle?: boolean; /** * Represents weight of the line, in points. * * @remarks * [Api set: ExcelApi 1.7] */ weight?: boolean; } /** * This object represents the font attributes (such as font name, font size, and color) for a chart object. * * @remarks * [Api set: ExcelApi 1.1] */ interface ChartFontLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the bold status of font. * * @remarks * [Api set: ExcelApi 1.1] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.1] */ color?: boolean; /** * Represents the italic status of the font. * * @remarks * [Api set: ExcelApi 1.1] */ italic?: boolean; /** * Font name (e.g., "Calibri") * * @remarks * [Api set: ExcelApi 1.1] */ name?: boolean; /** * Size of the font (e.g., 11) * * @remarks * [Api set: ExcelApi 1.1] */ size?: boolean; /** * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.1] */ underline?: boolean; } /** * This object represents the attributes for a chart trendline object. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartTrendlineLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the formatting of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; /** * Represents the label of a chart trendline. * * @remarks * [Api set: ExcelApi 1.8] */ label?: Excel.Interfaces.ChartTrendlineLabelLoadOptions; /** * Represents the number of periods that the trendline extends backward. * * @remarks * [Api set: ExcelApi 1.8] */ backwardPeriod?: boolean; /** * Represents the number of periods that the trendline extends forward. * * @remarks * [Api set: ExcelApi 1.8] */ forwardPeriod?: boolean; /** * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ intercept?: boolean; /** * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. * * @remarks * [Api set: ExcelApi 1.7] */ movingAveragePeriod?: boolean; /** * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string * * @remarks * [Api set: ExcelApi 1.7] */ name?: boolean; /** * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. * * @remarks * [Api set: ExcelApi 1.7] */ polynomialOrder?: boolean; /** * True if the equation for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showEquation?: boolean; /** * True if the r-squared value for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showRSquared?: boolean; /** * Represents the type of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ type?: boolean; } /** * Represents a collection of chart trendlines. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartTrendlineCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the formatting of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; /** * For EACH ITEM in the collection: Represents the label of a chart trendline. * * @remarks * [Api set: ExcelApi 1.8] */ label?: Excel.Interfaces.ChartTrendlineLabelLoadOptions; /** * For EACH ITEM in the collection: Represents the number of periods that the trendline extends backward. * * @remarks * [Api set: ExcelApi 1.8] */ backwardPeriod?: boolean; /** * For EACH ITEM in the collection: Represents the number of periods that the trendline extends forward. * * @remarks * [Api set: ExcelApi 1.8] */ forwardPeriod?: boolean; /** * For EACH ITEM in the collection: Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. * * @remarks * [Api set: ExcelApi 1.7] */ intercept?: boolean; /** * For EACH ITEM in the collection: Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. * * @remarks * [Api set: ExcelApi 1.7] */ movingAveragePeriod?: boolean; /** * For EACH ITEM in the collection: Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string * * @remarks * [Api set: ExcelApi 1.7] */ name?: boolean; /** * For EACH ITEM in the collection: Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. * * @remarks * [Api set: ExcelApi 1.7] */ polynomialOrder?: boolean; /** * For EACH ITEM in the collection: True if the equation for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showEquation?: boolean; /** * For EACH ITEM in the collection: True if the r-squared value for the trendline is displayed on the chart. * * @remarks * [Api set: ExcelApi 1.8] */ showRSquared?: boolean; /** * For EACH ITEM in the collection: Represents the type of a chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ type?: boolean; } /** * Represents the format properties for the chart trendline. * * @remarks * [Api set: ExcelApi 1.7] */ interface ChartTrendlineFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents chart line formatting. * * @remarks * [Api set: ExcelApi 1.7] */ line?: Excel.Interfaces.ChartLineFormatLoadOptions; } /** * This object represents the attributes for a chart trendline label object. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartTrendlineLabelLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The format of the chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions; /** * Specifies if the trendline label automatically generates appropriate text based on context. * * @remarks * [Api set: ExcelApi 1.8] */ autoText?: boolean; /** * String value that represents the formula of the chart trendline label using A1-style notation. * * @remarks * [Api set: ExcelApi 1.8] */ formula?: boolean; /** * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ height?: boolean; /** * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. * * @remarks * [Api set: ExcelApi 1.8] */ horizontalAlignment?: boolean; /** * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ left?: boolean; /** * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). * * @remarks * [Api set: ExcelApi 1.9] */ linkNumberFormat?: boolean; /** * String value that represents the format code for the trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: boolean; /** * String representing the text of the trendline label on a chart. * * @remarks * [Api set: ExcelApi 1.8] */ text?: boolean; /** * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: boolean; /** * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ top?: boolean; /** * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is 0. * * @remarks * [Api set: ExcelApi 1.8] */ verticalAlignment?: boolean; /** * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. * * @remarks * [Api set: ExcelApi 1.8] */ width?: boolean; } /** * Encapsulates the format properties for the chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartTrendlineLabelFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the border format, which includes color, linestyle, and weight. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderLoadOptions; /** * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. * * @remarks * [Api set: ExcelApi 1.8] */ font?: Excel.Interfaces.ChartFontLoadOptions; } /** * This object represents the attributes for a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartPlotAreaLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the formatting of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ format?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions; /** * Specifies the height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ height?: boolean; /** * Specifies the inside height value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideHeight?: boolean; /** * Specifies the inside left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideLeft?: boolean; /** * Specifies the inside top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideTop?: boolean; /** * Specifies the inside width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ insideWidth?: boolean; /** * Specifies the left value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ left?: boolean; /** * Specifies the position of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; /** * Specifies the top value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ top?: boolean; /** * Specifies the width value of a plot area. * * @remarks * [Api set: ExcelApi 1.8] */ width?: boolean; } /** * Represents the format properties for a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ interface ChartPlotAreaFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the border attributes of a chart plot area. * * @remarks * [Api set: ExcelApi 1.8] */ border?: Excel.Interfaces.ChartBorderLoadOptions; } /** * Manages sorting operations on `Table` objects. * * @remarks * [Api set: ExcelApi 1.2] */ interface TableSortLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the current conditions used to last sort the table. * * @remarks * [Api set: ExcelApi 1.2] */ fields?: boolean; /** * Specifies if the casing impacts the last sort of the table. * * @remarks * [Api set: ExcelApi 1.2] */ matchCase?: boolean; /** * Represents the Chinese character ordering method last used to sort the table. * * @remarks * [Api set: ExcelApi 1.2] */ method?: boolean; } /** * Manages the filtering of a table's column. * * @remarks * [Api set: ExcelApi 1.2] */ interface FilterLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The currently applied filter on the given column. * * @remarks * [Api set: ExcelApi 1.2] */ criteria?: boolean; } /** * Represents the `AutoFilter` object. AutoFilter turns the values in Excel column into specific filters based on the cell contents. * * @remarks * [Api set: ExcelApi 1.9] */ interface AutoFilterLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * An array that holds all the filter criteria in the autofiltered range. * * @remarks * [Api set: ExcelApi 1.9] */ criteria?: boolean; /** * Specifies if the AutoFilter is enabled. * * @remarks * [Api set: ExcelApi 1.9] */ enabled?: boolean; /** * Specifies if the AutoFilter has filter criteria. * * @remarks * [Api set: ExcelApi 1.9] */ isDataFiltered?: boolean; } /** * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. * * @remarks * [Api set: ExcelApi 1.11] */ interface CultureInfoLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.12] */ datetimeFormat?: Excel.Interfaces.DatetimeFormatInfoLoadOptions; /** * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.11] */ numberFormat?: Excel.Interfaces.NumberFormatInfoLoadOptions; /** * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ name?: boolean; } /** * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.11] */ interface NumberFormatInfoLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the currency symbol for currency values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.17] */ currencySymbol?: boolean; /** * Gets the string used as the decimal separator for numeric values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ numberDecimalSeparator?: boolean; /** * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.11] */ numberGroupSeparator?: boolean; } /** * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. * * @remarks * [Api set: ExcelApi 1.12] */ interface DatetimeFormatInfoLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the string used as the date separator. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ dateSeparator?: boolean; /** * Gets the format string for a long date value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ longDatePattern?: boolean; /** * Gets the format string for a long time value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ longTimePattern?: boolean; /** * Gets the format string for a short date value. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ shortDatePattern?: boolean; /** * Gets the string used as the time separator. This is based on current system settings. * * @remarks * [Api set: ExcelApi 1.12] */ timeSeparator?: boolean; } /** * A scoped collection of custom XML parts. A scoped collection is the result of some operation (e.g., filtering by namespace). A scoped collection cannot be scoped any further. * * @remarks * [Api set: ExcelApi 1.5] */ interface CustomXmlPartScopedCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The custom XML part's ID. * * @remarks * [Api set: ExcelApi 1.5] */ id?: boolean; /** * For EACH ITEM in the collection: The custom XML part's namespace URI. * * @remarks * [Api set: ExcelApi 1.5] */ namespaceUri?: boolean; } /** * A collection of custom XML parts. * * @remarks * [Api set: ExcelApi 1.5] */ interface CustomXmlPartCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The custom XML part's ID. * * @remarks * [Api set: ExcelApi 1.5] */ id?: boolean; /** * For EACH ITEM in the collection: The custom XML part's namespace URI. * * @remarks * [Api set: ExcelApi 1.5] */ namespaceUri?: boolean; } /** * Represents a custom XML part object in a workbook. * * @remarks * [Api set: ExcelApi 1.5] */ interface CustomXmlPartLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The custom XML part's ID. * * @remarks * [Api set: ExcelApi 1.5] */ id?: boolean; /** * The custom XML part's namespace URI. * * @remarks * [Api set: ExcelApi 1.5] */ namespaceUri?: boolean; } /** * Represents a scoped collection of PivotTables. The PivotTables are sorted based on the location of the PivotTable's top-left corner. They are ordered top-to-bottom and then left-to-right. * * @remarks * [Api set: ExcelApi 1.12] */ interface PivotTableScopedCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The PivotLayout describing the layout and visual structure of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ layout?: Excel.Interfaces.PivotLayoutLoadOptions; /** * For EACH ITEM in the collection: The worksheet containing the current PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. * * @remarks * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; /** * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. * * @remarks * [Api set: ExcelApi 1.9] */ enableDataValueEditing?: boolean; /** * For EACH ITEM in the collection: ID of the PivotTable. * * @remarks * [Api set: ExcelApi 1.5] */ id?: boolean; /** * For EACH ITEM in the collection: Name of the PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. * * @remarks * [Api set: ExcelApi 1.13] */ refreshOnOpen?: boolean; /** * For EACH ITEM in the collection: Specifies if the PivotTable uses custom lists when sorting. * * @remarks * [Api set: ExcelApi 1.9] */ useCustomSortLists?: boolean; } /** * Represents a collection of all the PivotTables that are part of the workbook or worksheet. * * @remarks * [Api set: ExcelApi 1.3] */ interface PivotTableCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The PivotLayout describing the layout and visual structure of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ layout?: Excel.Interfaces.PivotLayoutLoadOptions; /** * For EACH ITEM in the collection: The worksheet containing the current PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. * * @remarks * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; /** * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. * * @remarks * [Api set: ExcelApi 1.9] */ enableDataValueEditing?: boolean; /** * For EACH ITEM in the collection: ID of the PivotTable. * * @remarks * [Api set: ExcelApi 1.5] */ id?: boolean; /** * For EACH ITEM in the collection: Name of the PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. * * @remarks * [Api set: ExcelApi 1.13] */ refreshOnOpen?: boolean; /** * For EACH ITEM in the collection: Specifies if the PivotTable uses custom lists when sorting. * * @remarks * [Api set: ExcelApi 1.9] */ useCustomSortLists?: boolean; } /** * Represents an Excel PivotTable. To learn more about the PivotTable object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | Work with PivotTables using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.3] */ interface PivotTableLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The PivotLayout describing the layout and visual structure of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ layout?: Excel.Interfaces.PivotLayoutLoadOptions; /** * The worksheet containing the current PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. * * @remarks * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * * @remarks * [Api set: ExcelApi 1.9] */ enableDataValueEditing?: boolean; /** * ID of the PivotTable. * * @remarks * [Api set: ExcelApi 1.5] */ id?: boolean; /** * Name of the PivotTable. * * @remarks * [Api set: ExcelApi 1.3] */ name?: boolean; /** * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. * * @remarks * [Api set: ExcelApi 1.13] */ refreshOnOpen?: boolean; /** * Specifies if the PivotTable uses custom lists when sorting. * * @remarks * [Api set: ExcelApi 1.9] */ useCustomSortLists?: boolean; } /** * Represents the visual layout of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ interface PivotLayoutLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The alt text description of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextDescription?: boolean; /** * The alt text title of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. * * @remarks * [Api set: ExcelApi 1.13] */ altTextTitle?: boolean; /** * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. * * @remarks * [Api set: ExcelApi 1.9] */ autoFormat?: boolean; /** * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. By default, this is an empty string. * * @remarks * [Api set: ExcelApi 1.13] */ emptyCellText?: boolean; /** * Specifies if the field list can be shown in the UI. * * @remarks * [Api set: ExcelApi 1.10] */ enableFieldList?: boolean; /** * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. Note that the value of `emptyCellText` persists when this property is set to `false`. * * @remarks * [Api set: ExcelApi 1.13] */ fillEmptyCells?: boolean; /** * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. * * @remarks * [Api set: ExcelApi 1.8] */ layoutType?: boolean; /** * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * @remarks * [Api set: ExcelApi 1.9] */ preserveFormatting?: boolean; /** * Specifies if the PivotTable report shows grand totals for columns. * * @remarks * [Api set: ExcelApi 1.8] */ showColumnGrandTotals?: boolean; /** * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). * * @remarks * [Api set: ExcelApi 1.13] */ showFieldHeaders?: boolean; /** * Specifies if the PivotTable report shows grand totals for rows. * * @remarks * [Api set: ExcelApi 1.8] */ showRowGrandTotals?: boolean; /** * This property indicates the `SubtotalLocationType` of all fields on the PivotTable. If fields have different states, this will be `null`. * * @remarks * [Api set: ExcelApi 1.8] */ subtotalLocation?: boolean; } /** * Represents a collection of all the PivotHierarchies that are part of the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ interface PivotHierarchyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: ID of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * For EACH ITEM in the collection: Name of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; } /** * Represents the Excel PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ interface PivotHierarchyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * ID of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * Name of the PivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; } /** * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ interface RowColumnPivotHierarchyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: ID of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * For EACH ITEM in the collection: Name of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * For EACH ITEM in the collection: Position of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; } /** * Represents the Excel RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ interface RowColumnPivotHierarchyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * ID of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * Name of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * Position of the RowColumnPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; } /** * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ interface FilterPivotHierarchyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Determines whether to allow multiple filter items. * * @remarks * [Api set: ExcelApi 1.8] */ enableMultipleFilterItems?: boolean; /** * For EACH ITEM in the collection: ID of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * For EACH ITEM in the collection: Name of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * For EACH ITEM in the collection: Position of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; } /** * Represents the Excel FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ interface FilterPivotHierarchyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Determines whether to allow multiple filter items. * * @remarks * [Api set: ExcelApi 1.8] */ enableMultipleFilterItems?: boolean; /** * ID of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * Name of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * Position of the FilterPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; } /** * Represents a collection of DataPivotHierarchy items associated with the PivotTable. * * @remarks * [Api set: ExcelApi 1.8] */ interface DataPivotHierarchyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the PivotFields associated with the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ field?: Excel.Interfaces.PivotFieldLoadOptions; /** * For EACH ITEM in the collection: ID of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * For EACH ITEM in the collection: Name of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * For EACH ITEM in the collection: Number format of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: boolean; /** * For EACH ITEM in the collection: Position of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; /** * For EACH ITEM in the collection: Specifies if the data should be shown as a specific summary calculation. * * @remarks * [Api set: ExcelApi 1.8] */ showAs?: boolean; /** * For EACH ITEM in the collection: Specifies if all items of the DataPivotHierarchy are shown. * * @remarks * [Api set: ExcelApi 1.8] */ summarizeBy?: boolean; } /** * Represents the Excel DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ interface DataPivotHierarchyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the PivotFields associated with the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ field?: Excel.Interfaces.PivotFieldLoadOptions; /** * ID of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * Name of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * Number format of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ numberFormat?: boolean; /** * Position of the DataPivotHierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ position?: boolean; /** * Specifies if the data should be shown as a specific summary calculation. * * @remarks * [Api set: ExcelApi 1.8] */ showAs?: boolean; /** * Specifies if all items of the DataPivotHierarchy are shown. * * @remarks * [Api set: ExcelApi 1.8] */ summarizeBy?: boolean; } /** * Represents a collection of all the PivotFields that are part of a PivotTable's hierarchy. * * @remarks * [Api set: ExcelApi 1.8] */ interface PivotFieldCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: ID of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * For EACH ITEM in the collection: Name of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * For EACH ITEM in the collection: Determines whether to show all items of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ showAllItems?: boolean; /** * For EACH ITEM in the collection: Subtotals of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ subtotals?: boolean; } /** * Represents the Excel PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ interface PivotFieldLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * ID of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * Name of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * Determines whether to show all items of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ showAllItems?: boolean; /** * Subtotals of the PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ subtotals?: boolean; } /** * Represents a collection of all the PivotItems related to their parent PivotField. * * @remarks * [Api set: ExcelApi 1.8] */ interface PivotItemCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: ID of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * For EACH ITEM in the collection: Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. * * @remarks * [Api set: ExcelApi 1.8] */ isExpanded?: boolean; /** * For EACH ITEM in the collection: Name of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if the PivotItem is visible. * * @remarks * [Api set: ExcelApi 1.8] */ visible?: boolean; } /** * Represents the Excel PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ interface PivotItemLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * ID of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ id?: boolean; /** * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. * * @remarks * [Api set: ExcelApi 1.8] */ isExpanded?: boolean; /** * Name of the PivotItem. * * @remarks * [Api set: ExcelApi 1.8] */ name?: boolean; /** * Specifies if the PivotItem is visible. * * @remarks * [Api set: ExcelApi 1.8] */ visible?: boolean; } /** * Represents a worksheet-level custom property. * * @remarks * [Api set: ExcelApi 1.12] */ interface WorksheetCustomPropertyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) * * @remarks * [Api set: ExcelApi 1.12] */ key?: boolean; /** * Gets or sets the value of the custom property. * * @remarks * [Api set: ExcelApi 1.12] */ value?: boolean; } /** * Contains the collection of worksheet-level custom property. * * @remarks * [Api set: ExcelApi 1.12] */ interface WorksheetCustomPropertyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) * * @remarks * [Api set: ExcelApi 1.12] */ key?: boolean; /** * For EACH ITEM in the collection: Gets or sets the value of the custom property. * * @remarks * [Api set: ExcelApi 1.12] */ value?: boolean; } /** * Represents workbook properties. * * @remarks * [Api set: ExcelApi 1.7] */ interface DocumentPropertiesLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The author of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ author?: boolean; /** * The category of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ category?: boolean; /** * The comments of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ comments?: boolean; /** * The company of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ company?: boolean; /** * Gets the creation date of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ creationDate?: boolean; /** * The keywords of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ keywords?: boolean; /** * Gets the last author of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ lastAuthor?: boolean; /** * The manager of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ manager?: boolean; /** * Gets the revision number of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ revisionNumber?: boolean; /** * The subject of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ subject?: boolean; /** * The title of the workbook. * * @remarks * [Api set: ExcelApi 1.7] */ title?: boolean; } /** * Represents a custom property. * * @remarks * [Api set: ExcelApi 1.7] */ interface CustomPropertyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ key?: boolean; /** * The type of the value used for the custom property. * * @remarks * [Api set: ExcelApi 1.7] */ type?: boolean; /** * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ value?: boolean; } /** * Contains the collection of custom properties. * * @remarks * [Api set: ExcelApi 1.7] */ interface CustomPropertyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ key?: boolean; /** * For EACH ITEM in the collection: The type of the value used for the custom property. * * @remarks * [Api set: ExcelApi 1.7] */ type?: boolean; /** * For EACH ITEM in the collection: The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). * * @remarks * [Api set: ExcelApi 1.7] */ value?: boolean; } /** * Represents a collection of all the conditional formats that are overlap the range. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalFormatCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValue?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparison?: Excel.Interfaces.TextConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; /** * For EACH ITEM in the collection: The priority of the conditional format in the current `ConditionalFormatCollection`. * * @remarks * [Api set: ExcelApi 1.6] */ id?: boolean; /** * For EACH ITEM in the collection: The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than the bounds will get and set to the maximum (or minimum if negative) priority. Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. * * @remarks * [Api set: ExcelApi 1.6] */ priority?: boolean; /** * For EACH ITEM in the collection: If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. * * @remarks * [Api set: ExcelApi 1.6] */ stopIfTrue?: boolean; /** * For EACH ITEM in the collection: A type of conditional format. Only one can be set at a time. * * @remarks * [Api set: ExcelApi 1.6] */ type?: boolean; } /** * An object encapsulating a conditional format's range, format, rule, and other properties. To learn more about the conditional formatting object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-conditional-formatting | Apply conditional formatting to Excel ranges}. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValue?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; /** * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. * * @remarks * [Api set: ExcelApi 1.6] */ cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; /** * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. * * @remarks * [Api set: ExcelApi 1.6] */ colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; /** * Returns the custom conditional format properties if the current conditional format is a custom type. * * @remarks * [Api set: ExcelApi 1.6] */ customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; /** * Returns the data bar properties if the current conditional format is a data bar. * * @remarks * [Api set: ExcelApi 1.6] */ dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; /** * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. * * @remarks * [Api set: ExcelApi 1.6] */ iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; /** * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. * * @remarks * [Api set: ExcelApi 1.6] */ presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparison?: Excel.Interfaces.TextConditionalFormatLoadOptions; /** * Returns the specific text conditional format properties if the current conditional format is a text type. For example, to format cells matching the word "Text". * * @remarks * [Api set: ExcelApi 1.6] */ textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; /** * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. * * @remarks * [Api set: ExcelApi 1.6] */ topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; /** * The priority of the conditional format in the current `ConditionalFormatCollection`. * * @remarks * [Api set: ExcelApi 1.6] */ id?: boolean; /** * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than the bounds will get and set to the maximum (or minimum if negative) priority. Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. * * @remarks * [Api set: ExcelApi 1.6] */ priority?: boolean; /** * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. * * @remarks * [Api set: ExcelApi 1.6] */ stopIfTrue?: boolean; /** * A type of conditional format. Only one can be set at a time. * * @remarks * [Api set: ExcelApi 1.6] */ type?: boolean; } /** * Represents an Excel conditional data bar type. * * @remarks * [Api set: ExcelApi 1.6] */ interface DataBarConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Representation of all values to the left of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions; /** * Representation of all values to the right of the axis in an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions; /** * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no axis is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ axisColor?: boolean; /** * Representation of how the axis is determined for an Excel data bar. * * @remarks * [Api set: ExcelApi 1.6] */ axisFormat?: boolean; /** * Specifies the direction that the data bar graphic should be based on. * * @remarks * [Api set: ExcelApi 1.6] */ barDirection?: boolean; /** * The rule for what constitutes the lower bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ lowerBoundRule?: boolean; /** * If `true`, hides the values from the cells where the data bar is applied. * * @remarks * [Api set: ExcelApi 1.6] */ showDataBarOnly?: boolean; /** * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). * * @remarks * [Api set: ExcelApi 1.6] */ upperBoundRule?: boolean; } /** * Represents a conditional format for the positive side of the data bar. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalDataBarPositiveFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor?: boolean; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor?: boolean; /** * Specifies if the data bar has a gradient. * * @remarks * [Api set: ExcelApi 1.6] */ gradientFill?: boolean; } /** * Represents a conditional format for the negative side of the data bar. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalDataBarNegativeFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. * * @remarks * [Api set: ExcelApi 1.6] */ borderColor?: boolean; /** * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ fillColor?: boolean; /** * Specifies if the negative data bar has the same border color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor?: boolean; /** * Specifies if the negative data bar has the same fill color as the positive data bar. * * @remarks * [Api set: ExcelApi 1.6] */ matchPositiveFillColor?: boolean; } /** * Represents a custom conditional format type. * * @remarks * [Api set: ExcelApi 1.6] */ interface CustomConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; /** * Specifies the `Rule` object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: Excel.Interfaces.ConditionalFormatRuleLoadOptions; } /** * Represents a rule, for all traditional rule/format pairings. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalFormatRuleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The formula, if required, on which to evaluate the conditional format rule. * * @remarks * [Api set: ExcelApi 1.6] */ formula?: boolean; /** * The formula, if required, on which to evaluate the conditional format rule in the user's language. * * @remarks * [Api set: ExcelApi 1.6] */ formulaLocal?: boolean; /** * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. * * @remarks * [Api set: ExcelApi 1.6] */ formulaR1C1?: boolean; } /** * Represents an icon set criteria for conditional formatting. * * @remarks * [Api set: ExcelApi 1.6] */ interface IconSetConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * An array of criteria and icon sets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. * * @remarks * [Api set: ExcelApi 1.6] */ criteria?: boolean; /** * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. * * @remarks * [Api set: ExcelApi 1.6] */ reverseIconOrder?: boolean; /** * If `true`, hides the values and only shows icons. * * @remarks * [Api set: ExcelApi 1.6] */ showIconOnly?: boolean; /** * If set, displays the icon set option for the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ style?: boolean; } /** * Represents the color scale criteria for conditional formatting. * * @remarks * [Api set: ExcelApi 1.6] */ interface ColorScaleConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The criteria of the color scale. Midpoint is optional when using a two point color scale. * * @remarks * [Api set: ExcelApi 1.6] */ criteria?: boolean; /** * If `true`, the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). * * @remarks * [Api set: ExcelApi 1.6] */ threeColorScale?: boolean; } /** * Represents a top/bottom conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ interface TopBottomConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; /** * The criteria of the top/bottom conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: boolean; } /** * Represents the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. * * @remarks * [Api set: ExcelApi 1.6] */ interface PresetCriteriaConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: boolean; } /** * Represents a specific text conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ interface TextConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; /** * The rule of the conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: boolean; } /** * Represents a cell value conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ interface CellValueConditionalFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; /** * Specifies the rule object on this conditional format. * * @remarks * [Api set: ExcelApi 1.6] */ rule?: boolean; } /** * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalRangeFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Collection of border objects that apply to the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ borders?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions; /** * Returns the fill object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ fill?: Excel.Interfaces.ConditionalRangeFillLoadOptions; /** * Returns the font object defined on the overall conditional format range. * * @remarks * [Api set: ExcelApi 1.6] */ font?: Excel.Interfaces.ConditionalRangeFontLoadOptions; /** * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. Cleared if `null` is passed in. * * @remarks * [Api set: ExcelApi 1.6] */ numberFormat?: boolean; } /** * This object represents the font attributes (font style, color, etc.) for an object. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalRangeFontLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies if the font is bold. * * @remarks * [Api set: ExcelApi 1.6] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., #FF0000 represents Red). * * @remarks * [Api set: ExcelApi 1.6] */ color?: boolean; /** * Specifies if the font is italic. * * @remarks * [Api set: ExcelApi 1.6] */ italic?: boolean; /** * Specifies the strikethrough status of the font. * * @remarks * [Api set: ExcelApi 1.6] */ strikethrough?: boolean; /** * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ underline?: boolean; } /** * Represents the background of a conditional range object. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalRangeFillLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color?: boolean; } /** * Represents the border of an object. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalRangeBorderLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color?: boolean; /** * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.6] */ sideIndex?: boolean; /** * One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ style?: boolean; } /** * Represents the border objects that make up range border. * * @remarks * [Api set: ExcelApi 1.6] */ interface ConditionalRangeBorderCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.6] */ color?: boolean; /** * For EACH ITEM in the collection: Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. * * @remarks * [Api set: ExcelApi 1.6] */ sideIndex?: boolean; /** * For EACH ITEM in the collection: One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.6] */ style?: boolean; } /** * An object encapsulating a style's format and other properties. * * @remarks * [Api set: ExcelApi 1.7] */ interface StyleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * A collection of four border objects that represent the style of the four borders. * * @remarks * [Api set: ExcelApi 1.7] */ borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; /** * The fill of the style. * * @remarks * [Api set: ExcelApi 1.7] */ fill?: Excel.Interfaces.RangeFillLoadOptions; /** * A `Font` object that represents the font of the style. * * @remarks * [Api set: ExcelApi 1.7] */ font?: Excel.Interfaces.RangeFontLoadOptions; /** * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.8] */ autoIndent?: boolean; /** * Specifies if the style is a built-in style. * * @remarks * [Api set: ExcelApi 1.7] */ builtIn?: boolean; /** * Specifies if the formula will be hidden when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ formulaHidden?: boolean; /** * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment?: boolean; /** * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeAlignment?: boolean; /** * Specifies if the style includes the color, color index, line style, and weight border properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeBorder?: boolean; /** * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeFont?: boolean; /** * Specifies if the style includes the number format property. * * @remarks * [Api set: ExcelApi 1.7] */ includeNumber?: boolean; /** * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. * * @remarks * [Api set: ExcelApi 1.7] */ includePatterns?: boolean; /** * Specifies if the style includes the formula hidden and locked protection properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeProtection?: boolean; /** * An integer from 0 to 250 that indicates the indent level for the style. * * @remarks * [Api set: ExcelApi 1.7] */ indentLevel?: boolean; /** * Specifies if the object is locked when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ locked?: boolean; /** * The name of the style. * * @remarks * [Api set: ExcelApi 1.7] */ name?: boolean; /** * The format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormat?: boolean; /** * The localized format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: boolean; /** * The reading order for the style. * * @remarks * [Api set: ExcelApi 1.7] */ readingOrder?: boolean; /** * Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.7] */ shrinkToFit?: boolean; /** * The text orientation for the style. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: boolean; /** * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment?: boolean; /** * Specifies if Excel wraps the text in the object. * * @remarks * [Api set: ExcelApi 1.7] */ wrapText?: boolean; } /** * Represents a collection of all the styles. * * @remarks * [Api set: ExcelApi 1.7] */ interface StyleCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: A collection of four border objects that represent the style of the four borders. * * @remarks * [Api set: ExcelApi 1.7] */ borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; /** * For EACH ITEM in the collection: The fill of the style. * * @remarks * [Api set: ExcelApi 1.7] */ fill?: Excel.Interfaces.RangeFillLoadOptions; /** * For EACH ITEM in the collection: A `Font` object that represents the font of the style. * * @remarks * [Api set: ExcelApi 1.7] */ font?: Excel.Interfaces.RangeFontLoadOptions; /** * For EACH ITEM in the collection: Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. * * @remarks * [Api set: ExcelApi 1.8] */ autoIndent?: boolean; /** * For EACH ITEM in the collection: Specifies if the style is a built-in style. * * @remarks * [Api set: ExcelApi 1.7] */ builtIn?: boolean; /** * For EACH ITEM in the collection: Specifies if the formula will be hidden when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ formulaHidden?: boolean; /** * For EACH ITEM in the collection: Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ horizontalAlignment?: boolean; /** * For EACH ITEM in the collection: Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeAlignment?: boolean; /** * For EACH ITEM in the collection: Specifies if the style includes the color, color index, line style, and weight border properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeBorder?: boolean; /** * For EACH ITEM in the collection: Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeFont?: boolean; /** * For EACH ITEM in the collection: Specifies if the style includes the number format property. * * @remarks * [Api set: ExcelApi 1.7] */ includeNumber?: boolean; /** * For EACH ITEM in the collection: Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. * * @remarks * [Api set: ExcelApi 1.7] */ includePatterns?: boolean; /** * For EACH ITEM in the collection: Specifies if the style includes the formula hidden and locked protection properties. * * @remarks * [Api set: ExcelApi 1.7] */ includeProtection?: boolean; /** * For EACH ITEM in the collection: An integer from 0 to 250 that indicates the indent level for the style. * * @remarks * [Api set: ExcelApi 1.7] */ indentLevel?: boolean; /** * For EACH ITEM in the collection: Specifies if the object is locked when the worksheet is protected. * * @remarks * [Api set: ExcelApi 1.7] */ locked?: boolean; /** * For EACH ITEM in the collection: The name of the style. * * @remarks * [Api set: ExcelApi 1.7] */ name?: boolean; /** * For EACH ITEM in the collection: The format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormat?: boolean; /** * For EACH ITEM in the collection: The localized format code of the number format for the style. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: boolean; /** * For EACH ITEM in the collection: The reading order for the style. * * @remarks * [Api set: ExcelApi 1.7] */ readingOrder?: boolean; /** * For EACH ITEM in the collection: Specifies if text automatically shrinks to fit in the available column width. * * @remarks * [Api set: ExcelApi 1.7] */ shrinkToFit?: boolean; /** * For EACH ITEM in the collection: The text orientation for the style. * * @remarks * [Api set: ExcelApi 1.8] */ textOrientation?: boolean; /** * For EACH ITEM in the collection: Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.7] */ verticalAlignment?: boolean; /** * For EACH ITEM in the collection: Specifies if Excel wraps the text in the object. * * @remarks * [Api set: ExcelApi 1.7] */ wrapText?: boolean; } /** * Represents a collection of table styles. * * @remarks * [Api set: ExcelApi 1.10] */ interface TableStyleCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the table style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if this `TableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents a table style, which defines the style elements by region of the table. * * @remarks * [Api set: ExcelApi 1.10] */ interface TableStyleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the name of the table style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * Specifies if this `TableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents a collection of PivotTable styles. * * @remarks * [Api set: ExcelApi 1.10] */ interface PivotTableStyleCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the PivotTable style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if this `PivotTableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents a PivotTable style, which defines style elements by PivotTable region. * * @remarks * [Api set: ExcelApi 1.10] */ interface PivotTableStyleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the name of the PivotTable style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * Specifies if this `PivotTableStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents a collection of `SlicerStyle` objects. * * @remarks * [Api set: ExcelApi 1.10] */ interface SlicerStyleCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the slicer style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if this `SlicerStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents a slicer style, which defines style elements by region of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ interface SlicerStyleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the name of the slicer style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * Specifies if this `SlicerStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents a collection of timeline styles. * * @remarks * [Api set: ExcelApi 1.10] */ interface TimelineStyleCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the timeline style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * For EACH ITEM in the collection: Specifies if this `TimelineStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents a `TimelineStyle`, which defines style elements by region in the timeline. * * @remarks * [Api set: ExcelApi 1.10] */ interface TimelineStyleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the name of the timeline style. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * Specifies if this `TimelineStyle` object is read-only. * * @remarks * [Api set: ExcelApi 1.10] */ readOnly?: boolean; } /** * Represents layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area. * * @remarks * [Api set: ExcelApi 1.9] */ interface PageLayoutLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Header and footer configuration for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ headersFooters?: Excel.Interfaces.HeaderFooterGroupLoadOptions; /** * The worksheet's black and white print option. * * @remarks * [Api set: ExcelApi 1.9] */ blackAndWhite?: boolean; /** * The worksheet's bottom page margin to use for printing in points. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin?: boolean; /** * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerHorizontally?: boolean; /** * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. * * @remarks * [Api set: ExcelApi 1.9] */ centerVertically?: boolean; /** * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. * * @remarks * [Api set: ExcelApi 1.9] */ draftMode?: boolean; /** * The worksheet's first page number to print. A `null` value represents "auto" page numbering. * * @remarks * [Api set: ExcelApi 1.9] */ firstPageNumber?: boolean; /** * The worksheet's footer margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ footerMargin?: boolean; /** * The worksheet's header margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ headerMargin?: boolean; /** * The worksheet's left margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin?: boolean; /** * The worksheet's orientation of the page. * * @remarks * [Api set: ExcelApi 1.9] */ orientation?: boolean; /** * The worksheet's paper size of the page. * * @remarks * [Api set: ExcelApi 1.9] */ paperSize?: boolean; /** * Specifies if the worksheet's comments should be displayed when printing. * * @remarks * [Api set: ExcelApi 1.9] */ printComments?: boolean; /** * The worksheet's print errors option. * * @remarks * [Api set: ExcelApi 1.9] */ printErrors?: boolean; /** * Specifies if the worksheet's gridlines will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printGridlines?: boolean; /** * Specifies if the worksheet's headings will be printed. * * @remarks * [Api set: ExcelApi 1.9] */ printHeadings?: boolean; /** * The worksheet's page print order option. This specifies the order to use for processing the page number printed. * * @remarks * [Api set: ExcelApi 1.9] */ printOrder?: boolean; /** * The worksheet's right margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin?: boolean; /** * The worksheet's top margin, in points, for use when printing. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin?: boolean; /** * The worksheet's print zoom options. The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). * * @remarks * [Api set: ExcelApi 1.9] */ zoom?: boolean; } /** * @remarks * [Api set: ExcelApi 1.9] */ interface HeaderFooterLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The center footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerFooter?: boolean; /** * The center header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ centerHeader?: boolean; /** * The left footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftFooter?: boolean; /** * The left header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ leftHeader?: boolean; /** * The right footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightFooter?: boolean; /** * The right header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. * * @remarks * [Api set: ExcelApi 1.9] */ rightHeader?: boolean; } /** * @remarks * [Api set: ExcelApi 1.9] */ interface HeaderFooterGroupLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The general header/footer, used for all pages unless even/odd or first page is specified. * * @remarks * [Api set: ExcelApi 1.9] */ defaultForAllPages?: Excel.Interfaces.HeaderFooterLoadOptions; /** * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. * * @remarks * [Api set: ExcelApi 1.9] */ evenPages?: Excel.Interfaces.HeaderFooterLoadOptions; /** * The first page header/footer, for all other pages general or even/odd is used. * * @remarks * [Api set: ExcelApi 1.9] */ firstPage?: Excel.Interfaces.HeaderFooterLoadOptions; /** * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. * * @remarks * [Api set: ExcelApi 1.9] */ oddPages?: Excel.Interfaces.HeaderFooterLoadOptions; /** * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. * * @remarks * [Api set: ExcelApi 1.9] */ state?: boolean; /** * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetMargins?: boolean; /** * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ useSheetScale?: boolean; } /** * @remarks * [Api set: ExcelApi 1.9] */ interface PageBreakLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the column index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ columnIndex?: boolean; /** * Specifies the row index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ rowIndex?: boolean; } /** * @remarks * [Api set: ExcelApi 1.9] */ interface PageBreakCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the column index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ columnIndex?: boolean; /** * For EACH ITEM in the collection: Specifies the row index for the page break. * * @remarks * [Api set: ExcelApi 1.9] */ rowIndex?: boolean; } /** * @remarks * [Api set: ExcelApi 1.9] */ interface RangeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns a data validation object. * * @remarks * [Api set: ExcelApi 1.8] */ dataValidation?: Excel.Interfaces.DataValidationLoadOptions; /** * For EACH ITEM in the collection: Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. * * @remarks * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.RangeFormatLoadOptions; /** * For EACH ITEM in the collection: The worksheet containing the current range. * * @remarks * [Api set: ExcelApi 1.1] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). * * @remarks * [Api set: ExcelApi 1.1] */ address?: boolean; /** * For EACH ITEM in the collection: Represents the range reference for the specified range in the language of the user. * * @remarks * [Api set: ExcelApi 1.1] */ addressLocal?: boolean; /** * For EACH ITEM in the collection: Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.1] */ cellCount?: boolean; /** * For EACH ITEM in the collection: Specifies the total number of columns in the range. * * @remarks * [Api set: ExcelApi 1.1] */ columnCount?: boolean; /** * For EACH ITEM in the collection: Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ columnHidden?: boolean; /** * For EACH ITEM in the collection: Specifies the column number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ columnIndex?: boolean; /** * For EACH ITEM in the collection: Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulas?: boolean; /** * For EACH ITEM in the collection: Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.1] */ formulasLocal?: boolean; /** * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. * * @remarks * [Api set: ExcelApi 1.2] */ formulasR1C1?: boolean; /** * For EACH ITEM in the collection: Represents if all cells have a spill border. Returns `true` if all cells have a spill border, or `false` if all cells do not have a spill border. Returns `null` if there are cells both with and without spill borders within the range. * * @remarks * [Api set: ExcelApi 1.12] */ hasSpill?: boolean; /** * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ height?: boolean; /** * For EACH ITEM in the collection: Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ hidden?: boolean; /** * For EACH ITEM in the collection: Represents the hyperlink for the current range. * * @remarks * [Api set: ExcelApi 1.7] */ hyperlink?: boolean; /** * For EACH ITEM in the collection: Represents if the current range is an entire column. * * @remarks * [Api set: ExcelApi 1.7] */ isEntireColumn?: boolean; /** * For EACH ITEM in the collection: Represents if the current range is an entire row. * * @remarks * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; /** * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ left?: boolean; /** * For EACH ITEM in the collection: Represents the data type state of each cell. * * @remarks * [Api set: ExcelApi 1.9] */ linkedDataTypeState?: boolean; /** * For EACH ITEM in the collection: Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. * * @remarks * [Api set: ExcelApi 1.1] */ numberFormat?: boolean; /** * For EACH ITEM in the collection: Represents the category of number format of each cell. * * @remarks * [Api set: ExcelApi 1.12] */ numberFormatCategories?: boolean; /** * For EACH ITEM in the collection: Represents Excel's number format code for the given range, based on the language settings of the user. Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. Any returned text uses the locally-formatted strings based on the language specified in the system settings. * * @remarks * [Api set: ExcelApi 1.7] */ numberFormatLocal?: boolean; /** * For EACH ITEM in the collection: Returns the total number of rows in the range. * * @remarks * [Api set: ExcelApi 1.1] */ rowCount?: boolean; /** * For EACH ITEM in the collection: Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. * * @remarks * [Api set: ExcelApi 1.2] */ rowHidden?: boolean; /** * For EACH ITEM in the collection: Returns the row number of the first cell in the range. Zero-indexed. * * @remarks * [Api set: ExcelApi 1.1] */ rowIndex?: boolean; /** * For EACH ITEM in the collection: Represents if all the cells would be saved as an array formula. Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. Returns `null` if some cells would be saved as an array formula and some would not be. * * @remarks * [Api set: ExcelApi 1.12] */ savedAsArray?: boolean; /** * For EACH ITEM in the collection: Represents the style of the current range. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.7] */ style?: boolean; /** * For EACH ITEM in the collection: Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. * * @remarks * [Api set: ExcelApi 1.1] */ text?: boolean; /** * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ top?: boolean; /** * For EACH ITEM in the collection: Specifies the type of data in each cell. * * @remarks * [Api set: ExcelApi 1.1] */ valueTypes?: boolean; /** * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. * * @remarks * [Api set: ExcelApi 1.1] */ values?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJson?: boolean; /** * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. * * @remarks * [Api set: ExcelApi 1.16] */ valuesAsJsonLocal?: boolean; /** * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. * * @remarks * [Api set: ExcelApi 1.10] */ width?: boolean; } /** * Contains the collection of cross-workbook level ranges. * * @remarks * [Api set: ExcelApi 1.12] */ interface RangeAreasCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns a data validation object for all ranges in the `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ dataValidation?: Excel.Interfaces.DataValidationLoadOptions; /** * For EACH ITEM in the collection: Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ format?: Excel.Interfaces.RangeFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the worksheet for the current `RangeAreas`. * * @remarks * [Api set: ExcelApi 1.9] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Returns the `RangeAreas` reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). * * @remarks * [Api set: ExcelApi 1.9] */ address?: boolean; /** * For EACH ITEM in the collection: Returns the `RangeAreas` reference in the user locale. * * @remarks * [Api set: ExcelApi 1.9] */ addressLocal?: boolean; /** * For EACH ITEM in the collection: Returns the number of rectangular ranges that comprise this `RangeAreas` object. * * @remarks * [Api set: ExcelApi 1.9] */ areaCount?: boolean; /** * For EACH ITEM in the collection: Returns the number of cells in the `RangeAreas` object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). * * @remarks * [Api set: ExcelApi 1.9] */ cellCount?: boolean; /** * For EACH ITEM in the collection: Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). * * @remarks * [Api set: ExcelApi 1.9] */ isEntireColumn?: boolean; /** * For EACH ITEM in the collection: Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). * * @remarks * [Api set: ExcelApi 1.9] */ isEntireRow?: boolean; /** * For EACH ITEM in the collection: Represents the style for all ranges in this `RangeAreas` object. If the styles of the cells are inconsistent, `null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string representing a value in the `BuiltInStyle` enum will be returned. * * @remarks * [Api set: ExcelApi 1.9] */ style?: boolean; } /** * Represents a collection of comment objects that are part of the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ interface CommentCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the email of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorEmail?: boolean; /** * For EACH ITEM in the collection: Gets the name of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorName?: boolean; /** * For EACH ITEM in the collection: The comment's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: boolean; /** * For EACH ITEM in the collection: Gets the content type of the comment. * * @remarks * [Api set: ExcelApi 1.12] */ contentType?: boolean; /** * For EACH ITEM in the collection: Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. * * @remarks * [Api set: ExcelApi 1.10] */ creationDate?: boolean; /** * For EACH ITEM in the collection: Specifies the comment identifier. * * @remarks * [Api set: ExcelApi 1.10] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ mentions?: boolean; /** * For EACH ITEM in the collection: The comment thread status. A value of `true` means that the comment thread is resolved. * * @remarks * [Api set: ExcelApi 1.11] */ resolved?: boolean; /** * For EACH ITEM in the collection: Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ richContent?: boolean; } /** * Represents a comment in the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ interface CommentLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the email of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorEmail?: boolean; /** * Gets the name of the comment's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorName?: boolean; /** * The comment's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: boolean; /** * Gets the content type of the comment. * * @remarks * [Api set: ExcelApi 1.12] */ contentType?: boolean; /** * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. * * @remarks * [Api set: ExcelApi 1.10] */ creationDate?: boolean; /** * Specifies the comment identifier. * * @remarks * [Api set: ExcelApi 1.10] */ id?: boolean; /** * Gets the entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ mentions?: boolean; /** * The comment thread status. A value of `true` means that the comment thread is resolved. * * @remarks * [Api set: ExcelApi 1.11] */ resolved?: boolean; /** * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ richContent?: boolean; } /** * Represents a collection of comment reply objects that are part of the comment. * * @remarks * [Api set: ExcelApi 1.10] */ interface CommentReplyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the email of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorEmail?: boolean; /** * For EACH ITEM in the collection: Gets the name of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorName?: boolean; /** * For EACH ITEM in the collection: The comment reply's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: boolean; /** * For EACH ITEM in the collection: The content type of the reply. * * @remarks * [Api set: ExcelApi 1.12] */ contentType?: boolean; /** * For EACH ITEM in the collection: Gets the creation time of the comment reply. * * @remarks * [Api set: ExcelApi 1.10] */ creationDate?: boolean; /** * For EACH ITEM in the collection: Specifies the comment reply identifier. * * @remarks * [Api set: ExcelApi 1.10] */ id?: boolean; /** * For EACH ITEM in the collection: The entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ mentions?: boolean; /** * For EACH ITEM in the collection: The comment reply status. A value of `true` means the reply is in the resolved state. * * @remarks * [Api set: ExcelApi 1.11] */ resolved?: boolean; /** * For EACH ITEM in the collection: The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ richContent?: boolean; } /** * Represents a comment reply in the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ interface CommentReplyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the email of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorEmail?: boolean; /** * Gets the name of the comment reply's author. * * @remarks * [Api set: ExcelApi 1.10] */ authorName?: boolean; /** * The comment reply's content. The string is plain text. * * @remarks * [Api set: ExcelApi 1.10] */ content?: boolean; /** * The content type of the reply. * * @remarks * [Api set: ExcelApi 1.12] */ contentType?: boolean; /** * Gets the creation time of the comment reply. * * @remarks * [Api set: ExcelApi 1.10] */ creationDate?: boolean; /** * Specifies the comment reply identifier. * * @remarks * [Api set: ExcelApi 1.10] */ id?: boolean; /** * The entities (e.g., people) that are mentioned in comments. * * @remarks * [Api set: ExcelApi 1.11] */ mentions?: boolean; /** * The comment reply status. A value of `true` means the reply is in the resolved state. * * @remarks * [Api set: ExcelApi 1.11] */ resolved?: boolean; /** * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. * * @remarks * [Api set: ExcelApi 1.11] */ richContent?: boolean; } /** * Represents a collection of all the shapes in the worksheet. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the fill formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ fill?: Excel.Interfaces.ShapeFillLoadOptions; /** * For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; /** * For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". * * @remarks * [Api set: ExcelApi 1.9] */ group?: Excel.Interfaces.ShapeGroupLoadOptions; /** * For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". * * @remarks * [Api set: ExcelApi 1.9] */ image?: Excel.Interfaces.ImageLoadOptions; /** * For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". * * @remarks * [Api set: ExcelApi 1.9] */ line?: Excel.Interfaces.LineLoadOptions; /** * For EACH ITEM in the collection: Returns the line formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; /** * For EACH ITEM in the collection: Specifies the parent group of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ parentGroup?: Excel.Interfaces.ShapeLoadOptions; /** * For EACH ITEM in the collection: Returns the text frame object of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ textFrame?: Excel.Interfaces.TextFrameLoadOptions; /** * For EACH ITEM in the collection: Specifies the alternative description text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextDescription?: boolean; /** * For EACH ITEM in the collection: Specifies the alternative title text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextTitle?: boolean; /** * For EACH ITEM in the collection: Returns the number of connection sites on this shape. * * @remarks * [Api set: ExcelApi 1.9] */ connectionSiteCount?: boolean; /** * For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its `name`. In this scenario, you can use this API to get the name that is displayed in the UI. * * @remarks * [Api set: ExcelApi 1.15] */ displayName?: boolean; /** * For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShapeType?: boolean; /** * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ height?: boolean; /** * For EACH ITEM in the collection: Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ left?: boolean; /** * For EACH ITEM in the collection: Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. * * @remarks * [Api set: ExcelApi 1.9] */ level?: boolean; /** * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. * * @remarks * [Api set: ExcelApi 1.9] */ lockAspectRatio?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ name?: boolean; /** * For EACH ITEM in the collection: Represents how the object is attached to the cells below it. * * @remarks * [Api set: ExcelApi 1.10] */ placement?: boolean; /** * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ rotation?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ top?: boolean; /** * For EACH ITEM in the collection: Returns the type of this shape. See `Excel.ShapeType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type?: boolean; /** * For EACH ITEM in the collection: Specifies if the shape is visible. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ width?: boolean; /** * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. * * @remarks * [Api set: ExcelApi 1.9] */ zOrderPosition?: boolean; } /** * Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc. To learn more about the shape object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-shapes | Work with shapes using the Excel JavaScript API}. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the fill formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ fill?: Excel.Interfaces.ShapeFillLoadOptions; /** * Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; /** * Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". * * @remarks * [Api set: ExcelApi 1.9] */ group?: Excel.Interfaces.ShapeGroupLoadOptions; /** * Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". * * @remarks * [Api set: ExcelApi 1.9] */ image?: Excel.Interfaces.ImageLoadOptions; /** * Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". * * @remarks * [Api set: ExcelApi 1.9] */ line?: Excel.Interfaces.LineLoadOptions; /** * Returns the line formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; /** * Specifies the parent group of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ parentGroup?: Excel.Interfaces.ShapeLoadOptions; /** * Returns the text frame object of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ textFrame?: Excel.Interfaces.TextFrameLoadOptions; /** * Specifies the alternative description text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextDescription?: boolean; /** * Specifies the alternative title text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextTitle?: boolean; /** * Returns the number of connection sites on this shape. * * @remarks * [Api set: ExcelApi 1.9] */ connectionSiteCount?: boolean; /** * Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its `name`. In this scenario, you can use this API to get the name that is displayed in the UI. * * @remarks * [Api set: ExcelApi 1.15] */ displayName?: boolean; /** * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShapeType?: boolean; /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ height?: boolean; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: boolean; /** * The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ left?: boolean; /** * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. * * @remarks * [Api set: ExcelApi 1.9] */ level?: boolean; /** * Specifies if the aspect ratio of this shape is locked. * * @remarks * [Api set: ExcelApi 1.9] */ lockAspectRatio?: boolean; /** * Specifies the name of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ name?: boolean; /** * Represents how the object is attached to the cells below it. * * @remarks * [Api set: ExcelApi 1.10] */ placement?: boolean; /** * Specifies the rotation, in degrees, of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ rotation?: boolean; /** * The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ top?: boolean; /** * Returns the type of this shape. See `Excel.ShapeType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type?: boolean; /** * Specifies if the shape is visible. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ width?: boolean; /** * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. * * @remarks * [Api set: ExcelApi 1.9] */ zOrderPosition?: boolean; } /** * Represents a geometric shape inside a worksheet. A geometric shape can be a rectangle, block arrow, equation symbol, flowchart item, star, banner, callout, or any other basic shape in Excel. * * @remarks * [Api set: ExcelApi 1.9] */ interface GeometricShapeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the `Shape` object for the geometric shape. * * @remarks * [Api set: ExcelApi 1.9] */ shape?: Excel.Interfaces.ShapeLoadOptions; /** * Returns the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: boolean; } /** * Represents an image in the worksheet. To get the corresponding `Shape` object, use `Image.shape`. * * @remarks * [Api set: ExcelApi 1.9] */ interface ImageLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the `Shape` object associated with the image. * * @remarks * [Api set: ExcelApi 1.9] */ shape?: Excel.Interfaces.ShapeLoadOptions; /** * Specifies the shape identifier for the image object. * * @remarks * [Api set: ExcelApi 1.9] */ id?: boolean; /** * Returns the format of the image. * * @remarks * [Api set: ExcelApi 1.9] */ format?: boolean; } /** * Represents a shape group inside a worksheet. To get the corresponding `Shape` object, use `ShapeGroup.shape`. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeGroupLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the `Shape` object associated with the group. * * @remarks * [Api set: ExcelApi 1.9] */ shape?: Excel.Interfaces.ShapeLoadOptions; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: boolean; } /** * Represents the shape collection inside a shape group. * * @remarks * [Api set: ExcelApi 1.9] */ interface GroupShapeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the fill formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ fill?: Excel.Interfaces.ShapeFillLoadOptions; /** * For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; /** * For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". * * @remarks * [Api set: ExcelApi 1.9] */ group?: Excel.Interfaces.ShapeGroupLoadOptions; /** * For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". * * @remarks * [Api set: ExcelApi 1.9] */ image?: Excel.Interfaces.ImageLoadOptions; /** * For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". * * @remarks * [Api set: ExcelApi 1.9] */ line?: Excel.Interfaces.LineLoadOptions; /** * For EACH ITEM in the collection: Returns the line formatting of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; /** * For EACH ITEM in the collection: Specifies the parent group of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ parentGroup?: Excel.Interfaces.ShapeLoadOptions; /** * For EACH ITEM in the collection: Returns the text frame object of this shape. * * @remarks * [Api set: ExcelApi 1.9] */ textFrame?: Excel.Interfaces.TextFrameLoadOptions; /** * For EACH ITEM in the collection: Specifies the alternative description text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextDescription?: boolean; /** * For EACH ITEM in the collection: Specifies the alternative title text for a `Shape` object. * * @remarks * [Api set: ExcelApi 1.9] */ altTextTitle?: boolean; /** * For EACH ITEM in the collection: Returns the number of connection sites on this shape. * * @remarks * [Api set: ExcelApi 1.9] */ connectionSiteCount?: boolean; /** * For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its `name`. In this scenario, you can use this API to get the name that is displayed in the UI. * * @remarks * [Api set: ExcelApi 1.15] */ displayName?: boolean; /** * For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". * * @remarks * [Api set: ExcelApi 1.9] */ geometricShapeType?: boolean; /** * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ height?: boolean; /** * For EACH ITEM in the collection: Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ left?: boolean; /** * For EACH ITEM in the collection: Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. * * @remarks * [Api set: ExcelApi 1.9] */ level?: boolean; /** * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. * * @remarks * [Api set: ExcelApi 1.9] */ lockAspectRatio?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ name?: boolean; /** * For EACH ITEM in the collection: Represents how the object is attached to the cells below it. * * @remarks * [Api set: ExcelApi 1.10] */ placement?: boolean; /** * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ rotation?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.9] */ top?: boolean; /** * For EACH ITEM in the collection: Returns the type of this shape. See `Excel.ShapeType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type?: boolean; /** * For EACH ITEM in the collection: Specifies if the shape is visible. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.9] */ width?: boolean; /** * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. * * @remarks * [Api set: ExcelApi 1.9] */ zOrderPosition?: boolean; } /** * Represents a line inside a worksheet. To get the corresponding `Shape` object, use `Line.shape`. * * @remarks * [Api set: ExcelApi 1.9] */ interface LineLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the shape to which the beginning of the specified line is attached. * * @remarks * [Api set: ExcelApi 1.9] */ beginConnectedShape?: Excel.Interfaces.ShapeLoadOptions; /** * Represents the shape to which the end of the specified line is attached. * * @remarks * [Api set: ExcelApi 1.9] */ endConnectedShape?: Excel.Interfaces.ShapeLoadOptions; /** * Returns the `Shape` object associated with the line. * * @remarks * [Api set: ExcelApi 1.9] */ shape?: Excel.Interfaces.ShapeLoadOptions; /** * Represents the length of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadLength?: boolean; /** * Represents the style of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadStyle?: boolean; /** * Represents the width of the arrowhead at the beginning of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ beginArrowheadWidth?: boolean; /** * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. * * @remarks * [Api set: ExcelApi 1.9] */ beginConnectedSite?: boolean; /** * Represents the length of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadLength?: boolean; /** * Represents the style of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadStyle?: boolean; /** * Represents the width of the arrowhead at the end of the specified line. * * @remarks * [Api set: ExcelApi 1.9] */ endArrowheadWidth?: boolean; /** * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. * * @remarks * [Api set: ExcelApi 1.9] */ endConnectedSite?: boolean; /** * Specifies the shape identifier. * * @remarks * [Api set: ExcelApi 1.9] */ id?: boolean; /** * Specifies if the beginning of the specified line is connected to a shape. * * @remarks * [Api set: ExcelApi 1.9] */ isBeginConnected?: boolean; /** * Specifies if the end of the specified line is connected to a shape. * * @remarks * [Api set: ExcelApi 1.9] */ isEndConnected?: boolean; /** * Represents the connector type for the line. * * @remarks * [Api set: ExcelApi 1.9] */ connectorType?: boolean; } /** * Represents the fill formatting of a shape object. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeFillLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") * * @remarks * [Api set: ExcelApi 1.9] */ foregroundColor?: boolean; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: ExcelApi 1.9] */ transparency?: boolean; /** * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. * * @remarks * [Api set: ExcelApi 1.9] */ type?: boolean; } /** * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeLineFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: ExcelApi 1.9] */ color?: boolean; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ dashStyle?: boolean; /** * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ style?: boolean; /** * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. * * @remarks * [Api set: ExcelApi 1.9] */ transparency?: boolean; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: ExcelApi 1.9] */ visible?: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: ExcelApi 1.9] */ weight?: boolean; } /** * Represents the text frame of a shape object. * * @remarks * [Api set: ExcelApi 1.9] */ interface TextFrameLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See `Excel.TextRange` for details. * * @remarks * [Api set: ExcelApi 1.9] */ textRange?: Excel.Interfaces.TextRangeLoadOptions; /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: ExcelApi 1.9] */ autoSizeSetting?: boolean; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ bottomMargin?: boolean; /** * Specifies if the text frame contains text. * * @remarks * [Api set: ExcelApi 1.9] */ hasText?: boolean; /** * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalAlignment?: boolean; /** * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ horizontalOverflow?: boolean; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ leftMargin?: boolean; /** * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. * * @remarks * [Api set: ExcelApi 1.9] */ orientation?: boolean; /** * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. * * @remarks * [Api set: ExcelApi 1.9] */ readingOrder?: boolean; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ rightMargin?: boolean; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: ExcelApi 1.9] */ topMargin?: boolean; /** * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalAlignment?: boolean; /** * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. * * @remarks * [Api set: ExcelApi 1.9] */ verticalOverflow?: boolean; } /** * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. * * @remarks * [Api set: ExcelApi 1.9] */ interface TextRangeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a `ShapeFont` object that represents the font attributes for the text range. * * @remarks * [Api set: ExcelApi 1.9] */ font?: Excel.Interfaces.ShapeFontLoadOptions; /** * Represents the plain text content of the text range. * * @remarks * [Api set: ExcelApi 1.9] */ text?: boolean; } /** * Represents the font attributes, such as font name, font size, and color, for a shape's `TextRange` object. * * @remarks * [Api set: ExcelApi 1.9] */ interface ShapeFontLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: ExcelApi 1.9] */ color?: boolean; /** * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. * * @remarks * [Api set: ExcelApi 1.9] */ italic?: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: ExcelApi 1.9] */ name?: boolean; /** * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. * * @remarks * [Api set: ExcelApi 1.9] */ size?: boolean; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. * * @remarks * [Api set: ExcelApi 1.9] */ underline?: boolean; } /** * Represents a `Slicer` object in the workbook. * * @remarks * [Api set: ExcelApi 1.10] */ interface SlicerLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the worksheet containing the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * Represents the caption of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ caption?: boolean; /** * Represents the height, in points, of the slicer. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ height?: boolean; /** * Represents the unique ID of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ id?: boolean; /** * Value is `true` if all filters currently applied on the slicer are cleared. * * @remarks * [Api set: ExcelApi 1.10] */ isFilterCleared?: boolean; /** * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ left?: boolean; /** * Represents the name of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". * * @remarks * [Api set: ExcelApi 1.10] */ sortBy?: boolean; /** * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.10] */ style?: boolean; /** * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ top?: boolean; /** * Represents the width, in points, of the slicer. Throws an `InvalidArgument` error when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ width?: boolean; } /** * Represents a collection of all the slicer objects in the workbook or a worksheet. * * @remarks * [Api set: ExcelApi 1.10] */ interface SlicerCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the worksheet containing the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * For EACH ITEM in the collection: Represents the caption of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ caption?: boolean; /** * For EACH ITEM in the collection: Represents the height, in points, of the slicer. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ height?: boolean; /** * For EACH ITEM in the collection: Represents the unique ID of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ id?: boolean; /** * For EACH ITEM in the collection: Value is `true` if all filters currently applied on the slicer are cleared. * * @remarks * [Api set: ExcelApi 1.10] */ isFilterCleared?: boolean; /** * For EACH ITEM in the collection: Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ left?: boolean; /** * For EACH ITEM in the collection: Represents the name of the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; /** * For EACH ITEM in the collection: Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". * * @remarks * [Api set: ExcelApi 1.10] */ sortBy?: boolean; /** * For EACH ITEM in the collection: Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. * * @remarks * [Api set: ExcelApi 1.10] */ style?: boolean; /** * For EACH ITEM in the collection: Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. * * @remarks * [Api set: ExcelApi 1.10] */ top?: boolean; /** * For EACH ITEM in the collection: Represents the width, in points, of the slicer. Throws an `InvalidArgument` error when set with a negative value or zero as an input. * * @remarks * [Api set: ExcelApi 1.10] */ width?: boolean; } /** * Represents a slicer item in a slicer. * * @remarks * [Api set: ExcelApi 1.10] */ interface SlicerItemLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Value is `true` if the slicer item has data. * * @remarks * [Api set: ExcelApi 1.10] */ hasData?: boolean; /** * Value is `true` if the slicer item is selected. Setting this value will not clear the selected state of other slicer items. By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. * * @remarks * [Api set: ExcelApi 1.10] */ isSelected?: boolean; /** * Represents the unique value representing the slicer item. * * @remarks * [Api set: ExcelApi 1.10] */ key?: boolean; /** * Represents the title displayed in the Excel UI. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; } /** * Represents a collection of all the slicer item objects in the slicer. * * @remarks * [Api set: ExcelApi 1.10] */ interface SlicerItemCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Value is `true` if the slicer item has data. * * @remarks * [Api set: ExcelApi 1.10] */ hasData?: boolean; /** * For EACH ITEM in the collection: Value is `true` if the slicer item is selected. Setting this value will not clear the selected state of other slicer items. By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. * * @remarks * [Api set: ExcelApi 1.10] */ isSelected?: boolean; /** * For EACH ITEM in the collection: Represents the unique value representing the slicer item. * * @remarks * [Api set: ExcelApi 1.10] */ key?: boolean; /** * For EACH ITEM in the collection: Represents the title displayed in the Excel UI. * * @remarks * [Api set: ExcelApi 1.10] */ name?: boolean; } /** * Represents a named sheet view of a worksheet. A sheet view stores the sort and filter rules for a particular worksheet. Every sheet view (even a temporary sheet view) has a unique, worksheet-scoped name that is used to access the view. * * @remarks * [Api set: ExcelApiOnline 1.1] */ interface NamedSheetViewLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets or sets the name of the sheet view. The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. * * @remarks * [Api set: ExcelApiOnline 1.1] */ name?: boolean; } /** * Represents the collection of sheet views in the worksheet. * * @remarks * [Api set: ExcelApiOnline 1.1] */ interface NamedSheetViewCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets or sets the name of the sheet view. The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. * * @remarks * [Api set: ExcelApiOnline 1.1] */ name?: boolean; } /** * An object containing the result of a function-evaluation operation * * @remarks * [Api set: ExcelApi 1.2] */ interface FunctionResultLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. * * @remarks * [Api set: ExcelApi 1.2] */ error?: boolean; /** * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). * * @remarks * [Api set: ExcelApi 1.2] */ value?: boolean; } } } //////////////////////////////////////////////////////////////// //////////////////////// End Excel APIs //////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// /////////////////////// Begin Word APIs //////////////////////// //////////////////////////////////////////////////////////////// declare namespace Word { /** * Represents the color scheme of a critique in the document, affecting underline and highlight. * * @remarks * [Api set: WordApi 1.7] */ enum CritiqueColorScheme { /** * Red color. * @remarks * [Api set: WordApi 1.7] */ red = "Red", /** * Green color. * @remarks * [Api set: WordApi 1.7] */ green = "Green", /** * Blue color. * @remarks * [Api set: WordApi 1.7] */ blue = "Blue", /** * Lavender color. * @remarks * [Api set: WordApi 1.7] */ lavender = "Lavender", /** * Berry color. * @remarks * [Api set: WordApi 1.7] */ berry = "Berry", } /** * Critique that will be rendered as underline for the specified part of paragraph in the document. * * @remarks * [Api set: WordApi 1.7] */ interface Critique { /** * Gets the color scheme of the critique. * * @remarks * [Api set: WordApi 1.7] */ colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry"; /** * Gets the length of the critique inside paragraph. * * @remarks * [Api set: WordApi 1.7] */ length: number; /** * Gets the start index of the critique inside paragraph. * * @remarks * [Api set: WordApi 1.7] */ start: number; } /** * Represents an annotation wrapper around critique displayed in the document. * * @remarks * [Api set: WordApi 1.7] */ class CritiqueAnnotation extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the range of text that is annotated. * * @remarks * [Api set: WordApi 1.7] */ readonly range: Word.Range; /** * Gets the critique that was passed when the annotation was inserted. * * @remarks * [Api set: WordApi 1.7] */ readonly critique: Word.Critique; /** * Accepts the critique. This will change the annotation state to `accepted`. * * @remarks * [Api set: WordApi 1.7] */ accept(): void; /** * Rejects the critique. This will change the annotation state to `rejected`. * * @remarks * [Api set: WordApi 1.7] */ reject(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CritiqueAnnotation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.CritiqueAnnotation; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CritiqueAnnotation; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CritiqueAnnotation; /** * 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 Word.CritiqueAnnotation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.CritiqueAnnotationData; } /** * Represents the state of the annotation. * * @remarks * [Api set: WordApi 1.7] */ enum AnnotationState { /** * Created. * @remarks * [Api set: WordApi 1.7] */ created = "Created", /** * Accepted. * @remarks * [Api set: WordApi 1.7] */ accepted = "Accepted", /** * Rejected. * @remarks * [Api set: WordApi 1.7] */ rejected = "Rejected", } /** * Annotations set produced by the add-in. Currently supporting only critiques. * * @remarks * [Api set: WordApi 1.7] */ interface AnnotationSet { /** * Critiques. * * @remarks * [Api set: WordApi 1.7] */ critiques: Word.Critique[]; } /** * Represents an annotation attached to a paragraph. * * @remarks * [Api set: WordApi 1.7] */ class Annotation extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the critique annotation object. * * @remarks * [Api set: WordApi 1.7] */ readonly critiqueAnnotation: Word.CritiqueAnnotation; /** * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. * * @remarks * [Api set: WordApi 1.7] */ readonly id: string; /** * Gets the state of the annotation. * * @remarks * [Api set: WordApi 1.7] */ readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; /** * Deletes the annotation. * * @remarks * [Api set: WordApi 1.7] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Annotation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Annotation; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Annotation; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Annotation; /** * 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 Word.Annotation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.AnnotationData; } /** * Holds annotation information that is passed back on annotation added event. * * @remarks * [Api set: WordApi 1.7] */ interface AnnotationInsertedEventArgs { /** * Specifies the annotation IDs for which the event was fired. * * @remarks * [Api set: WordApi 1.7] */ ids: string[]; } /** * Holds annotation information that is passed back on annotation inserted event. * * @remarks * [Api set: WordApi 1.7] */ interface AnnotationClickedEventArgs { /** * Specifies the annotation ID for which the event was fired. * * @remarks * [Api set: WordApi 1.7] */ id: string; } /** * Holds annotation information that is passed back on annotation removed event. * * @remarks * [Api set: WordApi 1.7] */ interface AnnotationRemovedEventArgs { /** * Specifies the annotation IDs for which the event was fired. * * @remarks * [Api set: WordApi 1.7] */ ids: string[]; } /** * Holds annotation information that is passed back on annotation hovered event. * * @remarks * [Api set: WordApi 1.7] */ interface AnnotationHoveredEventArgs { /** * Specifies the annotation ID for which the event was fired. * * @remarks * [Api set: WordApi 1.7] */ id: string; } /** * Contains a collection of {@link Word.Annotation} objects. * * @remarks * [Api set: WordApi 1.7] */ class AnnotationCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Annotation[]; /** * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.7] */ getFirst(): Word.Annotation; /** * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.7] */ getFirstOrNullObject(): Word.Annotation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.AnnotationCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.AnnotationCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.AnnotationCollection; /** * 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 `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.AnnotationCollectionData; } /** * Represents the application object. * * @remarks * [Api set: WordApi 1.3] */ class Application extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Creates a new document by using an optional Base64-encoded .docx file. * * @remarks * [Api set: WordApi 1.3] * * @param base64File Optional. The Base64-encoded .docx file. The default value is null. */ createDocument(base64File?: string): Word.DocumentCreated; /** * Opens a document and displays it in a new tab or window. The following are examples for the various supported clients and platforms. - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped backslashes), `file://mycomputer/myfolder/Document.docx` - Local location example for Mac and iOS: `/User/someone/document.docx` * * @remarks * [Api set: WordApi 1.6] * * @param filePath Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, on Mac, and on iOS support local and remote locations. */ openDocument(filePath: string): void; /** * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. * * @remarks * [Api set: WordApi 1.5] * * @param base64File Required. The template file. */ retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; /** * Create a new instance of Word.Application object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; /** * 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 Word.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): { [key: string]: string; }; } /** * Represents the body of a document or a section. * * @remarks * [Api set: WordApi 1.1] */ class Body extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of rich text content control objects in the body. * * @remarks * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; /** * Gets the collection of endnotes in the body. * * @remarks * [Api set: WordApi 1.5] */ readonly endnotes: Word.NoteItemCollection; /** * Gets the collection of field objects in the body. * * @remarks * [Api set: WordApi 1.4] */ readonly fields: Word.FieldCollection; /** * Gets the text format of the body. Use this to get and set font name, size, color and other properties. * * @remarks * [Api set: WordApi 1.1] */ readonly font: Word.Font; /** * Gets the collection of footnotes in the body. * * @remarks * [Api set: WordApi 1.5] */ readonly footnotes: Word.NoteItemCollection; /** * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. * * @remarks * [Api set: WordApi 1.1] */ readonly inlinePictures: Word.InlinePictureCollection; /** * Gets the collection of list objects in the body. * * @remarks * [Api set: WordApi 1.3] */ readonly lists: Word.ListCollection; /** * Gets the collection of paragraph objects in the body. * * @remarks * [Api set: WordApi 1.1] * * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. */ readonly paragraphs: Word.ParagraphCollection; /** * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. * * @remarks * [Api set: WordApi 1.3] */ readonly parentBody: Word.Body; /** * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentBodyOrNullObject: Word.Body; /** * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ readonly parentContentControl: Word.ContentControl; /** * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentContentControlOrNullObject: Word.ContentControl; /** * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. * * @remarks * [Api set: WordApi 1.3] */ readonly parentSection: Word.Section; /** * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentSectionOrNullObject: Word.Section; /** * Gets the collection of table objects in the body. * * @remarks * [Api set: WordApi 1.3] */ readonly tables: Word.TableCollection; /** * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style: string; /** * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the text of the body. Use the insertText method to insert text. * * @remarks * [Api set: WordApi 1.1] */ readonly text: string; /** * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. * * @remarks * [Api set: WordApi 1.3] */ readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Body): void; /** * Clears the contents of the body object. The user can perform the undo operation on the cleared content. * * @remarks * [Api set: WordApi 1.1] */ clear(): void; /** * Gets comments associated with the body. * * @remarks * [Api set: WordApi 1.4] */ getComments(): Word.CommentCollection; /** * Gets the currently supported content controls in the body. * * @remarks * [Api set: WordApi 1.5] * * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. * * @param options Optional. Options that define which content controls are returned. */ getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; /** * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. * * @remarks * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; /** * Gets the OOXML (Office Open XML) representation of the body object. * * @remarks * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** * Gets the whole body, or the starting or ending point of the body, as a range. * * @remarks * [Api set: WordApi 1.3] * * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. */ getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; /** * Gets the collection of the TrackedChange objects in the body. * * @remarks * [Api set: WordApi 1.6] */ getTrackedChanges(): Word.TrackedChangeCollection; /** * Inserts a break at the specified location in the main document. * * @remarks * [Api set: WordApi 1.1] * * @param breakType Required. The break type to add to the body. * @param insertLocation Required. The value must be 'Start' or 'End'. */ insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; /** * Wraps the Body object with a content control. * * @remarks * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. * * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. */ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * * @remarks * [Api set: WordApi 1.1] * * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. * * @param base64File Required. The Base64-encoded content of a .docx file. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts HTML at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param html Required. The HTML to be inserted in the document. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts a picture into the body at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param base64EncodedImage Required. The Base64-encoded image to be inserted in the body. * @param insertLocation Required. The value must be 'Start' or 'End'. */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; /** * Inserts OOXML at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts a paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value must be 'Start' or 'End'. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; /** * Inserts a table with the specified number of rows and columns. * * @remarks * [Api set: WordApi 1.3] * * @param rowCount Required. The number of rows in the table. * @param columnCount Required. The number of columns in the table. * @param insertLocation Required. The value must be 'Start' or 'End'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; /** * Inserts text into the body at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param text Required. Text to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. * * @remarks * [Api set: WordApi 1.1] * * @param searchText Required. The search text. Can be a maximum of 255 characters. * @param searchOptions Optional. Options for the search. */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; }): Word.RangeCollection; /** * Selects the body and navigates the Word UI to it. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects the body and navigates the Word UI to it. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Body; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Body; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Body; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Body; /** * 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 Word.Body object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.BodyData; } /** * The data specific to content controls of type CheckBox. * * @remarks * [Api set: WordApi 1.7] */ class CheckboxContentControl extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the current state of the checkbox. * * @remarks * [Api set: WordApi 1.7] */ isChecked: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.CheckboxContentControl): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CheckboxContentControl; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.CheckboxContentControl; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CheckboxContentControl; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CheckboxContentControl; /** * 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 Word.CheckboxContentControl object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.CheckboxContentControlData; } /** * Represents a comment in the document. * * @remarks * [Api set: WordApi 1.4] */ class Comment extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the comment's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange: Word.CommentContentRange; /** * Gets the collection of reply objects associated with the comment. * * @remarks * [Api set: WordApi 1.4] */ readonly replies: Word.CommentReplyCollection; /** * Gets the email of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ readonly authorEmail: string; /** * Gets the name of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ readonly authorName: string; /** * Specifies the comment's content as plain text. * * @remarks * [Api set: WordApi 1.4] */ content: string; /** * Gets the creation date of the comment. * * @remarks * [Api set: WordApi 1.4] */ readonly creationDate: Date; /** * Gets the ID of the comment. * * @remarks * [Api set: WordApi 1.4] */ readonly id: string; /** * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. * * @remarks * [Api set: WordApi 1.4] */ resolved: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Comment): void; /** * Deletes the comment and its replies. * * @remarks * [Api set: WordApi 1.4] */ delete(): void; /** * Gets the range in the main document where the comment is on. * * @remarks * [Api set: WordApi 1.4] */ getRange(): Word.Range; /** * Adds a new reply to the end of the comment thread. * * @remarks * [Api set: WordApi 1.4] * * @param replyText Required. Reply text. */ reply(replyText: string): Word.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Comment; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Comment; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Comment; /** * 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 Word.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.CommentData; } /** * Contains a collection of {@link Word.Comment} objects. * * @remarks * [Api set: WordApi 1.4] */ class CommentCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Comment[]; /** * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.4] */ getFirst(): Word.Comment; /** * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ getFirstOrNullObject(): Word.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CommentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CommentCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CommentCollection; /** * 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 `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.CommentCollectionData; } /** * @remarks * [Api set: WordApi 1.4] */ class CommentContentRange extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies a value that indicates whether the comment text is bold. * * @remarks * [Api set: WordApi 1.4] */ bold: boolean; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. * * @remarks * [Api set: WordApi 1.4] */ hyperlink: string; /** * Checks whether the range length is zero. * * @remarks * [Api set: WordApi 1.4] */ readonly isEmpty: boolean; /** * Specifies a value that indicates whether the comment text is italicized. * * @remarks * [Api set: WordApi 1.4] */ italic: boolean; /** * Specifies a value that indicates whether the comment text has a strikethrough. * * @remarks * [Api set: WordApi 1.4] */ strikeThrough: boolean; /** * Gets the text of the comment range. * * @remarks * [Api set: WordApi 1.4] */ readonly text: string; /** * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. * * @remarks * [Api set: WordApi 1.4] */ underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.CommentContentRange): void; /** * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. * * @remarks * [Api set: WordApi 1.4] * * @param text Required. The text to be inserted in to the CommentContentRange. * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. */ insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CommentContentRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.CommentContentRange; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CommentContentRange; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CommentContentRange; /** * 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 Word.CommentContentRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.CommentContentRangeData; } /** * Represents a comment reply in the document. * * @remarks * [Api set: WordApi 1.4] */ class CommentReply extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the commentReply's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange: Word.CommentContentRange; /** * Gets the parent comment of this reply. * * @remarks * [Api set: WordApi 1.4] */ readonly parentComment: Word.Comment; /** * Gets the email of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ readonly authorEmail: string; /** * Gets the name of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ readonly authorName: string; /** * Specifies the comment reply's content. The string is plain text. * * @remarks * [Api set: WordApi 1.4] */ content: string; /** * Gets the creation date of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ readonly creationDate: Date; /** * Gets the ID of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ readonly id: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.CommentReply): void; /** * Deletes the comment reply. * * @remarks * [Api set: WordApi 1.4] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.CommentReply; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CommentReply; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CommentReply; /** * 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 Word.CommentReply object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.CommentReplyData; } /** * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. * * @remarks * [Api set: WordApi 1.4] */ class CommentReplyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.CommentReply[]; /** * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.4] */ getFirst(): Word.CommentReply; /** * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ getFirstOrNullObject(): Word.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CommentReplyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CommentReplyCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CommentReplyCollection; /** * 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 `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.CommentReplyCollectionData; } /** * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. * * @remarks * [Api set: WordApi 1.1] */ class ContentControl extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; /** * Gets the collection of content control objects in the content control. * * @remarks * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; /** * Gets the collection of endnotes in the content control. * * @remarks * [Api set: WordApi 1.5] */ readonly endnotes: Word.NoteItemCollection; /** * Gets the collection of field objects in the content control. * * @remarks * [Api set: WordApi 1.4] */ readonly fields: Word.FieldCollection; /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ readonly font: Word.Font; /** * Gets the collection of footnotes in the content control. * * @remarks * [Api set: WordApi 1.5] */ readonly footnotes: Word.NoteItemCollection; /** * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. * * @remarks * [Api set: WordApi 1.1] */ readonly inlinePictures: Word.InlinePictureCollection; /** * Gets the collection of list objects in the content control. * * @remarks * [Api set: WordApi 1.3] */ readonly lists: Word.ListCollection; /** * Gets the collection of paragraph objects in the content control. * * @remarks * [Api set: WordApi 1.1] * * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. */ readonly paragraphs: Word.ParagraphCollection; /** * Gets the parent body of the content control. * * @remarks * [Api set: WordApi 1.3] */ readonly parentBody: Word.Body; /** * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ readonly parentContentControl: Word.ContentControl; /** * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentContentControlOrNullObject: Word.ContentControl; /** * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTable: Word.Table; /** * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCell: Word.TableCell; /** * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCellOrNullObject: Word.TableCell; /** * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableOrNullObject: Word.Table; /** * Gets the collection of table objects in the content control. * * @remarks * [Api set: WordApi 1.3] */ readonly tables: Word.TableCollection; /** * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. * * @remarks * [Api set: WordApi 1.1] */ appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; /** * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. * * @remarks * [Api set: WordApi 1.1] */ cannotDelete: boolean; /** * Specifies a value that indicates whether the user can edit the contents of the content control. * * @remarks * [Api set: WordApi 1.1] */ cannotEdit: boolean; /** * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. * * @remarks * [Api set: WordApi 1.1] */ color: string; /** * Gets an integer that represents the content control identifier. * * @remarks * [Api set: WordApi 1.1] */ readonly id: number; /** * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. Note: The set operation for this property isn't supported in Word on the web. * * @remarks * [Api set: WordApi 1.1] */ placeholderText: string; /** * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. * * @remarks * [Api set: WordApi 1.1] */ removeWhenEdited: boolean; /** * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style: string; /** * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. * * @remarks * [Api set: WordApi 1.3] */ readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; /** * Specifies a tag to identify a content control. * * @remarks * [Api set: WordApi 1.1] */ tag: string; /** * Gets the text of the content control. * * @remarks * [Api set: WordApi 1.1] */ readonly text: string; /** * Specifies the title for a content control. * * @remarks * [Api set: WordApi 1.1] */ title: string; /** * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. * * @remarks * [Api set: WordApi 1.1] */ readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.ContentControl): void; /** * Clears the contents of the content control. The user can perform the undo operation on the cleared content. * * @remarks * [Api set: WordApi 1.1] */ clear(): void; /** * Deletes the content control and its content. If `keepContent` is set to true, the content isn't deleted. * * @remarks * [Api set: WordApi 1.1] * * @param keepContent Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set to true, the content isn't deleted. */ delete(keepContent: boolean): void; /** * Gets comments associated with the content control. * * @remarks * [Api set: WordApi 1.4] */ getComments(): Word.CommentCollection; /** * Gets the currently supported child content controls in this content control. * * @remarks * [Api set: WordApi 1.5] * * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. * * @param options Optional. Options that define which content controls are returned. */ getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; /** * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. * * @remarks * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; /** * Gets the Office Open XML (OOXML) representation of the content control object. * * @remarks * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** * Gets the whole content control, or the starting or ending point of the content control, as a range. * * @remarks * [Api set: WordApi 1.3] * * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. */ getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; /** * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. * * @remarks * [Api set: WordApi 1.3] * * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. */ getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; /** * Gets the collection of the TrackedChange objects in the content control. * * @remarks * [Api set: WordApi 1.6] */ getTrackedChanges(): Word.TrackedChangeCollection; /** * Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. * * @remarks * [Api set: WordApi 1.1] * * @param breakType Required. Type of break. * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. */ insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; /** * Inserts a document into the content control at the specified location. * * @remarks * [Api set: WordApi 1.1] * * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. * * @param base64File Required. The Base64-encoded content of a .docx file. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts HTML into the content control at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param html Required. The HTML to be inserted in to the content control. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts an inline picture into the content control at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param base64EncodedImage Required. The Base64-encoded image to be inserted in the content control. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; /** * Inserts OOXML into the content control at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param ooxml Required. The OOXML to be inserted in to the content control. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts a paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; /** * Inserts a table with the specified number of rows and columns into, or next to, a content control. * * @remarks * [Api set: WordApi 1.3] * * @param rowCount Required. The number of rows in the table. * @param columnCount Required. The number of columns in the table. * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; /** * Inserts text into the content control at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param text Required. The text to be inserted in to the content control. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. * * @remarks * [Api set: WordApi 1.1] * * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; }): Word.RangeCollection; /** * Selects the content control. This causes Word to scroll to the selection. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects the content control. This causes Word to scroll to the selection. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Splits the content control into child ranges by using delimiters. * * @remarks * [Api set: WordApi 1.3] * * @param delimiters Required. The delimiters as an array of strings. * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. */ split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.ContentControl; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.ContentControl; /** * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. * * @remarks * [Api set: WordApi 1.5] * * @eventproperty */ readonly onDataChanged: OfficeExtension.EventHandlers; /** * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. * * @remarks * [Api set: WordApi 1.5] * * @eventproperty */ readonly onDeleted: OfficeExtension.EventHandlers; /** * Occurs when the content control is entered. * * @remarks * [Api set: WordApi 1.5] * * @eventproperty */ readonly onEntered: OfficeExtension.EventHandlers; /** * Occurs when the content control is exited, for example, when the cursor leaves the content control. * * @remarks * [Api set: WordApi 1.5] * * @eventproperty */ readonly onExited: OfficeExtension.EventHandlers; /** * Occurs when selection within the content control is changed. * * @remarks * [Api set: WordApi 1.5] * * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.ContentControl; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.ContentControl; /** * 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 Word.ContentControl object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.ContentControlData; } /** * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text and plain text content controls are supported. * * @remarks * [Api set: WordApi 1.1] */ class ContentControlCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.ContentControl[]; /** * Gets the content controls that have the specified tracking state. * * @remarks * [Api set: WordApi 1.5] * * @param changeTrackingStates Required. An array of content control change tracking states. */ getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; /** * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. * * @remarks * [Api set: WordApi 1.1] * * @param id Required. A content control identifier. */ getById(id: number): Word.ContentControl; /** * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param id Required. A content control identifier. */ getByIdOrNullObject(id: number): Word.ContentControl; /** * Gets the content controls that have the specified tag. * * @remarks * [Api set: WordApi 1.1] * * @param tag Required. A tag set on a content control. */ getByTag(tag: string): Word.ContentControlCollection; /** * Gets the content controls that have the specified title. * * @remarks * [Api set: WordApi 1.1] * * @param title Required. The title of a content control. */ getByTitle(title: string): Word.ContentControlCollection; /** * Gets the content controls that have the specified types. * * @remarks * [Api set: WordApi 1.3] * * @param types Required. An array of content control types. */ getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; /** * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.ContentControl; /** * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.ContentControl; /** * Gets a content control by its ID. * * @remarks * [Api set: WordApi 1.1] * * @param id The content control's ID. */ getItem(id: number): Word.ContentControl; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.ContentControlCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.ContentControlCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.ContentControlCollection; /** * 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 `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.ContentControlCollectionData; } /** * Specifies the options that define which content controls are returned. * * @remarks * [Api set: WordApi 1.5] */ interface ContentControlOptions { /** * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. * * @remarks * [Api set: WordApi 1.5] * * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. */ types: Word.ContentControlType[]; } /** * Represents a custom property. * * @remarks * [Api set: WordApi 1.3] */ class CustomProperty extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the key of the custom property. * * @remarks * [Api set: WordApi 1.3] */ readonly key: string; /** * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. * * @remarks * [Api set: WordApi 1.3] */ readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; /** * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). * * @remarks * [Api set: WordApi 1.3] */ value: any; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.CustomProperty): void; /** * Deletes the custom property. * * @remarks * [Api set: WordApi 1.3] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.CustomProperty; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CustomProperty; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CustomProperty; /** * 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 Word.CustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.CustomPropertyData; } /** * Contains the collection of {@link Word.CustomProperty} objects. * * @remarks * [Api set: WordApi 1.3] */ class CustomPropertyCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.CustomProperty[]; /** * Creates a new or sets an existing custom property. * * @remarks * [Api set: WordApi 1.3] * * @param key Required. The custom property's key, which is case-insensitive. * @param value Required. The custom property's value. */ add(key: string, value: any): Word.CustomProperty; /** * Deletes all custom properties in this collection. * * @remarks * [Api set: WordApi 1.3] */ deleteAll(): void; /** * Gets the count of custom properties. * * @remarks * [Api set: WordApi 1.3] */ getCount(): OfficeExtension.ClientResult; /** * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property doesn't exist. * * @remarks * [Api set: WordApi 1.3] * * @param key The key that identifies the custom property object. */ getItem(key: string): Word.CustomProperty; /** * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param key Required. The key that identifies the custom property object. */ getItemOrNullObject(key: string): Word.CustomProperty; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CustomPropertyCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CustomPropertyCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CustomPropertyCollection; /** * 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 `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.CustomPropertyCollectionData; } /** * Represents a custom XML part. * * @remarks * [Api set: WordApi 1.4] */ class CustomXmlPart extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the ID of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ readonly id: string; /** * Gets the namespace URI of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ readonly namespaceUri: string; /** * Deletes the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ delete(): void; /** * Deletes an attribute with the given name from the element identified by xpath. * * @remarks * [Api set: WordApi 1.4] * * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose * the tree is the following: * * ```xml * * * something * * * ``` * * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. * * @param xpath Required. Absolute path to the single element in XPath notation. * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". * @param name Required. Name of the attribute. */ deleteAttribute(xpath: string, namespaceMappings: { [key: string]: string; }, name: string): void; /** * Deletes the element identified by xpath. * * @remarks * [Api set: WordApi 1.4] * * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose * the tree is the following: * * ```xml * * * something * * * ``` * * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. * * @param xpath Required. Absolute path to the single element in XPath notation. * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". */ deleteElement(xpath: string, namespaceMappings: { [key: string]: string; }): void; /** * Gets the full XML content of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ getXml(): OfficeExtension.ClientResult; /** * Inserts an attribute with the given name and value to the element identified by xpath. * * @remarks * [Api set: WordApi 1.4] * * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose * the tree is the following: * * ```xml * * * something * * * ``` * * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. * * @param xpath Required. Absolute path to the single element in XPath notation. * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". * @param name Required. Name of the attribute. * @param value Required. Value of the attribute. */ insertAttribute(xpath: string, namespaceMappings: { [key: string]: string; }, name: string, value: string): void; /** * Inserts the given XML under the parent element identified by xpath at child position index. * * @remarks * [Api set: WordApi 1.4] * * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose * the tree is the following: * * ```xml * * * something * * * ``` * * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. * * @param xpath Required. Absolute path to the single parent element in XPath notation. * @param xml Required. XML content to be inserted. * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". * @param index Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. */ insertElement(xpath: string, xml: string, namespaceMappings: { [key: string]: string; }, index?: number): void; /** * Queries the XML content of the custom XML part. * * @remarks * [Api set: WordApi 1.4] * * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose * the tree is the following: * * ```xml * * * something * * * ``` * * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. * * @param xpath Required. An XPath query. * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". * @returns An array where each item represents an entry matched by the XPath query. */ query(xpath: string, namespaceMappings: { [key: string]: string; }): OfficeExtension.ClientResult; /** * Sets the full XML content of the custom XML part. * * @remarks * [Api set: WordApi 1.4] * * @param xml Required. XML content to be set. */ setXml(xml: string): void; /** * Updates the value of an attribute with the given name of the element identified by xpath. * * @remarks * [Api set: WordApi 1.4] * * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose * the tree is the following: * * ```xml * * * something * * * ``` * * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. * * @param xpath Required. Absolute path to the single element in XPath notation. * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". * @param name Required. Name of the attribute. * @param value Required. New value of the attribute. */ updateAttribute(xpath: string, namespaceMappings: { [key: string]: string; }, name: string, value: string): void; /** * Updates the XML of the element identified by xpath. * * @remarks * [Api set: WordApi 1.4] * * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose * the tree is the following: * * ```xml * * * something * * * ``` * * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. * * @param xpath Required. Absolute path to the single element in XPath notation. * @param xml Required. New XML content to be stored. * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". */ updateElement(xpath: string, xml: string, namespaceMappings: { [key: string]: string; }): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.CustomXmlPart; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CustomXmlPart; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CustomXmlPart; /** * 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 Word.CustomXmlPart object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.CustomXmlPartData; } /** * Contains the collection of {@link Word.CustomXmlPart} objects. * * @remarks * [Api set: WordApi 1.4] */ class CustomXmlPartCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.CustomXmlPart[]; /** * Adds a new custom XML part to the document. * * @remarks * [Api set: WordApi 1.4] * * @param xml Required. XML content. Must be a valid XML fragment. */ add(xml: string): Word.CustomXmlPart; /** * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. * * @remarks * [Api set: WordApi 1.4] * * @param namespaceUri Required. The namespace URI. */ getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; /** * Gets the number of items in the collection. * * @remarks * [Api set: WordApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a custom XML part based on its ID. * * @remarks * [Api set: WordApi 1.4] * * @param id ID or index of the custom XML part to be retrieved. */ getItem(id: string): Word.CustomXmlPart; /** * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] * * @param id Required. ID of the object to be retrieved. */ getItemOrNullObject(id: string): Word.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CustomXmlPartCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CustomXmlPartCollection; /** * 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 `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.CustomXmlPartCollectionData; } /** * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. * * @remarks * [Api set: WordApi 1.4] */ class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.CustomXmlPart[]; /** * Gets the number of items in the collection. * * @remarks * [Api set: WordApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a custom XML part based on its ID. * * @remarks * [Api set: WordApi 1.4] * * @param id ID of the custom XML part to be retrieved. */ getItem(id: string): Word.CustomXmlPart; /** * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] * * @param id Required. ID of the object to be retrieved. */ getItemOrNullObject(id: string): Word.CustomXmlPart; /** * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. * * @remarks * [Api set: WordApi 1.4] */ getOnlyItem(): Word.CustomXmlPart; /** * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ getOnlyItemOrNullObject(): Word.CustomXmlPart; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.CustomXmlPartScopedCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.CustomXmlPartScopedCollection; /** * 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 `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; } /** * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * * @remarks * [Api set: WordApi 1.1] */ class Document extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApi 1.1] */ readonly body: Word.Body; /** * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. * * @remarks * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; /** * Gets the custom XML parts in the document. * * @remarks * [Api set: WordApi 1.4] */ readonly customXmlParts: Word.CustomXmlPartCollection; /** * Gets the properties of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly properties: Word.DocumentProperties; /** * Gets the collection of section objects in the document. * * @remarks * [Api set: WordApi 1.1] */ readonly sections: Word.SectionCollection; /** * Gets the add-in's settings in the document. * * @remarks * [Api set: WordApi 1.4] */ readonly settings: Word.SettingCollection; /** * Specifies the ChangeTracking mode. * * @remarks * [Api set: WordApi 1.4] */ changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; /** * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. * * @remarks * [Api set: WordApi 1.1] */ readonly saved: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Document): void; /** * Adds a style into the document by name and type. * * @remarks * [Api set: WordApi 1.5] * * @param name Required. A string representing the style name. * @param type Required. The style type, including character, list, paragraph, or table. */ addStyle(name: string, type: Word.StyleType): Word.Style; /** * Adds a style into the document by name and type. * * @remarks * [Api set: WordApi 1.5] * * @param name Required. A string representing the style name. * @param type Required. The style type, including character, list, paragraph, or table. */ addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; /** * Closes the current document. * * @remarks * [Api set: WordApi 1.5] * * @param closeBehavior Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. */ close(closeBehavior?: Word.CloseBehavior): void; /** * Closes the current document. * * @remarks * [Api set: WordApi 1.5] * * @param closeBehavior Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. */ close(closeBehavior?: "Save" | "SkipSave"): void; /** * Deletes a bookmark, if it exists, from the document. * * @remarks * [Api set: WordApi 1.4] * * @param name Required. The case-insensitive bookmark name. */ deleteBookmark(name: string): void; /** * Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. * * @remarks * [Api set: WordApi 1.7] * * @param id The ID of the annotation to get. */ getAnnotationById(id: string): Word.Annotation; /** * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. * * @remarks * [Api set: WordApi 1.4] * * @param name Required. The case-insensitive bookmark name. */ getBookmarkRange(name: string): Word.Range; /** * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] * * @param name Required. The case-insensitive bookmark name. */ getBookmarkRangeOrNullObject(name: string): Word.Range; /** * Gets the currently supported content controls in the document. * * @remarks * [Api set: WordApi 1.5] * * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. * * @param options Optional. Options that define which content controls are returned. */ getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; /** * Gets the document's endnotes in a single body. * * @remarks * [Api set: WordApi 1.5] */ getEndnoteBody(): Word.Body; /** * Gets the document's footnotes in a single body. * * @remarks * [Api set: WordApi 1.5] */ getFootnoteBody(): Word.Body; /** * Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. * * @remarks * [Api set: WordApi 1.6] * * @param id Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs across sessions and coauthors. */ getParagraphByUniqueLocalId(id: string): Word.Paragraph; /** * Gets the current selection of the document. Multiple selections aren't supported. * * @remarks * [Api set: WordApi 1.1] */ getSelection(): Word.Range; /** * Gets a StyleCollection object that represents the whole style set of the document. * * @remarks * [Api set: WordApi 1.5] */ getStyles(): Word.StyleCollection; /** * Import styles from a JSON-formatted string. * * @remarks * [Api set: WordApi 1.6] * * @param stylesJson Required. A JSON-formatted string representing the styles. */ importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. * * @remarks * [Api set: WordApi 1.5] * * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. * * @param base64File Required. The Base64-encoded content of a .docx file. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. * @param insertFileOptions Optional. The additional properties that should be imported to the destination document. */ insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; /** * Saves the document. * * @remarks * [Api set: WordApi 1.1] * * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. * * @param saveBehavior Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. */ save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; /** * Saves the document. * * @remarks * [Api set: WordApi 1.1] * * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. * * @param saveBehavior Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. */ save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; /** * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. * * @remarks * [Api set: WordApi 1.7] */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; }): Word.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Document; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Document; /** * Occurs when the user clicks an annotation (or selects it using **Alt+Down**). * * @remarks * [Api set: WordApi 1.7] * * @eventproperty */ readonly onAnnotationClicked: OfficeExtension.EventHandlers; /** * Occurs when the user hovers the cursor over an annotation. * * @remarks * [Api set: WordApi 1.7] * * @eventproperty */ readonly onAnnotationHovered: OfficeExtension.EventHandlers; /** * Occurs when the user adds one or more annotations. * * @remarks * [Api set: WordApi 1.7] * * @eventproperty */ readonly onAnnotationInserted: OfficeExtension.EventHandlers; /** * Occurs when the user deletes one or more annotations. * * @remarks * [Api set: WordApi 1.7] * * @eventproperty */ readonly onAnnotationRemoved: OfficeExtension.EventHandlers; /** * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. * * @remarks * [Api set: WordApi 1.5] * * @eventproperty */ readonly onContentControlAdded: OfficeExtension.EventHandlers; /** * Occurs when the user adds new paragraphs. * * @remarks * [Api set: WordApi 1.6] * * @eventproperty */ readonly onParagraphAdded: OfficeExtension.EventHandlers; /** * Occurs when the user changes paragraphs. * * @remarks * [Api set: WordApi 1.6] * * @eventproperty */ readonly onParagraphChanged: OfficeExtension.EventHandlers; /** * Occurs when the user deletes paragraphs. * * @remarks * [Api set: WordApi 1.6] * * @eventproperty */ readonly onParagraphDeleted: OfficeExtension.EventHandlers; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Document; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Document; /** * 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 Word.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.DocumentData; } /** * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. * * @remarks * [Api set: WordApi 1.3] */ class DocumentCreated extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ readonly body: Word.Body; /** * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ readonly contentControls: Word.ContentControlCollection; /** * Gets the custom XML parts in the document. * * @remarks * [Api set: WordApiHiddenDocument 1.4] */ readonly customXmlParts: Word.CustomXmlPartCollection; /** * Gets the properties of the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ readonly properties: Word.DocumentProperties; /** * Gets the collection of section objects in the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ readonly sections: Word.SectionCollection; /** * Gets the add-in's settings in the document. * * @remarks * [Api set: WordApiHiddenDocument 1.4] */ readonly settings: Word.SettingCollection; /** * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ readonly saved: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.DocumentCreated): void; /** * Adds a style into the document by name and type. * * @remarks * [Api set: WordApiHiddenDocument 1.5] * * @param name Required. A string representing the style name. * @param type Required. The style type, including character, list, paragraph, or table. */ addStyle(name: string, type: Word.StyleType): Word.Style; /** * Adds a style into the document by name and type. * * @remarks * [Api set: WordApiHiddenDocument 1.5] * * @param name Required. A string representing the style name. * @param type Required. The style type, including character, list, paragraph, or table. */ addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; /** * Deletes a bookmark, if it exists, from the document. * * @remarks * [Api set: WordApiHiddenDocument 1.4] * * @param name Required. The case-insensitive bookmark name. */ deleteBookmark(name: string): void; /** * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. * * @remarks * [Api set: WordApiHiddenDocument 1.4] * * @param name Required. The case-insensitive bookmark name. */ getBookmarkRange(name: string): Word.Range; /** * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApiHiddenDocument 1.4] * * @param name Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. */ getBookmarkRangeOrNullObject(name: string): Word.Range; /** * Gets the currently supported content controls in the document. * * @remarks * [Api set: WordApiHiddenDocument 1.5] * * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. * * @param options Optional. Options that define which content controls are returned. */ getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; /** * Gets a StyleCollection object that represents the whole style set of the document. * * @remarks * [Api set: WordApiHiddenDocument 1.5] */ getStyles(): Word.StyleCollection; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. * * @remarks * [Api set: WordApiHiddenDocument 1.5] * * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. * * @param base64File Required. The Base64-encoded content of a .docx file. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. * @param insertFileOptions Optional. The additional properties that should be imported to the destination document. */ insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; /** * Opens the document. * * @remarks * [Api set: WordApi 1.3] */ open(): void; /** * Saves the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] * * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. * * @param saveBehavior Optional. DocumentCreated only supports 'Save'. * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. */ save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; /** * Saves the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] * * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. * * @param saveBehavior Optional. DocumentCreated only supports 'Save'. * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. */ save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.DocumentCreated; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.DocumentCreated; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.DocumentCreated; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.DocumentCreated; /** * 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 Word.DocumentCreated object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.DocumentCreatedData; } /** * Represents document properties. * * @remarks * [Api set: WordApi 1.3] */ class DocumentProperties extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of custom properties of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly customProperties: Word.CustomPropertyCollection; /** * Gets the application name of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly applicationName: string; /** * Specifies the author of the document. * * @remarks * [Api set: WordApi 1.3] */ author: string; /** * Specifies the category of the document. * * @remarks * [Api set: WordApi 1.3] */ category: string; /** * Specifies the comments of the document. * * @remarks * [Api set: WordApi 1.3] */ comments: string; /** * Specifies the company of the document. * * @remarks * [Api set: WordApi 1.3] */ company: string; /** * Gets the creation date of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly creationDate: Date; /** * Specifies the format of the document. * * @remarks * [Api set: WordApi 1.3] */ format: string; /** * Specifies the keywords of the document. * * @remarks * [Api set: WordApi 1.3] */ keywords: string; /** * Gets the last author of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly lastAuthor: string; /** * Gets the last print date of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly lastPrintDate: Date; /** * Gets the last save time of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly lastSaveTime: Date; /** * Specifies the manager of the document. * * @remarks * [Api set: WordApi 1.3] */ manager: string; /** * Gets the revision number of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly revisionNumber: string; /** * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. * * @remarks * [Api set: WordApi 1.3] */ readonly security: number; /** * Specifies the subject of the document. * * @remarks * [Api set: WordApi 1.3] */ subject: string; /** * Gets the template of the document. * * @remarks * [Api set: WordApi 1.3] */ readonly template: string; /** * Specifies the title of the document. * * @remarks * [Api set: WordApi 1.3] */ title: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.DocumentProperties): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.DocumentProperties; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.DocumentProperties; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.DocumentProperties; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.DocumentProperties; /** * 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 Word.DocumentProperties object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.DocumentPropertiesData; } /** * Represents a field. * * @remarks * [Api set: WordApi 1.4] * * Important: To learn more about which fields can be inserted, see the Word.Range.insertField API introduced in requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. */ class Field extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the parent body of the field. * * @remarks * [Api set: WordApi 1.4] */ readonly parentBody: Word.Body; /** * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.4] */ readonly parentContentControl: Word.ContentControl; /** * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ readonly parentContentControlOrNullObject: Word.ContentControl; /** * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.4] */ readonly parentTable: Word.Table; /** * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.4] */ readonly parentTableCell: Word.TableCell; /** * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ readonly parentTableCellOrNullObject: Word.TableCell; /** * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ readonly parentTableOrNullObject: Word.Table; /** * Gets the field's result data. * * @remarks * [Api set: WordApi 1.4] */ readonly result: Word.Range; /** * Specifies the field's code instruction. * * @remarks * [Api set: WordApi 1.4] * * Note: The ability to set the code was introduced in WordApi 1.5. */ code: string; /** * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. * * @remarks * [Api set: WordApi 1.5] */ data: string; /** * Gets the field's kind. * * @remarks * [Api set: WordApi 1.5] */ readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; /** * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. * * @remarks * [Api set: WordApi 1.5] */ locked: boolean; /** * Gets the field's type. * * @remarks * [Api set: WordApi 1.5] */ readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Field): void; /** * Deletes the field. * * @remarks * [Api set: WordApi 1.5] */ delete(): void; /** * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. * * @remarks * [Api set: WordApi 1.4] */ getNext(): Word.Field; /** * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ getNextOrNullObject(): Word.Field; /** * Selects the field. * * @remarks * [Api set: WordApi 1.5] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects the field. * * @remarks * [Api set: WordApi 1.5] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Updates the field. * * @remarks * [Api set: WordApi 1.5] */ updateResult(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Field; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Field; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Field; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Field; /** * 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 Word.Field object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.FieldData; } /** * Contains a collection of {@link Word.Field} objects. * * @remarks * [Api set: WordApi 1.4] * * Important: To learn more about which fields can be inserted, see the Word.Range.insertField API introduced in requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. */ class FieldCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Field[]; /** * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.4] */ getFirst(): Word.Field; /** * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ getFirstOrNullObject(): Word.Field; /** * Gets the Field object collection including the specified types of fields. * * @remarks * [Api set: WordApi 1.5] * * @param types Required. An array of field types. */ getByTypes(types: Word.FieldType[]): Word.FieldCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.FieldCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.FieldCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.FieldCollection; /** * 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 `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.FieldCollectionData; } /** * Represents a font. * * @remarks * [Api set: WordApi 1.1] */ class Font extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ bold: boolean; /** * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.1] */ color: string; /** * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ doubleStrikeThrough: boolean; /** * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. * * @remarks * [Api set: WordApi 1.1] */ highlightColor: string; /** * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ italic: boolean; /** * Specifies a value that represents the name of the font. * * @remarks * [Api set: WordApi 1.1] */ name: string; /** * Specifies a value that represents the font size in points. * * @remarks * [Api set: WordApi 1.1] */ size: number; /** * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ strikeThrough: boolean; /** * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ subscript: boolean; /** * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ superscript: boolean; /** * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. * * @remarks * [Api set: WordApi 1.1] */ underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Font): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.FontLoadOptions): Word.Font; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Font; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Font; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Font; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Font; /** * 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 Word.Font object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.FontData; } /** * Represents an inline picture. * * @remarks * [Api set: WordApi 1.1] */ class InlinePicture extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the parent paragraph that contains the inline image. * * @remarks * [Api set: WordApi 1.2] */ readonly paragraph: Word.Paragraph; /** * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ readonly parentContentControl: Word.ContentControl; /** * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentContentControlOrNullObject: Word.ContentControl; /** * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTable: Word.Table; /** * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCell: Word.TableCell; /** * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCellOrNullObject: Word.TableCell; /** * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableOrNullObject: Word.Table; /** * Specifies a string that represents the alternative text associated with the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextDescription: string; /** * Specifies a string that contains the title for the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextTitle: string; /** * Specifies a number that describes the height of the inline image. * * @remarks * [Api set: WordApi 1.1] */ height: number; /** * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.1] */ hyperlink: string; /** * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * * @remarks * [Api set: WordApi 1.1] */ lockAspectRatio: boolean; /** * Specifies a number that describes the width of the inline image. * * @remarks * [Api set: WordApi 1.1] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.InlinePicture): void; /** * Deletes the inline picture from the document. * * @remarks * [Api set: WordApi 1.2] */ delete(): void; /** * Gets the Base64-encoded string representation of the inline image. * * @remarks * [Api set: WordApi 1.1] */ getBase64ImageSrc(): OfficeExtension.ClientResult; /** * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. * * @remarks * [Api set: WordApi 1.3] */ getNext(): Word.InlinePicture; /** * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.InlinePicture; /** * Gets the picture, or the starting or ending point of the picture, as a range. * * @remarks * [Api set: WordApi 1.3] * * @param rangeLocation Optional. The range location must be 'Whole', 'Start', or 'End'. */ getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; /** * Inserts a break at the specified location in the main document. * * @remarks * [Api set: WordApi 1.2] * * @param breakType Required. The break type to add. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; /** * Wraps the inline picture with a rich text content control. * * @remarks * [Api set: WordApi 1.1] */ insertContentControl(): Word.ContentControl; /** * Inserts a document at the specified location. * * @remarks * [Api set: WordApi 1.2] * * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. * * @param base64File Required. The Base64-encoded content of a .docx file. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; /** * Inserts HTML at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param html Required. The HTML to be inserted. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; /** * Inserts an inline picture at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param base64EncodedImage Required. The Base64-encoded image to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Before', or 'After'. */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; /** * Inserts OOXML at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; /** * Inserts a paragraph at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; /** * Inserts text at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param text Required. Text to be inserted. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; /** * Selects the inline picture. This causes Word to scroll to the selection. * * @remarks * [Api set: WordApi 1.2] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects the inline picture. This causes Word to scroll to the selection. * * @remarks * [Api set: WordApi 1.2] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.InlinePicture; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.InlinePicture; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.InlinePicture; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.InlinePicture; /** * 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 Word.InlinePicture object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.InlinePictureData; } /** * Contains a collection of {@link Word.InlinePicture} objects. * * @remarks * [Api set: WordApi 1.1] */ class InlinePictureCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.InlinePicture[]; /** * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.InlinePicture; /** * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.InlinePicture; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.InlinePictureCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.InlinePictureCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.InlinePictureCollection; /** * 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 `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.InlinePictureCollectionData; } /** * Contains a collection of {@link Word.Paragraph} objects. * * @remarks * [Api set: WordApi 1.3] */ class List extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets paragraphs in the list. Read-only. * * @remarks * [Api set: WordApi 1.3] */ readonly paragraphs: Word.ParagraphCollection; /** * Gets the list's id. * * @remarks * [Api set: WordApi 1.3] */ readonly id: number; /** * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. * * @remarks * [Api set: WordApi 1.3] */ readonly levelExistences: boolean[]; /** * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. * * @remarks * [Api set: WordApi 1.3] */ readonly levelTypes: Word.ListLevelType[]; /** * Gets the paragraphs that occur at the specified level in the list. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. */ getLevelParagraphs(level: number): Word.ParagraphCollection; /** * Gets the bullet, number, or picture at the specified level as a string. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. */ getLevelString(level: number): OfficeExtension.ClientResult; /** * Inserts a paragraph at the specified location. * * @remarks * [Api set: WordApi 1.3] * * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; /** * Sets the alignment of the bullet, number, or picture at the specified level in the list. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param alignment Required. The level alignment that must be 'Left', 'Centered', or 'Right'. */ setLevelAlignment(level: number, alignment: Word.Alignment): void; /** * Sets the alignment of the bullet, number, or picture at the specified level in the list. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param alignment Required. The level alignment that must be 'Left', 'Centered', or 'Right'. */ setLevelAlignment(level: number, alignment: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; /** * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param listBullet Required. The bullet. * @param charCode Optional. The bullet character's code value. Used only if the bullet is 'Custom'. * @param fontName Optional. The bullet's font name. Used only if the bullet is 'Custom'. */ setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; /** * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param listBullet Required. The bullet. * @param charCode Optional. The bullet character's code value. Used only if the bullet is 'Custom'. * @param fontName Optional. The bullet's font name. Used only if the bullet is 'Custom'. */ setLevelBullet(level: number, listBullet: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; /** * Sets the two indents of the specified level in the list. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param textIndent Required. The text indent in points. It is the same as paragraph left indent. * @param bulletNumberPictureIndent Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. */ setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; /** * Sets the numbering format at the specified level in the list. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param listNumbering Required. The ordinal format. * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; /** * Sets the numbering format at the specified level in the list. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param listNumbering Required. The ordinal format. * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; /** * Sets the starting number at the specified level in the list. Default value is 1. * * @remarks * [Api set: WordApi 1.3] * * @param level Required. The level in the list. * @param startingNumber Required. The number to start with. */ setLevelStartingNumber(level: number, startingNumber: number): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ListLoadOptions): Word.List; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.List; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.List; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.List; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.List; /** * 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 Word.List object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.ListData; } /** * Contains a collection of {@link Word.List} objects. * * @remarks * [Api set: WordApi 1.3] */ class ListCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.List[]; /** * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. * * @remarks * [Api set: WordApi 1.3] * * @param id Required. A list identifier. */ getById(id: number): Word.List; /** * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param id Required. A list identifier. */ getByIdOrNullObject(id: number): Word.List; /** * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.List; /** * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.List; /** * Gets a list object by its ID. * * @remarks * [Api set: WordApi 1.3] * * @param id The list's ID. */ getItem(id: number): Word.List; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.ListCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.ListCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.ListCollection; /** * 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 `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.ListCollectionData; } /** * Represents the paragraph list item format. * * @remarks * [Api set: WordApi 1.3] */ class ListItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the level of the item in the list. * * @remarks * [Api set: WordApi 1.3] */ level: number; /** * Gets the list item bullet, number, or picture as a string. * * @remarks * [Api set: WordApi 1.3] */ readonly listString: string; /** * Gets the list item order number in relation to its siblings. * * @remarks * [Api set: WordApi 1.3] */ readonly siblingIndex: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.ListItem): void; /** * Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if the list item has no ancestor. * * @remarks * [Api set: WordApi 1.3] * * @param parentOnly Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. */ getAncestor(parentOnly?: boolean): Word.Paragraph; /** * Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param parentOnly Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. */ getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; /** * Gets all descendant list items of the list item. * * @remarks * [Api set: WordApi 1.3] * * @param directChildrenOnly Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. */ getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.ListItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.ListItem; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.ListItem; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.ListItem; /** * 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 Word.ListItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.ListItemData; } /** * Represents a footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ class NoteItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ readonly body: Word.Body; /** * Represents a footnote or endnote reference in the main document. * * @remarks * [Api set: WordApi 1.5] */ readonly reference: Word.Range; /** * Represents the note item type: footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ readonly type: Word.NoteItemType | "Footnote" | "Endnote"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.NoteItem): void; /** * Deletes the note item. * * @remarks * [Api set: WordApi 1.5] */ delete(): void; /** * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. * * @remarks * [Api set: WordApi 1.5] */ getNext(): Word.NoteItem; /** * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.5] */ getNextOrNullObject(): Word.NoteItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.NoteItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.NoteItem; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.NoteItem; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.NoteItem; /** * 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 Word.NoteItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.NoteItemData; } /** * Contains a collection of {@link Word.NoteItem} objects. * * @remarks * [Api set: WordApi 1.5] */ class NoteItemCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.NoteItem[]; /** * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.5] */ getFirst(): Word.NoteItem; /** * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.5] */ getFirstOrNullObject(): Word.NoteItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.NoteItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.NoteItemCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.NoteItemCollection; /** * 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 `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.NoteItemCollectionData; } /** * Represents a single paragraph in a selection, range, content control, or document body. * * @remarks * [Api set: WordApi 1.1] */ class Paragraph extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of content control objects in the paragraph. * * @remarks * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; /** * Gets the collection of endnotes in the paragraph. * * @remarks * [Api set: WordApi 1.5] */ readonly endnotes: Word.NoteItemCollection; /** * Gets the collection of fields in the paragraph. * * @remarks * [Api set: WordApi 1.4] */ readonly fields: Word.FieldCollection; /** * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ readonly font: Word.Font; /** * Gets the collection of footnotes in the paragraph. * * @remarks * [Api set: WordApi 1.5] */ readonly footnotes: Word.NoteItemCollection; /** * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. * * @remarks * [Api set: WordApi 1.1] */ readonly inlinePictures: Word.InlinePictureCollection; /** * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. * * @remarks * [Api set: WordApi 1.3] */ readonly list: Word.List; /** * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. * * @remarks * [Api set: WordApi 1.3] */ readonly listItem: Word.ListItem; /** * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly listItemOrNullObject: Word.ListItem; /** * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly listOrNullObject: Word.List; /** * Gets the parent body of the paragraph. * * @remarks * [Api set: WordApi 1.3] */ readonly parentBody: Word.Body; /** * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ readonly parentContentControl: Word.ContentControl; /** * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentContentControlOrNullObject: Word.ContentControl; /** * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTable: Word.Table; /** * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCell: Word.TableCell; /** * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCellOrNullObject: Word.TableCell; /** * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableOrNullObject: Word.Table; /** * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * * @remarks * [Api set: WordApi 1.1] */ alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.1] */ firstLineIndent: number; /** * Indicates the paragraph is the last one inside its parent body. * * @remarks * [Api set: WordApi 1.3] */ readonly isLastParagraph: boolean; /** * Checks whether the paragraph is a list item. * * @remarks * [Api set: WordApi 1.3] */ readonly isListItem: boolean; /** * Specifies the left indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ leftIndent: number; /** * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. * * @remarks * [Api set: WordApi 1.1] */ lineSpacing: number; /** * Specifies the amount of spacing, in grid lines, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitAfter: number; /** * Specifies the amount of spacing, in grid lines, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitBefore: number; /** * Specifies the outline level for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ outlineLevel: number; /** * Specifies the right indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ rightIndent: number; /** * Specifies the spacing, in points, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceAfter: number; /** * Specifies the spacing, in points, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceBefore: number; /** * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style: string; /** * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. * * @remarks * [Api set: WordApi 1.3] */ readonly tableNestingLevel: number; /** * Gets the text of the paragraph. * * @remarks * [Api set: WordApi 1.1] */ readonly text: string; /** * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. * * @remarks * [Api set: WordApi 1.6] */ readonly uniqueLocalId: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Paragraph): void; /** * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. * * @remarks * [Api set: WordApi 1.3] * * @param listId Required. The ID of an existing list. * @param level Required. The level in the list. */ attachToList(listId: number, level: number): Word.List; /** * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. * * @remarks * [Api set: WordApi 1.1] */ clear(): void; /** * Deletes the paragraph and its content from the document. * * @remarks * [Api set: WordApi 1.1] */ delete(): void; /** * Moves this paragraph out of its list, if the paragraph is a list item. * * @remarks * [Api set: WordApi 1.3] */ detachFromList(): void; /** * Gets annotations set on this Paragraph object. * * @remarks * [Api set: WordApi 1.7] */ getAnnotations(): Word.AnnotationCollection; /** * Gets comments associated with the paragraph. * * @remarks * [Api set: WordApi 1.4] */ getComments(): Word.CommentCollection; /** * Gets the currently supported content controls in the paragraph. * * @remarks * [Api set: WordApi 1.5] * * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. * * @param options Optional. Options that define which content controls are returned. */ getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; /** * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. * * @remarks * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; /** * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. * * @remarks * [Api set: WordApi 1.3] */ getNext(): Word.Paragraph; /** * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.Paragraph; /** * Gets the Office Open XML (OOXML) representation of the paragraph object. * * @remarks * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. * * @remarks * [Api set: WordApi 1.3] */ getPrevious(): Word.Paragraph; /** * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getPreviousOrNullObject(): Word.Paragraph; /** * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. * * @remarks * [Api set: WordApi 1.3] * * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. */ getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; /** * Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). By default, hidden text and text marked as deleted are excluded. * * @remarks * [Api set: WordApi 1.7] * * @param options Optional. Options that define whether the final result should include hidden text and text marked as deleted. */ getText(options?: Word.GetTextOptions | { IncludeHiddenText?: boolean; IncludeTextMarkedAsDeleted?: boolean; }): OfficeExtension.ClientResult; /** * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. * * @remarks * [Api set: WordApi 1.3] * * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. */ getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; /** * Gets the collection of the TrackedChange objects in the paragraph. * * @remarks * [Api set: WordApi 1.6] */ getTrackedChanges(): Word.TrackedChangeCollection; /** * Inserts annotations on this Paragraph object. * * @remarks * [Api set: WordApi 1.7] * * @param annotations Annotations to set. * @returns An array of the inserted annotations identifiers. */ insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult; /** * Inserts a break at the specified location in the main document. * * @remarks * [Api set: WordApi 1.1] * * @param breakType Required. The break type to add to the document. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; /** * Wraps the Paragraph object with a content control. * * @remarks * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. * * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. */ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. * * @param base64File Required. The Base64-encoded content of a .docx file. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts HTML into the paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param html Required. The HTML to be inserted in the paragraph. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts a picture into the paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param base64EncodedImage Required. The Base64-encoded image to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; /** * Inserts OOXML into the paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param ooxml Required. The OOXML to be inserted in the paragraph. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Inserts a paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; /** * Inserts a table with the specified number of rows and columns. * * @remarks * [Api set: WordApi 1.3] * * @param rowCount Required. The number of rows in the table. * @param columnCount Required. The number of columns in the table. * @param insertLocation Required. The value must be 'Before' or 'After'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; /** * Inserts text into the paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param text Required. Text to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. */ insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; /** * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. * * @remarks * [Api set: WordApi 1.1] * * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; }): Word.RangeCollection; /** * Selects and navigates the Word UI to the paragraph. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects and navigates the Word UI to the paragraph. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Splits the paragraph into child ranges by using delimiters. * * @remarks * [Api set: WordApi 1.3] * * @param delimiters Required. The delimiters as an array of strings. * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. */ split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; /** * Starts a new list with this paragraph. Fails if the paragraph is already a list item. * * @remarks * [Api set: WordApi 1.3] */ startNewList(): Word.List; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Paragraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Paragraph; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Paragraph; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Paragraph; /** * 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 Word.Paragraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.ParagraphData; } /** * Contains a collection of {@link Word.Paragraph} objects. * * @remarks * [Api set: WordApi 1.1] */ class ParagraphCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Paragraph[]; /** * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.Paragraph; /** * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.Paragraph; /** * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getLast(): Word.Paragraph; /** * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getLastOrNullObject(): Word.Paragraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.ParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.ParagraphCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.ParagraphCollection; /** * 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 `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.ParagraphCollectionData; } /** * Represents a style of paragraph in a document. * * @remarks * [Api set: WordApi 1.5] */ class ParagraphFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the alignment for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.5] */ firstLineIndent: number; /** * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepTogether: boolean; /** * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepWithNext: boolean; /** * Specifies the left indent. * * @remarks * [Api set: WordApi 1.5] */ leftIndent: number; /** * Specifies the line spacing (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineSpacing: number; /** * Specifies the amount of spacing (in gridlines) after the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitAfter: number; /** * Specifies the amount of spacing (in gridlines) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitBefore: number; /** * Specifies whether left and right indents are the same width. * * @remarks * [Api set: WordApi 1.5] */ mirrorIndents: boolean; /** * Specifies the outline level for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; /** * Specifies the right indent (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ rightIndent: number; /** * Specifies the amount of spacing (in points) after the specified paragraph or text column. * * @remarks * [Api set: WordApi 1.5] */ spaceAfter: number; /** * Specifies the spacing (in points) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ spaceBefore: number; /** * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ widowControl: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.ParagraphFormat): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.ParagraphFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.ParagraphFormat; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.ParagraphFormat; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.ParagraphFormat; /** * 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 Word.ParagraphFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.ParagraphFormatData; } /** * Represents a contiguous area in a document. * * @remarks * [Api set: WordApi 1.1] */ class Range extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of content control objects in the range. * * @remarks * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; /** * Gets the collection of endnotes in the range. * * @remarks * [Api set: WordApi 1.5] */ readonly endnotes: Word.NoteItemCollection; /** * Gets the collection of field objects in the range. * * @remarks * [Api set: WordApi 1.4] */ readonly fields: Word.FieldCollection; /** * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ readonly font: Word.Font; /** * Gets the collection of footnotes in the range. * * @remarks * [Api set: WordApi 1.5] */ readonly footnotes: Word.NoteItemCollection; /** * Gets the collection of inline picture objects in the range. * * @remarks * [Api set: WordApi 1.2] */ readonly inlinePictures: Word.InlinePictureCollection; /** * Gets the collection of list objects in the range. * * @remarks * [Api set: WordApi 1.3] */ readonly lists: Word.ListCollection; /** * Gets the collection of paragraph objects in the range. * * @remarks * [Api set: WordApi 1.1] * * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. */ readonly paragraphs: Word.ParagraphCollection; /** * Gets the parent body of the range. * * @remarks * [Api set: WordApi 1.3] */ readonly parentBody: Word.Body; /** * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ readonly parentContentControl: Word.ContentControl; /** * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentContentControlOrNullObject: Word.ContentControl; /** * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTable: Word.Table; /** * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCell: Word.TableCell; /** * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCellOrNullObject: Word.TableCell; /** * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableOrNullObject: Word.Table; /** * Gets the collection of table objects in the range. * * @remarks * [Api set: WordApi 1.3] */ readonly tables: Word.TableCollection; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.3] */ hyperlink: string; /** * Checks whether the range length is zero. * * @remarks * [Api set: WordApi 1.3] */ readonly isEmpty: boolean; /** * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style: string; /** * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the text of the range. * * @remarks * [Api set: WordApi 1.1] */ readonly text: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Range): void; /** * Clears the contents of the range object. The user can perform the undo operation on the cleared content. * * @remarks * [Api set: WordApi 1.1] */ clear(): void; /** * Compares this range's location with another range's location. * * @remarks * [Api set: WordApi 1.3] * * @param range Required. The range to compare with this range. */ compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; /** * Deletes the range and its content from the document. * * @remarks * [Api set: WordApi 1.1] */ delete(): void; /** * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges do not have a union. * * @remarks * [Api set: WordApi 1.3] * * @param range Required. Another range. */ expandTo(range: Word.Range): Word.Range; /** * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param range Required. Another range. */ expandToOrNullObject(range: Word.Range): Word.Range; /** * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. * * @remarks * [Api set: WordApi 1.4] * * @param includeHidden Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. * @param includeAdjacent Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. */ getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; /** * Gets comments associated with the range. * * @remarks * [Api set: WordApi 1.4] * @returns */ getComments(): Word.CommentCollection; /** * Gets the currently supported content controls in the range. * * @remarks * [Api set: WordApi 1.5] * * **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. * * @param options Optional. Options that define which content controls are returned. */ getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; /** * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. * * @remarks * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; /** * Gets hyperlink child ranges within the range. * * @remarks * [Api set: WordApi 1.3] */ getHyperlinkRanges(): Word.RangeCollection; /** * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. * * @remarks * [Api set: WordApi 1.3] * * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. */ getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; /** * Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. */ getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; /** * Gets the OOXML representation of the range object. * * @remarks * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** * Clones the range, or gets the starting or ending point of the range as a new range. * * @remarks * [Api set: WordApi 1.3] * * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. */ getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; /** * Gets reviewed text based on ChangeTrackingVersion selection. * * @remarks * [Api set: WordApi 1.4] * * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; /** * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. * * @remarks * [Api set: WordApi 1.3] * * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. */ getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; /** * Gets the collection of the TrackedChange objects in the range. * * @remarks * [Api set: WordApi 1.6] */ getTrackedChanges(): Word.TrackedChangeCollection; /** * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. * * @remarks * [Api set: WordApi 1.4] * * Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing bookmarks in the Word UI, see {@link https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0 | Add or delete bookmarks in a Word document or Outlook message}. * * @param name Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. */ insertBookmark(name: string): void; /** * Inserts a break at the specified location in the main document. * * @remarks * [Api set: WordApi 1.1] * * @param breakType Required. The break type to add. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; /** * Insert a comment on the range. * * @remarks * [Api set: WordApi 1.4] * * @param commentText Required. The comment text to be inserted. * @returns comment object */ insertComment(commentText: string): Word.Comment; /** * Wraps the Range object with a content control. * * @remarks * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. * * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. */ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * * @remarks * [Api set: WordApi 1.5] * * @param insertText Optional. Text to be inserted into the endnote body. The default is "". */ insertEndnote(insertText?: string): Word.NoteItem; /** * Inserts a field at the specified location. * * @remarks * [Api set: WordApi 1.5] * * Important: * * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except Word.FieldType.others. * * In Word on the web, the API supports inserting and managing the following field types. * * - Word.FieldType.addin * * - Word.FieldType.date * * - Word.FieldType.hyperlink * * - Word.FieldType.toc * * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. * @param fieldType Optional. Can be any FieldType constant. The default value is Empty. * @param text Optional. Additional properties or options if needed for specified field type. * @param removeFormatting Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. */ insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; /** * Inserts a field at the specified location. * * @remarks * [Api set: WordApi 1.5] * * Important: * * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except Word.FieldType.others. * * In Word on the web, the API supports inserting and managing the following field types. * * - Word.FieldType.addin * * - Word.FieldType.date * * - Word.FieldType.hyperlink * * - Word.FieldType.toc * * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. * @param fieldType Optional. Can be any FieldType constant. The default value is Empty. * @param text Optional. Additional properties or options if needed for specified field type. * @param removeFormatting Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. */ insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; /** * Inserts a document at the specified location. * * @remarks * [Api set: WordApi 1.1] * * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. * * @param base64File Required. The Base64-encoded content of a .docx file. * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. */ insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; /** * Inserts a footnote. The footnote reference is placed after the range. * * @remarks * [Api set: WordApi 1.5] * * @param insertText Optional. Text to be inserted into the footnote body. The default is "". */ insertFootnote(insertText?: string): Word.NoteItem; /** * Inserts HTML at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param html Required. The HTML to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. */ insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; /** * Inserts a picture at the specified location. * * @remarks * [Api set: WordApi 1.2] * * @param base64EncodedImage Required. The Base64-encoded image to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; /** * Inserts OOXML at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. */ insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; /** * Inserts a paragraph at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; /** * Inserts a table with the specified number of rows and columns. * * @remarks * [Api set: WordApi 1.3] * * @param rowCount Required. The number of rows in the table. * @param columnCount Required. The number of columns in the table. * @param insertLocation Required. The value must be 'Before' or 'After'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; /** * Inserts text at the specified location. * * @remarks * [Api set: WordApi 1.1] * * @param text Required. Text to be inserted. * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. */ insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; /** * Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges aren't overlapped or adjacent. * * @remarks * [Api set: WordApi 1.3] * * @param range Required. Another range. */ intersectWith(range: Word.Range): Word.Range; /** * Returns a new range as the intersection of this range with another range. This range isn't changed. If the two ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param range Required. Another range. */ intersectWithOrNullObject(range: Word.Range): Word.Range; /** * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. * * @remarks * [Api set: WordApi 1.1] * * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; }): Word.RangeCollection; /** * Selects and navigates the Word UI to the range. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects and navigates the Word UI to the range. * * @remarks * [Api set: WordApi 1.1] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Splits the range into child ranges by using delimiters. * * @remarks * [Api set: WordApi 1.3] * * @param delimiters Required. The delimiters as an array of strings. * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. */ split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Range; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Range; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Range; /** * 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 Word.Range object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.RangeData; } /** * Contains a collection of {@link Word.Range} objects. * * @remarks * [Api set: WordApi 1.1] */ class RangeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Range[]; /** * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.Range; /** * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.Range; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.RangeCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.RangeCollection; /** * 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 `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.RangeCollectionData; } /** * Specifies the options to determine what to copy when inserting a file. * * @remarks * [Api set: WordApi 1.5] */ interface InsertFileOptions { /** * Represents whether the change tracking mode status from the source document should be imported. * * @remarks * [Api set: WordApi 1.5] */ importChangeTrackingMode?: boolean; /** * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. * * @remarks * [Api set: WordApi 1.6] */ importCustomProperties?: boolean; /** * Represents whether the custom XML parts from the source document should be imported. * * @remarks * [Api set: WordApi 1.6] */ importCustomXmlParts?: boolean; /** * Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. * * @remarks * [Api set: WordApi 1.7] */ importDifferentOddEvenPages?: boolean; /** * Represents whether the page color and other background information from the source document should be imported. * * @remarks * [Api set: WordApi 1.5] */ importPageColor?: boolean; /** * Represents whether the paragraph spacing from the source document should be imported. * * @remarks * [Api set: WordApi 1.5] */ importParagraphSpacing?: boolean; /** * Represents whether the styles from the source document should be imported. * * @remarks * [Api set: WordApi 1.5] */ importStyles?: boolean; /** * Represents whether the theme from the source document should be imported. * * @remarks * [Api set: WordApi 1.5] */ importTheme?: boolean; } /** * Specifies the options to be included in a search operation. To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. * * @remarks * [Api set: WordApi 1.1] */ class SearchOptions extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignorePunct: boolean; /** * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignoreSpace: boolean; /** * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchCase: boolean; /** * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchPrefix: boolean; /** * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchSuffix: boolean; /** * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWholeWord: boolean; /** * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWildcards: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.SearchOptions): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.SearchOptions; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.SearchOptions; /** * Create a new instance of Word.SearchOptions object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; /** * 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 Word.SearchOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.SearchOptionsData; } /** * Specifies the options to be included in a getText operation. * * @remarks * [Api set: WordApi 1.7] */ interface GetTextOptions { /** * Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default value is False. * * @remarks * [Api set: WordApi 1.7] */ includeHiddenText?: boolean; /** * Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. The default value is False. * * @remarks * [Api set: WordApi 1.7] */ includeTextMarkedAsDeleted?: boolean; } /** * Represents a section in a Word document. * * @remarks * [Api set: WordApi 1.1] */ class Section extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the body object of the section. This doesn't include the header/footer and other section metadata. * * @remarks * [Api set: WordApi 1.1] */ readonly body: Word.Body; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Section): void; /** * Gets one of the section's footers. * * @remarks * [Api set: WordApi 1.1] * * @param type Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. */ getFooter(type: Word.HeaderFooterType): Word.Body; /** * Gets one of the section's footers. * * @remarks * [Api set: WordApi 1.1] * * @param type Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. */ getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; /** * Gets one of the section's headers. * * @remarks * [Api set: WordApi 1.1] * * @param type Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. */ getHeader(type: Word.HeaderFooterType): Word.Body; /** * Gets one of the section's headers. * * @remarks * [Api set: WordApi 1.1] * * @param type Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. */ getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; /** * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. * * @remarks * [Api set: WordApi 1.3] */ getNext(): Word.Section; /** * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Section; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Section; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Section; /** * 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 Word.Section object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.SectionData; } /** * Contains the collection of the document's {@link Word.Section} objects. * * @remarks * [Api set: WordApi 1.1] */ class SectionCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Section[]; /** * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.Section; /** * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.SectionCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.SectionCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.SectionCollection; /** * 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 `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.SectionCollectionData; } /** * Represents a setting of the add-in. * * @remarks * [Api set: WordApi 1.4] */ class Setting extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the key of the setting. * * @remarks * [Api set: WordApi 1.4] */ readonly key: string; /** * Specifies the value of the setting. * * @remarks * [Api set: WordApi 1.4] */ value: any; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Setting): void; /** * Deletes the setting. * * @remarks * [Api set: WordApi 1.4] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Setting; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Setting; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Setting; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Setting; /** * 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 Word.Setting object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.SettingData; } /** * Contains the collection of {@link Word.Setting} objects. * * @remarks * [Api set: WordApi 1.4] */ class SettingCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Setting[]; /** * Creates a new setting or sets an existing setting. * * @remarks * [Api set: WordApi 1.4] * * @param key Required. The setting's key, which is case-sensitive. * @param value Required. The setting's value. */ add(key: string, value: any): Word.Setting; /** * Deletes all settings in this add-in. * * @remarks * [Api set: WordApi 1.4] */ deleteAll(): void; /** * Gets the count of settings. * * @remarks * [Api set: WordApi 1.4] */ getCount(): OfficeExtension.ClientResult; /** * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't exist. * * @remarks * [Api set: WordApi 1.4] * * @param key The key that identifies the setting object. */ getItem(key: string): Word.Setting; /** * Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] * * @param key Required. The key that identifies the setting object. */ getItemOrNullObject(key: string): Word.Setting; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.SettingCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.SettingCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.SettingCollection; /** * 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 `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.SettingCollectionData; } /** * Contains a collection of {@link Word.Style} objects. * * @remarks * [Api set: WordApi 1.5] */ class StyleCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Style[]; /** * Get the style object by its name. * * @remarks * [Api set: WordApi 1.5] * * @param name Required. The style name. */ getByName(name: string): Word.Style; /** * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. * * @remarks * [Api set: WordApi 1.5] * * @param name Required. The style name. */ getByNameOrNullObject(name: string): Word.Style; /** * Gets the number of the styles in the collection. * * @remarks * [Api set: WordApi 1.5] */ getCount(): OfficeExtension.ClientResult; /** * Gets a style object by its index in the collection. * * @remarks * [Api set: WordApi 1.5] * * @param index A number that identifies the index location of a style object. */ getItem(index: number): Word.Style; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.StyleCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.StyleCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.StyleCollection; /** * 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 `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.StyleCollectionData; } /** * Represents a style in a Word document. * * @remarks * [Api set: WordApi 1.3] */ class Style extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets a font object that represents the character formatting of the specified style. * * @remarks * [Api set: WordApi 1.5] */ readonly font: Word.Font; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * * @remarks * [Api set: WordApi 1.5] */ readonly paragraphFormat: Word.ParagraphFormat; /** * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. * * @remarks * [Api set: WordApi 1.6] */ readonly shading: Word.Shading; /** * Gets a TableStyle object representing Style properties that can be applied to a table. * * @remarks * [Api set: WordApi 1.6] */ readonly tableStyle: Word.TableStyle; /** * Specifies the name of an existing style to use as the base formatting of another style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. */ baseStyle: string; /** * Gets whether the specified style is a built-in style. * * @remarks * [Api set: WordApi 1.5] */ readonly builtIn: boolean; /** * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. * * @remarks * [Api set: WordApi 1.5] */ readonly inUse: boolean; /** * Gets whether a style is a linked style that can be used for both paragraph and character formatting. * * @remarks * [Api set: WordApi 1.5] */ readonly linked: boolean; /** * Gets the name of a style in the language of the user. * * @remarks * [Api set: WordApi 1.5] */ readonly nameLocal: string; /** * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. */ nextParagraphStyle: string; /** * Specifies the priority. * * @remarks * [Api set: WordApi 1.5] */ priority: number; /** * Specifies whether the style corresponds to an available quick style. * * @remarks * [Api set: WordApi 1.5] */ quickStyle: boolean; /** * Gets the style type. * * @remarks * [Api set: WordApi 1.5] */ readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; /** * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. * * @remarks * [Api set: WordApi 1.5] */ unhideWhenUsed: boolean; /** * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. * * @remarks * [Api set: WordApi 1.5] */ visibility: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Style): void; /** * Deletes the style. * * @remarks * [Api set: WordApi 1.5] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Style; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Style; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Style; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Style; /** * 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 Word.Style object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.StyleData; } /** * Represents the shading object. * * @remarks * [Api set: WordApi 1.6] */ class Shading extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.6] */ backgroundPatternColor: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Shading): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Shading; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Shading; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Shading; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Shading; /** * 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 Word.Shading object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.ShadingData; } /** * Represents a table in a Word document. * * @remarks * [Api set: WordApi 1.3] */ class Table extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of endnotes in the table. * * @remarks * [Api set: WordApi 1.5] */ readonly endnotes: Word.NoteItemCollection; /** * Gets the collection of field objects in the table. * * @remarks * [Api set: WordApi 1.4] */ readonly fields: Word.FieldCollection; /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ readonly font: Word.Font; /** * Gets the collection of footnotes in the table. * * @remarks * [Api set: WordApi 1.5] */ readonly footnotes: Word.NoteItemCollection; /** * Gets the parent body of the table. * * @remarks * [Api set: WordApi 1.3] */ readonly parentBody: Word.Body; /** * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.3] */ readonly parentContentControl: Word.ContentControl; /** * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentContentControlOrNullObject: Word.ContentControl; /** * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTable: Word.Table; /** * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCell: Word.TableCell; /** * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableCellOrNullObject: Word.TableCell; /** * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTableOrNullObject: Word.Table; /** * Gets all of the table rows. * * @remarks * [Api set: WordApi 1.3] */ readonly rows: Word.TableRowCollection; /** * Gets the child tables nested one level deeper. * * @remarks * [Api set: WordApi 1.3] */ readonly tables: Word.TableCollection; /** * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. * * @remarks * [Api set: WordApi 1.3] */ alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the number of header rows. * * @remarks * [Api set: WordApi 1.3] */ headerRowCount: number; /** * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Indicates whether all of the table rows are uniform. * * @remarks * [Api set: WordApi 1.3] */ readonly isUniform: boolean; /** * Gets the nesting level of the table. Top-level tables have level 1. * * @remarks * [Api set: WordApi 1.3] */ readonly nestingLevel: number; /** * Gets the number of rows in the table. * * @remarks * [Api set: WordApi 1.3] */ readonly rowCount: number; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor: string; /** * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.3] */ style: string; /** * Specifies whether the table has banded columns. * * @remarks * [Api set: WordApi 1.3] */ styleBandedColumns: boolean; /** * Specifies whether the table has banded rows. * * @remarks * [Api set: WordApi 1.3] */ styleBandedRows: boolean; /** * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Specifies whether the table has a first column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleFirstColumn: boolean; /** * Specifies whether the table has a last column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleLastColumn: boolean; /** * Specifies whether the table has a total (last) row with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleTotalRow: boolean; /** * Specifies the text values in the table, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values: string[][]; /** * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * Specifies the width of the table in points. * * @remarks * [Api set: WordApi 1.3] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Table): void; /** * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. * * @remarks * [Api set: WordApi 1.3] * * @param insertLocation Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. * @param columnCount Required. Number of columns to add. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: number, values?: string[][]): void; /** * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. * * @remarks * [Api set: WordApi 1.3] * * @param insertLocation Required. It must be 'Start' or 'End'. * @param rowCount Required. Number of rows to add. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; /** * Autofits the table columns to the width of the window. * * @remarks * [Api set: WordApi 1.3] */ autoFitWindow(): void; /** * Clears the contents of the table. * * @remarks * [Api set: WordApi 1.3] */ clear(): void; /** * Deletes the entire table. * * @remarks * [Api set: WordApi 1.3] */ delete(): void; /** * Deletes specific columns. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] * * @param columnIndex Required. The first column to delete. * @param columnCount Optional. The number of columns to delete. Default 1. */ deleteColumns(columnIndex: number, columnCount?: number): void; /** * Deletes specific rows. * * @remarks * [Api set: WordApi 1.3] * * @param rowIndex Required. The first row to delete. * @param rowCount Optional. The number of rows to delete. Default 1. */ deleteRows(rowIndex: number, rowCount?: number): void; /** * Distributes the column widths evenly. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] */ distributeColumns(): void; /** * Gets the border style for the specified border. * * @remarks * [Api set: WordApi 1.3] * * @param borderLocation Required. The border location. */ getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; /** * Gets the border style for the specified border. * * @remarks * [Api set: WordApi 1.3] * * @param borderLocation Required. The border location. */ getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; /** * Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell doesn't exist. * * @remarks * [Api set: WordApi 1.3] * * @param rowIndex Required. The index of the row. * @param cellIndex Required. The index of the cell in the row. */ getCell(rowIndex: number, cellIndex: number): Word.TableCell; /** * Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] * * @param rowIndex Required. The index of the row. * @param cellIndex Required. The index of the cell in the row. */ getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; /** * Gets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. */ getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; /** * Gets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. */ getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; /** * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. * * @remarks * [Api set: WordApi 1.3] */ getNext(): Word.Table; /** * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.Table; /** * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. * * @remarks * [Api set: WordApi 1.3] */ getParagraphAfter(): Word.Paragraph; /** * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getParagraphAfterOrNullObject(): Word.Paragraph; /** * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. * * @remarks * [Api set: WordApi 1.3] */ getParagraphBefore(): Word.Paragraph; /** * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getParagraphBeforeOrNullObject(): Word.Paragraph; /** * Gets the range that contains this table, or the range at the start or end of the table. * * @remarks * [Api set: WordApi 1.3] * * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. */ getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; /** * Inserts a content control on the table. * * @remarks * [Api set: WordApi 1.3] */ insertContentControl(): Word.ContentControl; /** * Inserts a paragraph at the specified location. * * @remarks * [Api set: WordApi 1.3] * * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value must be 'Before' or 'After'. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; /** * Inserts a table with the specified number of rows and columns. * * @remarks * [Api set: WordApi 1.3] * * @param rowCount Required. The number of rows in the table. * @param columnCount Required. The number of columns in the table. * @param insertLocation Required. The value must be 'Before' or 'After'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; /** * Merges the cells bounded inclusively by a first and last cell. * * @remarks * [Api set: WordApi 1.4] * * @param topRow Required. The row of the first cell * @param firstCell Required. The index of the first cell in its row * @param bottomRow Required. The row of the last cell * @param lastCell Required. The index of the last cell in its row */ mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; /** * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. * * @remarks * [Api set: WordApi 1.3] * * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; }): Word.RangeCollection; /** * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. * * @remarks * [Api set: WordApi 1.3] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. * * @remarks * [Api set: WordApi 1.3] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Sets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. * @param cellPadding Required. The cell padding. */ setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; /** * Sets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. * @param cellPadding Required. The cell padding. */ setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableLoadOptions): Word.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.Table; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.Table; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.Table; /** * 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 Word.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.TableData; } /** * Represents the TableStyle object. * * @remarks * [Api set: WordApi 1.6] */ class TableStyle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ bottomCellMargin: number; /** * Specifies the spacing (in points) between the cells in a table style. * * @remarks * [Api set: WordApi 1.6] */ cellSpacing: number; /** * Specifies the amount of space to add between the contents and the left borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ leftCellMargin: number; /** * Specifies the amount of space to add between the contents and the right borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ rightCellMargin: number; /** * Specifies the amount of space to add between the contents and the top borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ topCellMargin: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.TableStyle): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TableStyle; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.TableStyle; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TableStyle; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TableStyle; /** * 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 Word.TableStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.TableStyleData; } /** * Contains the collection of the document's Table objects. * * @remarks * [Api set: WordApi 1.3] */ class TableCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Table[]; /** * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.Table; /** * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TableCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TableCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TableCollection; /** * 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 `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.TableCollectionData; } /** * Represents a row in a Word document. * * @remarks * [Api set: WordApi 1.3] */ class TableRow extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets cells. Read-only. * * @remarks * [Api set: WordApi 1.3] */ readonly cells: Word.TableCellCollection; /** * Gets the collection of endnotes in the table row. * * @remarks * [Api set: WordApi 1.5] */ readonly endnotes: Word.NoteItemCollection; /** * Gets the collection of field objects in the table row. * * @remarks * [Api set: WordApi 1.4] */ readonly fields: Word.FieldCollection; /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ readonly font: Word.Font; /** * Gets the collection of footnotes in the table row. * * @remarks * [Api set: WordApi 1.5] */ readonly footnotes: Word.NoteItemCollection; /** * Gets parent table. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTable: Word.Table; /** * Gets the number of cells in the row. * * @remarks * [Api set: WordApi 1.3] */ readonly cellCount: number; /** * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. * * @remarks * [Api set: WordApi 1.3] */ readonly isHeader: boolean; /** * Specifies the preferred height of the row in points. * * @remarks * [Api set: WordApi 1.3] */ preferredHeight: number; /** * Gets the index of the row in its parent table. * * @remarks * [Api set: WordApi 1.3] */ readonly rowIndex: number; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor: string; /** * Specifies the text values in the row, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values: string[][]; /** * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.TableRow): void; /** * Clears the contents of the row. * * @remarks * [Api set: WordApi 1.3] */ clear(): void; /** * Deletes the entire row. * * @remarks * [Api set: WordApi 1.3] */ delete(): void; /** * Gets the border style of the cells in the row. * * @remarks * [Api set: WordApi 1.3] * * @param borderLocation Required. The border location. */ getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; /** * Gets the border style of the cells in the row. * * @remarks * [Api set: WordApi 1.3] * * @param borderLocation Required. The border location. */ getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; /** * Gets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. */ getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; /** * Gets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. */ getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; /** * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. * * @remarks * [Api set: WordApi 1.3] */ getNext(): Word.TableRow; /** * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.TableRow; /** * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. * * @remarks * [Api set: WordApi 1.3] * * @param insertLocation Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. * @param rowCount Required. Number of rows to add * @param values Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. */ insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; /** * Merges the row into one cell. * * @remarks * [Api set: WordApi 1.4] */ merge(): Word.TableCell; /** * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. * * @remarks * [Api set: WordApi 1.3] * * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; }): Word.RangeCollection; /** * Selects the row and navigates the Word UI to it. * * @remarks * [Api set: WordApi 1.3] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: Word.SelectionMode): void; /** * Selects the row and navigates the Word UI to it. * * @remarks * [Api set: WordApi 1.3] * * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. */ select(selectionMode?: "Select" | "Start" | "End"): void; /** * Sets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. * @param cellPadding Required. The cell padding. */ setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; /** * Sets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. * @param cellPadding Required. The cell padding. */ setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.TableRow; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TableRow; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TableRow; /** * 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 Word.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.TableRowData; } /** * Contains the collection of the document's TableRow objects. * * @remarks * [Api set: WordApi 1.3] */ class TableRowCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.TableRow[]; /** * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.TableRow; /** * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TableRowCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TableRowCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TableRowCollection; /** * 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 `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.TableRowCollectionData; } /** * Represents a table cell in a Word document. * * @remarks * [Api set: WordApi 1.3] */ class TableCell extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the body object of the cell. * * @remarks * [Api set: WordApi 1.3] */ readonly body: Word.Body; /** * Gets the parent row of the cell. * * @remarks * [Api set: WordApi 1.3] */ readonly parentRow: Word.TableRow; /** * Gets the parent table of the cell. * * @remarks * [Api set: WordApi 1.3] */ readonly parentTable: Word.Table; /** * Gets the index of the cell in its row. * * @remarks * [Api set: WordApi 1.3] */ readonly cellIndex: number; /** * Specifies the width of the cell's column in points. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] */ columnWidth: number; /** * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Gets the index of the cell's row in the table. * * @remarks * [Api set: WordApi 1.3] */ readonly rowIndex: number; /** * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor: string; /** * Specifies the text of the cell. * * @remarks * [Api set: WordApi 1.3] */ value: string; /** * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * Gets the width of the cell in points. * * @remarks * [Api set: WordApi 1.3] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.TableCell): void; /** * Deletes the column containing this cell. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] */ deleteColumn(): void; /** * Deletes the row containing this cell. * * @remarks * [Api set: WordApi 1.3] */ deleteRow(): void; /** * Gets the border style for the specified border. * * @remarks * [Api set: WordApi 1.3] * * @param borderLocation Required. The border location. */ getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; /** * Gets the border style for the specified border. * * @remarks * [Api set: WordApi 1.3] * * @param borderLocation Required. The border location. */ getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; /** * Gets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. */ getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; /** * Gets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. */ getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; /** * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. * * @remarks * [Api set: WordApi 1.3] */ getNext(): Word.TableCell; /** * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.TableCell; /** * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. * * @remarks * [Api set: WordApi 1.3] * * @param insertLocation Required. It must be 'Before' or 'After'. * @param columnCount Required. Number of columns to add. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", columnCount: number, values?: string[][]): void; /** * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. * * @remarks * [Api set: WordApi 1.3] * * @param insertLocation Required. It must be 'Before' or 'After'. * @param rowCount Required. Number of rows to add. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; /** * Sets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. * @param cellPadding Required. The cell padding. */ setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; /** * Sets cell padding in points. * * @remarks * [Api set: WordApi 1.3] * * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. * @param cellPadding Required. The cell padding. */ setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; /** * Splits the cell into the specified number of rows and columns. * * @remarks * [Api set: WordApi 1.4] * * @param rowCount Required. The number of rows to split into. Must be a divisor of the number of underlying rows. * @param columnCount Required. The number of columns to split into. */ split(rowCount: number, columnCount: number): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TableCell; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.TableCell; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TableCell; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TableCell; /** * 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 Word.TableCell object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.TableCellData; } /** * Contains the collection of the document's TableCell objects. * * @remarks * [Api set: WordApi 1.3] */ class TableCellCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.TableCell[]; /** * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.3] */ getFirst(): Word.TableCell; /** * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ getFirstOrNullObject(): Word.TableCell; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TableCellCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TableCellCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TableCellCollection; /** * 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 `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.TableCellCollectionData; } /** * Specifies the border style. * * @remarks * [Api set: WordApi 1.3] */ class TableBorder extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies the table border color. * * @remarks * [Api set: WordApi 1.3] */ color: string; /** * Specifies the type of the table border. * * @remarks * [Api set: WordApi 1.3] */ type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; /** * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. * * @remarks * [Api set: WordApi 1.3] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.TableBorder): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TableBorder; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.TableBorder; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TableBorder; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TableBorder; /** * 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 Word.TableBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.TableBorderData; } /** * Represents a tracked change in a Word document. * * @remarks * [Api set: WordApi 1.6] */ class TrackedChange extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the author of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ readonly author: string; /** * Gets the date of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ readonly date: Date; /** * Gets the text of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ readonly text: string; /** * Gets the type of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; /** * Accepts the tracked change. * * @remarks * [Api set: WordApi 1.6] */ accept(): void; /** * Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. * * @remarks * [Api set: WordApi 1.6] */ getNext(): Word.TrackedChange; /** * Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.6] */ getNextOrNullObject(): Word.TrackedChange; /** * Gets the range of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; /** * Rejects the tracked change. * * @remarks * [Api set: WordApi 1.6] */ reject(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TrackedChange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Word.TrackedChange; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TrackedChange; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TrackedChange; /** * 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 Word.TrackedChange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Word.Interfaces.TrackedChangeData; } /** * Contains a collection of {@link Word.TrackedChange} objects. * * @remarks * [Api set: WordApi 1.6] */ class TrackedChangeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.TrackedChange[]; /** * Accepts all the tracked changes in the collection. * * @remarks * [Api set: WordApi 1.6] */ acceptAll(): void; /** * Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks * [Api set: WordApi 1.6] */ getFirst(): Word.TrackedChange; /** * Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.6] */ getFirstOrNullObject(): Word.TrackedChange; /** * Rejects all the tracked changes in the collection. * * @remarks * [Api set: WordApi 1.6] */ rejectAll(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TrackedChangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Word.TrackedChangeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ track(): Word.TrackedChangeCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ untrack(): Word.TrackedChangeCollection; /** * 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 `Word.TrackedChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Word.Interfaces.TrackedChangeCollectionData; } /** * ChangeTracking mode. * * @remarks * [Api set: WordApi 1.4] */ enum ChangeTrackingMode { /** * ChangeTracking is turned off. * @remarks * [Api set: WordApi 1.4] */ off = "Off", /** * ChangeTracking is turned on for everyone. * @remarks * [Api set: WordApi 1.4] */ trackAll = "TrackAll", /** * Tracking is turned on for my changes only. * @remarks * [Api set: WordApi 1.4] */ trackMineOnly = "TrackMineOnly", } /** * Specify the current version or the original version of the text. * * @remarks * [Api set: WordApi 1.4] */ enum ChangeTrackingVersion { /** * @remarks * [Api set: WordApi 1.4] */ original = "Original", /** * @remarks * [Api set: WordApi 1.4] */ current = "Current", } /** * Specify the track state when ChangeTracking is on. * * @remarks * [Api set: WordApi 1.5] */ enum ChangeTrackingState { /** * @remarks * [Api set: WordApi 1.5] */ unknown = "Unknown", /** * @remarks * [Api set: WordApi 1.5] */ normal = "Normal", /** * @remarks * [Api set: WordApi 1.5] */ added = "Added", /** * @remarks * [Api set: WordApi 1.5] */ deleted = "Deleted", } /** * TrackedChange type. * * @remarks * [Api set: WordApi 1.6] */ enum TrackedChangeType { /** * No revision. * @remarks * [Api set: WordApi 1.6] */ none = "None", /** * Add change. * @remarks * [Api set: WordApi 1.6] */ added = "Added", /** * Delete change. * @remarks * [Api set: WordApi 1.6] */ deleted = "Deleted", /** * Format change. * @remarks * [Api set: WordApi 1.6] */ formatted = "Formatted", } /** * Note item type * * @remarks * [Api set: WordApi 1.5] */ enum NoteItemType { /** * @remarks * [Api set: WordApi 1.5] */ footnote = "Footnote", /** * @remarks * [Api set: WordApi 1.5] */ endnote = "Endnote", } /** * Provides information about the type of a raised event. * * @remarks * [Api set: WordApi 1.5] */ enum EventType { /** * ContentControlDeleted represents the event that the content control has been deleted. * @remarks * [Api set: WordApi 1.5] */ contentControlDeleted = "ContentControlDeleted", /** * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. * @remarks * [Api set: WordApi 1.5] */ contentControlSelectionChanged = "ContentControlSelectionChanged", /** * ContentControlDataChanged represents the event that the data in the content control have been changed. * @remarks * [Api set: WordApi 1.5] */ contentControlDataChanged = "ContentControlDataChanged", /** * ContentControlAdded represents the event a content control has been added to the document. * @remarks * [Api set: WordApi 1.5] */ contentControlAdded = "ContentControlAdded", /** * Represents that a content control has been entered. * @remarks * [Api set: WordApi 1.5] */ contentControlEntered = "ContentControlEntered", /** * Represents that a content control has been exited. * @remarks * [Api set: WordApi 1.5] */ contentControlExited = "ContentControlExited", /** * Represents that one or more new paragraphs were added. * @remarks * [Api set: WordApi 1.6] */ paragraphAdded = "ParagraphAdded", /** * Represents that one or more paragraphs were changed. * @remarks * [Api set: WordApi 1.6] */ paragraphChanged = "ParagraphChanged", /** * Represents that one or more paragraphs were deleted. * @remarks * [Api set: WordApi 1.6] */ paragraphDeleted = "ParagraphDeleted", /** * Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. * @remarks * [Api set: WordApi 1.7] */ annotationClicked = "AnnotationClicked", /** * Represents that an annotation was hovered over in the document. * @remarks * [Api set: WordApi 1.7] */ annotationHovered = "AnnotationHovered", /** * Represents that one or more annotations were added in the document. * @remarks * [Api set: WordApi 1.7] */ annotationInserted = "AnnotationInserted", /** * Represents that one or more annotations were deleted from the document. * @remarks * [Api set: WordApi 1.7] */ annotationRemoved = "AnnotationRemoved", } /** * An enum that specifies an event's source. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.5] */ enum EventSource { /** * @remarks * [Api set: WordApi 1.5] */ local = "Local", /** * @remarks * [Api set: WordApi 1.5] */ remote = "Remote", } /** * Provides information about the content control that raised contentControlAdded event. * * @remarks * [Api set: WordApi 1.5] */ interface ContentControlAddedEventArgs { /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.5] */ eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the content control IDs. * * @remarks * [Api set: WordApi 1.5] */ ids: number[]; /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.5] */ source: Word.EventSource | "Local" | "Remote"; } /** * Provides information about the content control that raised contentControlDataChanged event. * * @remarks * [Api set: WordApi 1.5] */ interface ContentControlDataChangedEventArgs { /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.5] */ eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the content control IDs. * * @remarks * [Api set: WordApi 1.5] */ ids: number[]; /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.5] */ source: Word.EventSource | "Local" | "Remote"; } /** * Provides information about the content control that raised contentControlDeleted event. * * @remarks * [Api set: WordApi 1.5] */ interface ContentControlDeletedEventArgs { /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.5] */ eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the content control IDs. * * @remarks * [Api set: WordApi 1.5] */ ids: number[]; /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.5] */ source: Word.EventSource | "Local" | "Remote"; } /** * Provides information about the content control that raised contentControlEntered event. * * @remarks * [Api set: WordApi 1.5] */ interface ContentControlEnteredEventArgs { /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.5] */ eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the content control IDs. * * @remarks * [Api set: WordApi 1.5] */ ids: number[]; /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.5] */ source: Word.EventSource | "Local" | "Remote"; } /** * Provides information about the content control that raised contentControlExited event. * * @remarks * [Api set: WordApi 1.5] */ interface ContentControlExitedEventArgs { /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.5] */ eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the content control IDs. * * @remarks * [Api set: WordApi 1.5] */ ids: number[]; /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.5] */ source: Word.EventSource | "Local" | "Remote"; } /** * Provides information about the content control that raised contentControlSelectionChanged event. * * @remarks * [Api set: WordApi 1.5] */ interface ContentControlSelectionChangedEventArgs { /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.5] */ eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the content control IDs. * * @remarks * [Api set: WordApi 1.5] */ ids: number[]; /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.5] */ source: Word.EventSource | "Local" | "Remote"; } /** * Provides information about the paragraphs that raised the paragraphAdded event. * * @remarks * [Api set: WordApi 1.6] */ interface ParagraphAddedEventArgs { /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.6] */ source: Word.EventSource | "Local" | "Remote"; /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.6] */ type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. * * @remarks * [Api set: WordApi 1.6] */ uniqueLocalIds: string[]; } /** * Provides information about the paragraphs that raised the paragraphChanged event. * * @remarks * [Api set: WordApi 1.6] */ interface ParagraphChangedEventArgs { /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.6] */ source: Word.EventSource | "Local" | "Remote"; /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.6] */ type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. * * @remarks * [Api set: WordApi 1.6] */ uniqueLocalIds: string[]; } /** * Provides information about the paragraphs that raised the paragraphDeleted event. * * @remarks * [Api set: WordApi 1.6] */ interface ParagraphDeletedEventArgs { /** * The source of the event. It can be local or remote (through coauthoring). * * @remarks * [Api set: WordApi 1.6] */ source: Word.EventSource | "Local" | "Remote"; /** * The event type. See Word.EventType for details. * * @remarks * [Api set: WordApi 1.6] */ type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"; /** * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. * * @remarks * [Api set: WordApi 1.6] */ uniqueLocalIds: string[]; } /** * Specifies supported content control types and subtypes. * * @remarks * [Api set: WordApi 1.1] */ enum ContentControlType { /** * @remarks * [Api set: WordApi 1.1] */ unknown = "Unknown", /** * @remarks * [Api set: WordApi 1.1] */ richTextInline = "RichTextInline", /** * @remarks * [Api set: WordApi 1.1] */ richTextParagraphs = "RichTextParagraphs", /** * Contains a whole cell. * @remarks * [Api set: WordApi 1.1] */ richTextTableCell = "RichTextTableCell", /** * Contains a whole row. * @remarks * [Api set: WordApi 1.1] */ richTextTableRow = "RichTextTableRow", /** * Contains a whole table. * @remarks * [Api set: WordApi 1.1] */ richTextTable = "RichTextTable", /** * @remarks * [Api set: WordApi 1.1] */ plainTextInline = "PlainTextInline", /** * @remarks * [Api set: WordApi 1.1] */ plainTextParagraph = "PlainTextParagraph", /** * @remarks * [Api set: WordApi 1.1] */ picture = "Picture", /** * @remarks * [Api set: WordApi 1.1] */ buildingBlockGallery = "BuildingBlockGallery", /** * @remarks * [Api set: WordApi 1.1] */ checkBox = "CheckBox", /** * @remarks * [Api set: WordApi 1.1] */ comboBox = "ComboBox", /** * @remarks * [Api set: WordApi 1.1] */ dropDownList = "DropDownList", /** * @remarks * [Api set: WordApi 1.1] */ datePicker = "DatePicker", /** * @remarks * [Api set: WordApi 1.1] */ repeatingSection = "RepeatingSection", /** * Identifies a rich text content control. * @remarks * [Api set: WordApi 1.1] */ richText = "RichText", /** * @remarks * [Api set: WordApi 1.1] */ plainText = "PlainText", } /** * ContentControl appearance. * * @remarks * [Api set: WordApi 1.1] * * Content control appearance options are BoundingBox, Tags, or Hidden. */ enum ContentControlAppearance { /** * Represents a content control shown as a shaded rectangle or bounding box (with optional title). * @remarks * [Api set: WordApi 1.1] */ boundingBox = "BoundingBox", /** * Represents a content control shown as start and end markers. * @remarks * [Api set: WordApi 1.1] */ tags = "Tags", /** * Represents a content control that isn't shown. * @remarks * [Api set: WordApi 1.1] */ hidden = "Hidden", } /** * The supported styles for underline format. * * @remarks * [Api set: WordApi 1.1] */ enum UnderlineType { /** * @remarks * [Api set: WordApi 1.1] */ mixed = "Mixed", /** * No underline. * @remarks * [Api set: WordApi 1.1] */ none = "None", /** * Warning: hidden has been deprecated. * @deprecated Hidden is no longer supported. * @remarks * [Api set: WordApi 1.1] */ hidden = "Hidden", /** * Warning: dotLine has been deprecated. * @deprecated DotLine is no longer supported. * @remarks * [Api set: WordApi 1.1] */ dotLine = "DotLine", /** * A single underline. This is the default value. * @remarks * [Api set: WordApi 1.1] */ single = "Single", /** * Only underline individual words. * @remarks * [Api set: WordApi 1.1] */ word = "Word", /** * A double underline. * @remarks * [Api set: WordApi 1.1] */ double = "Double", /** * A single thick underline. * @remarks * [Api set: WordApi 1.1] */ thick = "Thick", /** * A dotted underline. * @remarks * [Api set: WordApi 1.1] */ dotted = "Dotted", /** * @remarks * [Api set: WordApi 1.1] */ dottedHeavy = "DottedHeavy", /** * A single dash underline. * @remarks * [Api set: WordApi 1.1] */ dashLine = "DashLine", /** * @remarks * [Api set: WordApi 1.1] */ dashLineHeavy = "DashLineHeavy", /** * @remarks * [Api set: WordApi 1.1] */ dashLineLong = "DashLineLong", /** * @remarks * [Api set: WordApi 1.1] */ dashLineLongHeavy = "DashLineLongHeavy", /** * An alternating dot-dash underline. * @remarks * [Api set: WordApi 1.1] */ dotDashLine = "DotDashLine", /** * @remarks * [Api set: WordApi 1.1] */ dotDashLineHeavy = "DotDashLineHeavy", /** * An alternating dot-dot-dash underline. * @remarks * [Api set: WordApi 1.1] */ twoDotDashLine = "TwoDotDashLine", /** * @remarks * [Api set: WordApi 1.1] */ twoDotDashLineHeavy = "TwoDotDashLineHeavy", /** * A single wavy underline. * @remarks * [Api set: WordApi 1.1] */ wave = "Wave", /** * @remarks * [Api set: WordApi 1.1] */ waveHeavy = "WaveHeavy", /** * @remarks * [Api set: WordApi 1.1] */ waveDouble = "WaveDouble", } /** * Specifies the form of a break. * * @remarks * [Api set: WordApi 1.1] */ enum BreakType { /** * Page break at the insertion point. * @remarks * [Api set: WordApi 1.1] */ page = "Page", /** * Warning: next has been deprecated. Use sectionNext instead. * @deprecated Use sectionNext instead. * @remarks * [Api set: WordApi 1.1] */ next = "Next", /** * Section break on next page. * @remarks * [Api set: WordApi 1.1] */ sectionNext = "SectionNext", /** * New section without a corresponding page break. * @remarks * [Api set: WordApi 1.1] */ sectionContinuous = "SectionContinuous", /** * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. * @remarks * [Api set: WordApi 1.1] */ sectionEven = "SectionEven", /** * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. * @remarks * [Api set: WordApi 1.1] */ sectionOdd = "SectionOdd", /** * Line break. * @remarks * [Api set: WordApi 1.1] */ line = "Line", } /** * The insertion location types. * * @remarks * [Api set: WordApi 1.1] * * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. * If the location is "Before" or "After", the new content will be outside of the modified object. * If the location is "Start" or "End", the new content will be included as part of the modified object. */ enum InsertLocation { /** * Add content before the contents of the calling object. * @remarks * [Api set: WordApi 1.1] */ before = "Before", /** * Add content after the contents of the calling object. * @remarks * [Api set: WordApi 1.1] */ after = "After", /** * Prepend content to the contents of the calling object. * @remarks * [Api set: WordApi 1.1] */ start = "Start", /** * Append content to the contents of the calling object. * @remarks * [Api set: WordApi 1.1] */ end = "End", /** * Replace the contents of the current object. * @remarks * [Api set: WordApi 1.1] */ replace = "Replace", } /** * @remarks * [Api set: WordApi 1.1] */ enum Alignment { /** * @remarks * [Api set: WordApi 1.1] */ mixed = "Mixed", /** * Unknown alignment. * @remarks * [Api set: WordApi 1.1] */ unknown = "Unknown", /** * Alignment to the left. * @remarks * [Api set: WordApi 1.1] */ left = "Left", /** * Alignment to the center. * @remarks * [Api set: WordApi 1.1] */ centered = "Centered", /** * Alignment to the right. * @remarks * [Api set: WordApi 1.1] */ right = "Right", /** * Fully justified alignment. * @remarks * [Api set: WordApi 1.1] */ justified = "Justified", } /** * @remarks * [Api set: WordApi 1.1] */ enum HeaderFooterType { /** * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. * @remarks * [Api set: WordApi 1.1] */ primary = "Primary", /** * Returns the header or footer on the first page of a section. * @remarks * [Api set: WordApi 1.1] */ firstPage = "FirstPage", /** * Returns all headers or footers on even-numbered pages of a section. * @remarks * [Api set: WordApi 1.1] */ evenPages = "EvenPages", } /** * @remarks * [Api set: WordApi 1.3] */ enum BodyType { /** * @remarks * [Api set: WordApi 1.3] */ unknown = "Unknown", /** * @remarks * [Api set: WordApi 1.3] */ mainDoc = "MainDoc", /** * @remarks * [Api set: WordApi 1.3] */ section = "Section", /** * @remarks * [Api set: WordApi 1.3] */ header = "Header", /** * @remarks * [Api set: WordApi 1.3] */ footer = "Footer", /** * @remarks * [Api set: WordApi 1.3] */ tableCell = "TableCell", /** * @remarks * [Api set: WordApi 1.5] */ footnote = "Footnote", /** * @remarks * [Api set: WordApi 1.5] */ endnote = "Endnote", /** * @remarks * [Api set: WordApi 1.5] */ noteItem = "NoteItem", } /** * This enum sets where the cursor (insertion point) in the document is after a selection. * * @remarks * [Api set: WordApi 1.1] */ enum SelectionMode { /** * The entire range is selected. * @remarks * [Api set: WordApi 1.1] */ select = "Select", /** * The cursor is at the beginning of the selection (just before the start of the selected range). * @remarks * [Api set: WordApi 1.1] */ start = "Start", /** * The cursor is at the end of the selection (just after the end of the selected range). * @remarks * [Api set: WordApi 1.1] */ end = "End", } /** * @remarks * [Api set: WordApi 1.3] */ enum RangeLocation { /** * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. * @remarks * [Api set: WordApi 1.3] */ whole = "Whole", /** * The starting point of the object. For content control, it is the point after the opening tag. * @remarks * [Api set: WordApi 1.3] */ start = "Start", /** * The ending point of the object. For paragraph, it is the point before the EOP. For content control, it is the point before the closing tag. * @remarks * [Api set: WordApi 1.3] */ end = "End", /** * For content control only. It is the point before the opening tag. * @remarks * [Api set: WordApi 1.3] */ before = "Before", /** * The point after the object. If the object is a paragraph content control or table content control, it is the point after the EOP or Table characters. * @remarks * [Api set: WordApi 1.3] */ after = "After", /** * The range between 'Start' and 'End'. * @remarks * [Api set: WordApi 1.3] */ content = "Content", } /** * @remarks * [Api set: WordApi 1.3] */ enum LocationRelation { /** * Indicates that this instance and the range are in different sub-documents. * @remarks * [Api set: WordApi 1.3] */ unrelated = "Unrelated", /** * Indicates that this instance and the range represent the same range. * @remarks * [Api set: WordApi 1.3] */ equal = "Equal", /** * Indicates that this instance contains the range and that it shares the same start character. The range doesn't share the same end character as this instance. * @remarks * [Api set: WordApi 1.3] */ containsStart = "ContainsStart", /** * Indicates that this instance contains the range and that it shares the same end character. The range doesn't share the same start character as this instance. * @remarks * [Api set: WordApi 1.3] */ containsEnd = "ContainsEnd", /** * Indicates that this instance contains the range, with the exception of the start and end character of this instance. * @remarks * [Api set: WordApi 1.3] */ contains = "Contains", /** * Indicates that this instance is inside the range and that it shares the same start character. The range doesn't share the same end character as this instance. * @remarks * [Api set: WordApi 1.3] */ insideStart = "InsideStart", /** * Indicates that this instance is inside the range and that it shares the same end character. The range doesn't share the same start character as this instance. * @remarks * [Api set: WordApi 1.3] */ insideEnd = "InsideEnd", /** * Indicates that this instance is inside the range. The range doesn't share the same start and end characters as this instance. * @remarks * [Api set: WordApi 1.3] */ inside = "Inside", /** * Indicates that this instance occurs before, and is adjacent to, the range. * @remarks * [Api set: WordApi 1.3] */ adjacentBefore = "AdjacentBefore", /** * Indicates that this instance starts before the range and overlaps the range's first character. * @remarks * [Api set: WordApi 1.3] */ overlapsBefore = "OverlapsBefore", /** * Indicates that this instance occurs before the range. * @remarks * [Api set: WordApi 1.3] */ before = "Before", /** * Indicates that this instance occurs after, and is adjacent to, the range. * @remarks * [Api set: WordApi 1.3] */ adjacentAfter = "AdjacentAfter", /** * Indicates that this instance starts inside the range and overlaps the range’s last character. * @remarks * [Api set: WordApi 1.3] */ overlapsAfter = "OverlapsAfter", /** * Indicates that this instance occurs after the range. * @remarks * [Api set: WordApi 1.3] */ after = "After", } /** * @remarks * [Api set: WordApi 1.3] */ enum BorderLocation { /** * @remarks * [Api set: WordApi 1.3] */ top = "Top", /** * @remarks * [Api set: WordApi 1.3] */ left = "Left", /** * @remarks * [Api set: WordApi 1.3] */ bottom = "Bottom", /** * @remarks * [Api set: WordApi 1.3] */ right = "Right", /** * @remarks * [Api set: WordApi 1.3] */ insideHorizontal = "InsideHorizontal", /** * @remarks * [Api set: WordApi 1.3] */ insideVertical = "InsideVertical", /** * @remarks * [Api set: WordApi 1.3] */ inside = "Inside", /** * @remarks * [Api set: WordApi 1.3] */ outside = "Outside", /** * @remarks * [Api set: WordApi 1.3] */ all = "All", } /** * @remarks * [Api set: WordApi 1.3] */ enum CellPaddingLocation { /** * @remarks * [Api set: WordApi 1.3] */ top = "Top", /** * @remarks * [Api set: WordApi 1.3] */ left = "Left", /** * @remarks * [Api set: WordApi 1.3] */ bottom = "Bottom", /** * @remarks * [Api set: WordApi 1.3] */ right = "Right", } /** * @remarks * [Api set: WordApi 1.3] */ enum BorderType { /** * @remarks * [Api set: WordApi 1.3] */ mixed = "Mixed", /** * @remarks * [Api set: WordApi 1.3] */ none = "None", /** * @remarks * [Api set: WordApi 1.3] */ single = "Single", /** * @remarks * [Api set: WordApi 1.3] */ double = "Double", /** * @remarks * [Api set: WordApi 1.3] */ dotted = "Dotted", /** * @remarks * [Api set: WordApi 1.3] */ dashed = "Dashed", /** * @remarks * [Api set: WordApi 1.3] */ dotDashed = "DotDashed", /** * @remarks * [Api set: WordApi 1.3] */ dot2Dashed = "Dot2Dashed", /** * @remarks * [Api set: WordApi 1.3] */ triple = "Triple", /** * @remarks * [Api set: WordApi 1.3] */ thinThickSmall = "ThinThickSmall", /** * @remarks * [Api set: WordApi 1.3] */ thickThinSmall = "ThickThinSmall", /** * @remarks * [Api set: WordApi 1.3] */ thinThickThinSmall = "ThinThickThinSmall", /** * @remarks * [Api set: WordApi 1.3] */ thinThickMed = "ThinThickMed", /** * @remarks * [Api set: WordApi 1.3] */ thickThinMed = "ThickThinMed", /** * @remarks * [Api set: WordApi 1.3] */ thinThickThinMed = "ThinThickThinMed", /** * @remarks * [Api set: WordApi 1.3] */ thinThickLarge = "ThinThickLarge", /** * @remarks * [Api set: WordApi 1.3] */ thickThinLarge = "ThickThinLarge", /** * @remarks * [Api set: WordApi 1.3] */ thinThickThinLarge = "ThinThickThinLarge", /** * @remarks * [Api set: WordApi 1.3] */ wave = "Wave", /** * @remarks * [Api set: WordApi 1.3] */ doubleWave = "DoubleWave", /** * @remarks * [Api set: WordApi 1.3] */ dashedSmall = "DashedSmall", /** * @remarks * [Api set: WordApi 1.3] */ dashDotStroked = "DashDotStroked", /** * @remarks * [Api set: WordApi 1.3] */ threeDEmboss = "ThreeDEmboss", /** * @remarks * [Api set: WordApi 1.3] */ threeDEngrave = "ThreeDEngrave", } /** * @remarks * [Api set: WordApi 1.3] */ enum VerticalAlignment { /** * @remarks * [Api set: WordApi 1.3] */ mixed = "Mixed", /** * @remarks * [Api set: WordApi 1.3] */ top = "Top", /** * @remarks * [Api set: WordApi 1.3] */ center = "Center", /** * @remarks * [Api set: WordApi 1.3] */ bottom = "Bottom", } /** * @remarks * [Api set: WordApi 1.3] */ enum ListLevelType { /** * @remarks * [Api set: WordApi 1.3] */ bullet = "Bullet", /** * @remarks * [Api set: WordApi 1.3] */ number = "Number", /** * @remarks * [Api set: WordApi 1.3] */ picture = "Picture", } /** * @remarks * [Api set: WordApi 1.3] */ enum ListBullet { /** * @remarks * [Api set: WordApi 1.3] */ custom = "Custom", /** * @remarks * [Api set: WordApi 1.3] */ solid = "Solid", /** * @remarks * [Api set: WordApi 1.3] */ hollow = "Hollow", /** * @remarks * [Api set: WordApi 1.3] */ square = "Square", /** * @remarks * [Api set: WordApi 1.3] */ diamonds = "Diamonds", /** * @remarks * [Api set: WordApi 1.3] */ arrow = "Arrow", /** * @remarks * [Api set: WordApi 1.3] */ checkmark = "Checkmark", } /** * @remarks * [Api set: WordApi 1.3] */ enum ListNumbering { /** * @remarks * [Api set: WordApi 1.3] */ none = "None", /** * @remarks * [Api set: WordApi 1.3] */ arabic = "Arabic", /** * @remarks * [Api set: WordApi 1.3] */ upperRoman = "UpperRoman", /** * @remarks * [Api set: WordApi 1.3] */ lowerRoman = "LowerRoman", /** * @remarks * [Api set: WordApi 1.3] */ upperLetter = "UpperLetter", /** * @remarks * [Api set: WordApi 1.3] */ lowerLetter = "LowerLetter", } /** * Represents the built-in style in a Word document. * * @remarks * [Api set: WordApi 1.3] * * Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. */ enum BuiltInStyleName { /** * Mixed styles or other style not in this list. * @remarks * [Api set: WordApi 1.3] */ other = "Other", /** * Reset character and paragraph style to default. * @remarks * [Api set: WordApi 1.3] */ normal = "Normal", /** * @remarks * [Api set: WordApi 1.3] */ heading1 = "Heading1", /** * @remarks * [Api set: WordApi 1.3] */ heading2 = "Heading2", /** * @remarks * [Api set: WordApi 1.3] */ heading3 = "Heading3", /** * @remarks * [Api set: WordApi 1.3] */ heading4 = "Heading4", /** * @remarks * [Api set: WordApi 1.3] */ heading5 = "Heading5", /** * @remarks * [Api set: WordApi 1.3] */ heading6 = "Heading6", /** * @remarks * [Api set: WordApi 1.3] */ heading7 = "Heading7", /** * @remarks * [Api set: WordApi 1.3] */ heading8 = "Heading8", /** * @remarks * [Api set: WordApi 1.3] */ heading9 = "Heading9", /** * Table-of-content level 1. * @remarks * [Api set: WordApi 1.3] */ toc1 = "Toc1", /** * Table-of-content level 2. * @remarks * [Api set: WordApi 1.3] */ toc2 = "Toc2", /** * Table-of-content level 3. * @remarks * [Api set: WordApi 1.3] */ toc3 = "Toc3", /** * Table-of-content level 4. * @remarks * [Api set: WordApi 1.3] */ toc4 = "Toc4", /** * Table-of-content level 5. * @remarks * [Api set: WordApi 1.3] */ toc5 = "Toc5", /** * Table-of-content level 6. * @remarks * [Api set: WordApi 1.3] */ toc6 = "Toc6", /** * Table-of-content level 7. * @remarks * [Api set: WordApi 1.3] */ toc7 = "Toc7", /** * Table-of-content level 8. * @remarks * [Api set: WordApi 1.3] */ toc8 = "Toc8", /** * Table-of-content level 9. * @remarks * [Api set: WordApi 1.3] */ toc9 = "Toc9", /** * @remarks * [Api set: WordApi 1.3] */ footnoteText = "FootnoteText", /** * @remarks * [Api set: WordApi 1.3] */ header = "Header", /** * @remarks * [Api set: WordApi 1.3] */ footer = "Footer", /** * @remarks * [Api set: WordApi 1.3] */ caption = "Caption", /** * @remarks * [Api set: WordApi 1.3] */ footnoteReference = "FootnoteReference", /** * @remarks * [Api set: WordApi 1.3] */ endnoteReference = "EndnoteReference", /** * @remarks * [Api set: WordApi 1.3] */ endnoteText = "EndnoteText", /** * @remarks * [Api set: WordApi 1.3] */ title = "Title", /** * @remarks * [Api set: WordApi 1.3] */ subtitle = "Subtitle", /** * @remarks * [Api set: WordApi 1.3] */ hyperlink = "Hyperlink", /** * @remarks * [Api set: WordApi 1.3] */ strong = "Strong", /** * @remarks * [Api set: WordApi 1.3] */ emphasis = "Emphasis", /** * @remarks * [Api set: WordApi 1.3] */ noSpacing = "NoSpacing", /** * @remarks * [Api set: WordApi 1.3] */ listParagraph = "ListParagraph", /** * @remarks * [Api set: WordApi 1.3] */ quote = "Quote", /** * @remarks * [Api set: WordApi 1.3] */ intenseQuote = "IntenseQuote", /** * @remarks * [Api set: WordApi 1.3] */ subtleEmphasis = "SubtleEmphasis", /** * @remarks * [Api set: WordApi 1.3] */ intenseEmphasis = "IntenseEmphasis", /** * @remarks * [Api set: WordApi 1.3] */ subtleReference = "SubtleReference", /** * @remarks * [Api set: WordApi 1.3] */ intenseReference = "IntenseReference", /** * @remarks * [Api set: WordApi 1.3] */ bookTitle = "BookTitle", /** * @remarks * [Api set: WordApi 1.3] */ bibliography = "Bibliography", /** * Table-of-content heading. * @remarks * [Api set: WordApi 1.3] */ tocHeading = "TocHeading", /** * @remarks * [Api set: WordApi 1.3] */ tableGrid = "TableGrid", /** * @remarks * [Api set: WordApi 1.3] */ plainTable1 = "PlainTable1", /** * @remarks * [Api set: WordApi 1.3] */ plainTable2 = "PlainTable2", /** * @remarks * [Api set: WordApi 1.3] */ plainTable3 = "PlainTable3", /** * @remarks * [Api set: WordApi 1.3] */ plainTable4 = "PlainTable4", /** * @remarks * [Api set: WordApi 1.3] */ plainTable5 = "PlainTable5", /** * @remarks * [Api set: WordApi 1.3] */ tableGridLight = "TableGridLight", /** * @remarks * [Api set: WordApi 1.3] */ gridTable1Light = "GridTable1Light", /** * @remarks * [Api set: WordApi 1.3] */ gridTable1Light_Accent1 = "GridTable1Light_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ gridTable1Light_Accent2 = "GridTable1Light_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable1Light_Accent3 = "GridTable1Light_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable1Light_Accent4 = "GridTable1Light_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable1Light_Accent5 = "GridTable1Light_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ gridTable1Light_Accent6 = "GridTable1Light_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ gridTable2 = "GridTable2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable2_Accent1 = "GridTable2_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ gridTable2_Accent2 = "GridTable2_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable2_Accent3 = "GridTable2_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable2_Accent4 = "GridTable2_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable2_Accent5 = "GridTable2_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ gridTable2_Accent6 = "GridTable2_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ gridTable3 = "GridTable3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable3_Accent1 = "GridTable3_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ gridTable3_Accent2 = "GridTable3_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable3_Accent3 = "GridTable3_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable3_Accent4 = "GridTable3_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable3_Accent5 = "GridTable3_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ gridTable3_Accent6 = "GridTable3_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ gridTable4 = "GridTable4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable4_Accent1 = "GridTable4_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ gridTable4_Accent2 = "GridTable4_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable4_Accent3 = "GridTable4_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable4_Accent4 = "GridTable4_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable4_Accent5 = "GridTable4_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ gridTable4_Accent6 = "GridTable4_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ gridTable5Dark = "GridTable5Dark", /** * @remarks * [Api set: WordApi 1.3] */ gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ gridTable6Colorful = "GridTable6Colorful", /** * @remarks * [Api set: WordApi 1.3] */ gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ gridTable7Colorful = "GridTable7Colorful", /** * @remarks * [Api set: WordApi 1.3] */ gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ listTable1Light = "ListTable1Light", /** * @remarks * [Api set: WordApi 1.3] */ listTable1Light_Accent1 = "ListTable1Light_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ listTable1Light_Accent2 = "ListTable1Light_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ listTable1Light_Accent3 = "ListTable1Light_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ listTable1Light_Accent4 = "ListTable1Light_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ listTable1Light_Accent5 = "ListTable1Light_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ listTable1Light_Accent6 = "ListTable1Light_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ listTable2 = "ListTable2", /** * @remarks * [Api set: WordApi 1.3] */ listTable2_Accent1 = "ListTable2_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ listTable2_Accent2 = "ListTable2_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ listTable2_Accent3 = "ListTable2_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ listTable2_Accent4 = "ListTable2_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ listTable2_Accent5 = "ListTable2_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ listTable2_Accent6 = "ListTable2_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ listTable3 = "ListTable3", /** * @remarks * [Api set: WordApi 1.3] */ listTable3_Accent1 = "ListTable3_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ listTable3_Accent2 = "ListTable3_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ listTable3_Accent3 = "ListTable3_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ listTable3_Accent4 = "ListTable3_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ listTable3_Accent5 = "ListTable3_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ listTable3_Accent6 = "ListTable3_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ listTable4 = "ListTable4", /** * @remarks * [Api set: WordApi 1.3] */ listTable4_Accent1 = "ListTable4_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ listTable4_Accent2 = "ListTable4_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ listTable4_Accent3 = "ListTable4_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ listTable4_Accent4 = "ListTable4_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ listTable4_Accent5 = "ListTable4_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ listTable4_Accent6 = "ListTable4_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ listTable5Dark = "ListTable5Dark", /** * @remarks * [Api set: WordApi 1.3] */ listTable5Dark_Accent1 = "ListTable5Dark_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ listTable5Dark_Accent2 = "ListTable5Dark_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ listTable5Dark_Accent3 = "ListTable5Dark_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ listTable5Dark_Accent4 = "ListTable5Dark_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ listTable5Dark_Accent5 = "ListTable5Dark_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ listTable5Dark_Accent6 = "ListTable5Dark_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ listTable6Colorful = "ListTable6Colorful", /** * @remarks * [Api set: WordApi 1.3] */ listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", /** * @remarks * [Api set: WordApi 1.3] */ listTable7Colorful = "ListTable7Colorful", /** * @remarks * [Api set: WordApi 1.3] */ listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", /** * @remarks * [Api set: WordApi 1.3] */ listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", /** * @remarks * [Api set: WordApi 1.3] */ listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", /** * @remarks * [Api set: WordApi 1.3] */ listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", /** * @remarks * [Api set: WordApi 1.3] */ listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", /** * @remarks * [Api set: WordApi 1.3] */ listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", } /** * @remarks * [Api set: WordApi 1.3] */ enum DocumentPropertyType { /** * @remarks * [Api set: WordApi 1.3] */ string = "String", /** * @remarks * [Api set: WordApi 1.3] */ number = "Number", /** * @remarks * [Api set: WordApi 1.3] */ date = "Date", /** * @remarks * [Api set: WordApi 1.3] */ boolean = "Boolean", } /** * Represents the type of style. * * @remarks * [Api set: WordApi 1.5] */ enum StyleType { /** * Represents that the style is a character style. * @remarks * [Api set: WordApi 1.5] */ character = "Character", /** * Represents that the style is a list style. Currently supported on desktop. * @remarks * [Api set: WordApi 1.5] */ list = "List", /** * Represents that the style is a paragraph style. * @remarks * [Api set: WordApi 1.5] */ paragraph = "Paragraph", /** * Represents that the style is a table style. * @remarks * [Api set: WordApi 1.5] */ table = "Table", } /** * Represents the outline levels. * * @remarks * [Api set: WordApi 1.5] */ enum OutlineLevel { /** * Represents outline level 1. * @remarks * [Api set: WordApi 1.5] */ outlineLevel1 = "OutlineLevel1", /** * Represents outline level 2. * @remarks * [Api set: WordApi 1.5] */ outlineLevel2 = "OutlineLevel2", /** * Represents outline level 3. * @remarks * [Api set: WordApi 1.5] */ outlineLevel3 = "OutlineLevel3", /** * Represents outline level 4. * @remarks * [Api set: WordApi 1.5] */ outlineLevel4 = "OutlineLevel4", /** * Represents outline level 5. * @remarks * [Api set: WordApi 1.5] */ outlineLevel5 = "OutlineLevel5", /** * Represents outline level 6. * @remarks * [Api set: WordApi 1.5] */ outlineLevel6 = "OutlineLevel6", /** * Represents outline level 7. * @remarks * [Api set: WordApi 1.5] */ outlineLevel7 = "OutlineLevel7", /** * Represents outline level 8. * @remarks * [Api set: WordApi 1.5] */ outlineLevel8 = "OutlineLevel8", /** * Represents outline level 9. * @remarks * [Api set: WordApi 1.5] */ outlineLevel9 = "OutlineLevel9", /** * Represents outline level body text, not an outline level. * @remarks * [Api set: WordApi 1.5] */ outlineLevelBodyText = "OutlineLevelBodyText", } /** * Specifies the close behavior for `Document.close`. * * @remarks * [Api set: WordApi 1.5] */ enum CloseBehavior { /** * Saves the changes before closing the document. * @remarks * [Api set: WordApi 1.5] */ save = "Save", /** * Discard the possible changes when closing the document. * @remarks * [Api set: WordApi 1.5] */ skipSave = "SkipSave", } /** * Specifies the save behavior for `Document.save`. * * @remarks * [Api set: WordApi 1.1] */ enum SaveBehavior { /** * Saves the document without prompting the user. If it's a new document, it will be saved with the default name or specified name in the default location. * @remarks * [Api set: WordApi 1.1] */ save = "Save", /** * Displays the "Save As" dialog to the user if the document hasn't been saved. Won't take effect if the document was previously saved. * @remarks * [Api set: WordApi 1.1] */ prompt = "Prompt", } /** * Represents the type of Field. * * @remarks * [Api set: WordApi 1.5] */ enum FieldType { /** * Represents that the field type is Add-in. * @remarks * [Api set: WordApi 1.5] */ addin = "Addin", /** * Represents that the field type is AddressBlock. * @remarks * [Api set: WordApi 1.5] */ addressBlock = "AddressBlock", /** * Represents that the field type is Advance. * @remarks * [Api set: WordApi 1.5] */ advance = "Advance", /** * Represents that the field type is Ask. * @remarks * [Api set: WordApi 1.5] */ ask = "Ask", /** * Represents that the field type is Author. * @remarks * [Api set: WordApi 1.5] */ author = "Author", /** * Represents that the field type is AutoText. * @remarks * [Api set: WordApi 1.5] */ autoText = "AutoText", /** * Represents that the field type is AutoTextList. * @remarks * [Api set: WordApi 1.5] */ autoTextList = "AutoTextList", /** * Represents that the field type is Barcode. * @remarks * [Api set: WordApi 1.5] */ barCode = "BarCode", /** * Represents that the field type is Bibliography. * @remarks * [Api set: WordApi 1.5] */ bibliography = "Bibliography", /** * Represents that the field type is BidiOutline. * @remarks * [Api set: WordApi 1.5] */ bidiOutline = "BidiOutline", /** * Represents that the field type is Citation. * @remarks * [Api set: WordApi 1.5] */ citation = "Citation", /** * Represents that the field type is Comments. * @remarks * [Api set: WordApi 1.5] */ comments = "Comments", /** * Represents that the field type is Compare. * @remarks * [Api set: WordApi 1.5] */ compare = "Compare", /** * Represents that the field type is CreateDate. * @remarks * [Api set: WordApi 1.5] */ createDate = "CreateDate", /** * Represents that the field type is Data. * @remarks * [Api set: WordApi 1.5] */ data = "Data", /** * Represents that the field type is Database. * @remarks * [Api set: WordApi 1.5] */ database = "Database", /** * Represents that the field type is Date. * @remarks * [Api set: WordApi 1.5] */ date = "Date", /** * Represents that the field type is DisplayBarcode. * @remarks * [Api set: WordApi 1.5] */ displayBarcode = "DisplayBarcode", /** * Represents that the field type is DocumentProperty * @remarks * [Api set: WordApi 1.5] */ docProperty = "DocProperty", /** * Represents that the field type is DocumentVariable. * @remarks * [Api set: WordApi 1.5] */ docVariable = "DocVariable", /** * Represents that the field type is EditTime. * @remarks * [Api set: WordApi 1.5] */ editTime = "EditTime", /** * Represents that the field type is Embedded. * @remarks * [Api set: WordApi 1.5] */ embedded = "Embedded", /** * Represents that the field type is Equation. * @remarks * [Api set: WordApi 1.5] */ eq = "EQ", /** * Represents that the field type is Expression. * @remarks * [Api set: WordApi 1.5] */ expression = "Expression", /** * Represents that the field type is FileName. * @remarks * [Api set: WordApi 1.5] */ fileName = "FileName", /** * Represents that the field type is FileSize. * @remarks * [Api set: WordApi 1.5] */ fileSize = "FileSize", /** * Represents that the field type is FillIn. * @remarks * [Api set: WordApi 1.5] */ fillIn = "FillIn", /** * Represents that the field type is FormCheckbox. * @remarks * [Api set: WordApi 1.5] */ formCheckbox = "FormCheckbox", /** * Represents that the field type is FormDropdown. * @remarks * [Api set: WordApi 1.5] */ formDropdown = "FormDropdown", /** * Represents that the field type is FormText. * @remarks * [Api set: WordApi 1.5] */ formText = "FormText", /** * Represents that the field type is GotoButton. * @remarks * [Api set: WordApi 1.5] */ gotoButton = "GotoButton", /** * Represents that the field type is GreetingLine. * @remarks * [Api set: WordApi 1.5] */ greetingLine = "GreetingLine", /** * Represents that the field type is Hyperlink. * @remarks * [Api set: WordApi 1.5] */ hyperlink = "Hyperlink", /** * Represents that the field type is If. * @remarks * [Api set: WordApi 1.5] */ if = "If", /** * Represents that the field type is Import. * @remarks * [Api set: WordApi 1.5] */ import = "Import", /** * Represents that the field type is Include. * @remarks * [Api set: WordApi 1.5] */ include = "Include", /** * Represents that the field type is IncludePicture. * @remarks * [Api set: WordApi 1.5] */ includePicture = "IncludePicture", /** * Represents that the field type is IncludeText. * @remarks * [Api set: WordApi 1.5] */ includeText = "IncludeText", /** * Represents that the field type is Index. * @remarks * [Api set: WordApi 1.5] */ index = "Index", /** * Represents that the field type is Information. * @remarks * [Api set: WordApi 1.5] */ info = "Info", /** * Represents that the field type is Keywords. * @remarks * [Api set: WordApi 1.5] */ keywords = "Keywords", /** * Represents that the field type is LastSavedBy. * @remarks * [Api set: WordApi 1.5] */ lastSavedBy = "LastSavedBy", /** * Represents that the field type is Link. * @remarks * [Api set: WordApi 1.5] */ link = "Link", /** * Represents that the field type is ListNumber. * @remarks * [Api set: WordApi 1.5] */ listNum = "ListNum", /** * Represents that the field type is MacroButton. * @remarks * [Api set: WordApi 1.5] */ macroButton = "MacroButton", /** * Represents that the field type is MergeBarcode. * @remarks * [Api set: WordApi 1.5] */ mergeBarcode = "MergeBarcode", /** * Represents that the field type is MergeField. * @remarks * [Api set: WordApi 1.5] */ mergeField = "MergeField", /** * Represents that the field type is MergeRecord. * @remarks * [Api set: WordApi 1.5] */ mergeRec = "MergeRec", /** * Represents that the field type is MergeSequence. * @remarks * [Api set: WordApi 1.5] */ mergeSeq = "MergeSeq", /** * Represents that the field type is Next. * @remarks * [Api set: WordApi 1.5] */ next = "Next", /** * Represents that the field type is NextIf. * @remarks * [Api set: WordApi 1.5] */ nextIf = "NextIf", /** * Represents that the field type is NoteReference. * @remarks * [Api set: WordApi 1.5] */ noteRef = "NoteRef", /** * Represents that the field type is NumberOfCharacters. * @remarks * [Api set: WordApi 1.5] */ numChars = "NumChars", /** * Represents that the field type is NumberOfPages. * @remarks * [Api set: WordApi 1.5] */ numPages = "NumPages", /** * Represents that the field type is NumberOfWords. * @remarks * [Api set: WordApi 1.5] */ numWords = "NumWords", /** * Represents that the field type is ActiveXControl. * @remarks * [Api set: WordApi 1.5] */ ocx = "OCX", /** * Represents that the field type is Page. * @remarks * [Api set: WordApi 1.5] */ page = "Page", /** * Represents that the field type is PageReference. * @remarks * [Api set: WordApi 1.5] */ pageRef = "PageRef", /** * Represents that the field type is Print. * @remarks * [Api set: WordApi 1.5] */ print = "Print", /** * Represents that the field type is PrintDate. * @remarks * [Api set: WordApi 1.5] */ printDate = "PrintDate", /** * Represents that the field type is Private. * @remarks * [Api set: WordApi 1.5] */ private = "Private", /** * Represents that the field type is Quote. * @remarks * [Api set: WordApi 1.5] */ quote = "Quote", /** * Represents that the field type is ReferencedDocument. * @remarks * [Api set: WordApi 1.5] */ rd = "RD", /** * Represents that the field type is Reference. * @remarks * [Api set: WordApi 1.5] */ ref = "Ref", /** * Represents that the field type is RevisionNumber. * @remarks * [Api set: WordApi 1.5] */ revNum = "RevNum", /** * Represents that the field type is SaveDate. * @remarks * [Api set: WordApi 1.5] */ saveDate = "SaveDate", /** * Represents that the field type is Section. * @remarks * [Api set: WordApi 1.5] */ section = "Section", /** * Represents that the field type is SectionPages. * @remarks * [Api set: WordApi 1.5] */ sectionPages = "SectionPages", /** * Represents that the field type is Sequence. * @remarks * [Api set: WordApi 1.5] */ seq = "Seq", /** * Represents that the field type is Set. * @remarks * [Api set: WordApi 1.5] */ set = "Set", /** * Represents that the field type is Shape. * @remarks * [Api set: WordApi 1.5] */ shape = "Shape", /** * Represents that the field type is SkipIf. * @remarks * [Api set: WordApi 1.5] */ skipIf = "SkipIf", /** * Represents that the field type is StyleReference. * @remarks * [Api set: WordApi 1.5] */ styleRef = "StyleRef", /** * Represents that the field type is Subject. * @remarks * [Api set: WordApi 1.5] */ subject = "Subject", /** * Represents that the field type is Subscriber. * @remarks * [Api set: WordApi 1.5] */ subscriber = "Subscriber", /** * Represents that the field type is Symbol. * @remarks * [Api set: WordApi 1.5] */ symbol = "Symbol", /** * Represents that the field type is TableOfAuthoritiesEntry. * @remarks * [Api set: WordApi 1.5] */ ta = "TA", /** * Represents that the field type is TableOfContentsEntry. * @remarks * [Api set: WordApi 1.5] */ tc = "TC", /** * Represents that the field type is Template. * @remarks * [Api set: WordApi 1.5] */ template = "Template", /** * Represents that the field type is Time. * @remarks * [Api set: WordApi 1.5] */ time = "Time", /** * Represents that the field type is Title. * @remarks * [Api set: WordApi 1.5] */ title = "Title", /** * Represents that the field type is TableOfAuthorities. * @remarks * [Api set: WordApi 1.5] */ toa = "TOA", /** * Represents that the field type is TableOfContents. * @remarks * [Api set: WordApi 1.5] */ toc = "TOC", /** * Represents that the field type is UserAddress. * @remarks * [Api set: WordApi 1.5] */ userAddress = "UserAddress", /** * Represents that the field type is UserInitials. * @remarks * [Api set: WordApi 1.5] */ userInitials = "UserInitials", /** * Represents that the field type is UserName. * @remarks * [Api set: WordApi 1.5] */ userName = "UserName", /** * Represents that the field type is IndexEntry. * @remarks * [Api set: WordApi 1.5] */ xe = "XE", /** * Represents that the field type is Empty. * @remarks * [Api set: WordApi 1.5] */ empty = "Empty", /** * Represents the field types not supported by the Office JavaScript API. * @remarks * [Api set: WordApi 1.5] */ others = "Others", /** * Represents that the field type is Undefined. * @remarks * [Api set: WordApi 1.5] */ undefined = "Undefined", } /** * Represents the kind of field. Indicates how the field works in relation to updating. * * @remarks * [Api set: WordApi 1.5] */ enum FieldKind { /** * Represents that the field is invalid. For example, a pair of field characters with nothing inside. * @remarks * [Api set: WordApi 1.5] */ none = "None", /** * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. * @remarks * [Api set: WordApi 1.5] */ hot = "Hot", /** * Represents that the field is automatically updated when the source changes or the field can be manually updated. * @remarks * [Api set: WordApi 1.5] */ warm = "Warm", /** * Represents that the field doesn't have a result. * @remarks * [Api set: WordApi 1.5] */ cold = "Cold", } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", invalidArgument = "InvalidArgument", itemNotFound = "ItemNotFound", notAllowed = "NotAllowed", notImplemented = "NotImplemented", searchDialogIsOpen = "SearchDialogIsOpen", searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", } namespace Interfaces { /** * Provides ways to load properties of only a subset of members of a collection. */ interface CollectionLoadOptions { /** * Specify the number of items in the queried collection to be included in the result. */ $top?: number; /** * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. */ $skip?: number; } /** An interface for updating data on the AnnotationCollection object, for use in `annotationCollection.set({ ... })`. */ interface AnnotationCollectionUpdateData { items?: Word.Interfaces.AnnotationData[]; } /** An interface for updating data on the Body object, for use in `body.set({ ... })`. */ interface BodyUpdateData { /** * Gets the text format of the body. Use this to get and set font name, size, color and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontUpdateData; /** * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; } /** An interface for updating data on the CheckboxContentControl object, for use in `checkboxContentControl.set({ ... })`. */ interface CheckboxContentControlUpdateData { /** * Specifies the current state of the checkbox. * * @remarks * [Api set: WordApi 1.7] */ isChecked?: boolean; } /** An interface for updating data on the Comment object, for use in `comment.set({ ... })`. */ interface CommentUpdateData { /** * Specifies the comment's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeUpdateData; /** * Specifies the comment's content as plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: string; /** * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. * * @remarks * [Api set: WordApi 1.4] */ resolved?: boolean; } /** An interface for updating data on the CommentCollection object, for use in `commentCollection.set({ ... })`. */ interface CommentCollectionUpdateData { items?: Word.Interfaces.CommentData[]; } /** An interface for updating data on the CommentContentRange object, for use in `commentContentRange.set({ ... })`. */ interface CommentContentRangeUpdateData { /** * Specifies a value that indicates whether the comment text is bold. * * @remarks * [Api set: WordApi 1.4] */ bold?: boolean; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. * * @remarks * [Api set: WordApi 1.4] */ hyperlink?: string; /** * Specifies a value that indicates whether the comment text is italicized. * * @remarks * [Api set: WordApi 1.4] */ italic?: boolean; /** * Specifies a value that indicates whether the comment text has a strikethrough. * * @remarks * [Api set: WordApi 1.4] */ strikeThrough?: boolean; /** * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. * * @remarks * [Api set: WordApi 1.4] */ underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; } /** An interface for updating data on the CommentReply object, for use in `commentReply.set({ ... })`. */ interface CommentReplyUpdateData { /** * Specifies the commentReply's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeUpdateData; /** * Gets the parent comment of this reply. * * @remarks * [Api set: WordApi 1.4] */ parentComment?: Word.Interfaces.CommentUpdateData; /** * Specifies the comment reply's content. The string is plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: string; } /** An interface for updating data on the CommentReplyCollection object, for use in `commentReplyCollection.set({ ... })`. */ interface CommentReplyCollectionUpdateData { items?: Word.Interfaces.CommentReplyData[]; } /** An interface for updating data on the ContentControl object, for use in `contentControl.set({ ... })`. */ interface ContentControlUpdateData { /** * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData; /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontUpdateData; /** * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. * * @remarks * [Api set: WordApi 1.1] */ appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; /** * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. * * @remarks * [Api set: WordApi 1.1] */ cannotDelete?: boolean; /** * Specifies a value that indicates whether the user can edit the contents of the content control. * * @remarks * [Api set: WordApi 1.1] */ cannotEdit?: boolean; /** * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. * * @remarks * [Api set: WordApi 1.1] */ color?: string; /** * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. Note: The set operation for this property isn't supported in Word on the web. * * @remarks * [Api set: WordApi 1.1] */ placeholderText?: string; /** * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. * * @remarks * [Api set: WordApi 1.1] */ removeWhenEdited?: boolean; /** * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Specifies a tag to identify a content control. * * @remarks * [Api set: WordApi 1.1] */ tag?: string; /** * Specifies the title for a content control. * * @remarks * [Api set: WordApi 1.1] */ title?: string; } /** An interface for updating data on the ContentControlCollection object, for use in `contentControlCollection.set({ ... })`. */ interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } /** An interface for updating data on the CustomProperty object, for use in `customProperty.set({ ... })`. */ interface CustomPropertyUpdateData { /** * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). * * @remarks * [Api set: WordApi 1.3] */ value?: any; } /** An interface for updating data on the CustomPropertyCollection object, for use in `customPropertyCollection.set({ ... })`. */ interface CustomPropertyCollectionUpdateData { items?: Word.Interfaces.CustomPropertyData[]; } /** An interface for updating data on the CustomXmlPartCollection object, for use in `customXmlPartCollection.set({ ... })`. */ interface CustomXmlPartCollectionUpdateData { items?: Word.Interfaces.CustomXmlPartData[]; } /** An interface for updating data on the CustomXmlPartScopedCollection object, for use in `customXmlPartScopedCollection.set({ ... })`. */ interface CustomXmlPartScopedCollectionUpdateData { items?: Word.Interfaces.CustomXmlPartData[]; } /** An interface for updating data on the Document object, for use in `document.set({ ... })`. */ interface DocumentUpdateData { /** * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApi 1.1] */ body?: Word.Interfaces.BodyUpdateData; /** * Gets the properties of the document. * * @remarks * [Api set: WordApi 1.3] */ properties?: Word.Interfaces.DocumentPropertiesUpdateData; /** * Specifies the ChangeTracking mode. * * @remarks * [Api set: WordApi 1.4] */ changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; } /** An interface for updating data on the DocumentCreated object, for use in `documentCreated.set({ ... })`. */ interface DocumentCreatedUpdateData { /** * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ body?: Word.Interfaces.BodyUpdateData; /** * Gets the properties of the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ properties?: Word.Interfaces.DocumentPropertiesUpdateData; } /** An interface for updating data on the DocumentProperties object, for use in `documentProperties.set({ ... })`. */ interface DocumentPropertiesUpdateData { /** * Specifies the author of the document. * * @remarks * [Api set: WordApi 1.3] */ author?: string; /** * Specifies the category of the document. * * @remarks * [Api set: WordApi 1.3] */ category?: string; /** * Specifies the comments of the document. * * @remarks * [Api set: WordApi 1.3] */ comments?: string; /** * Specifies the company of the document. * * @remarks * [Api set: WordApi 1.3] */ company?: string; /** * Specifies the format of the document. * * @remarks * [Api set: WordApi 1.3] */ format?: string; /** * Specifies the keywords of the document. * * @remarks * [Api set: WordApi 1.3] */ keywords?: string; /** * Specifies the manager of the document. * * @remarks * [Api set: WordApi 1.3] */ manager?: string; /** * Specifies the subject of the document. * * @remarks * [Api set: WordApi 1.3] */ subject?: string; /** * Specifies the title of the document. * * @remarks * [Api set: WordApi 1.3] */ title?: string; } /** An interface for updating data on the Field object, for use in `field.set({ ... })`. */ interface FieldUpdateData { /** * Gets the field's result data. * * @remarks * [Api set: WordApi 1.4] */ result?: Word.Interfaces.RangeUpdateData; /** * Specifies the field's code instruction. * * @remarks * [Api set: WordApi 1.4] * * Note: The ability to set the code was introduced in WordApi 1.5. */ code?: string; /** * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. * * @remarks * [Api set: WordApi 1.5] */ data?: string; /** * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. * * @remarks * [Api set: WordApi 1.5] */ locked?: boolean; } /** An interface for updating data on the FieldCollection object, for use in `fieldCollection.set({ ... })`. */ interface FieldCollectionUpdateData { items?: Word.Interfaces.FieldData[]; } /** An interface for updating data on the Font object, for use in `font.set({ ... })`. */ interface FontUpdateData { /** * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ bold?: boolean; /** * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.1] */ color?: string; /** * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ doubleStrikeThrough?: boolean; /** * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. * * @remarks * [Api set: WordApi 1.1] */ highlightColor?: string; /** * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ italic?: boolean; /** * Specifies a value that represents the name of the font. * * @remarks * [Api set: WordApi 1.1] */ name?: string; /** * Specifies a value that represents the font size in points. * * @remarks * [Api set: WordApi 1.1] */ size?: number; /** * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ strikeThrough?: boolean; /** * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ subscript?: boolean; /** * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ superscript?: boolean; /** * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. * * @remarks * [Api set: WordApi 1.1] */ underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; } /** An interface for updating data on the InlinePicture object, for use in `inlinePicture.set({ ... })`. */ interface InlinePictureUpdateData { /** * Specifies a string that represents the alternative text associated with the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextDescription?: string; /** * Specifies a string that contains the title for the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextTitle?: string; /** * Specifies a number that describes the height of the inline image. * * @remarks * [Api set: WordApi 1.1] */ height?: number; /** * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.1] */ hyperlink?: string; /** * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * * @remarks * [Api set: WordApi 1.1] */ lockAspectRatio?: boolean; /** * Specifies a number that describes the width of the inline image. * * @remarks * [Api set: WordApi 1.1] */ width?: number; } /** An interface for updating data on the InlinePictureCollection object, for use in `inlinePictureCollection.set({ ... })`. */ interface InlinePictureCollectionUpdateData { items?: Word.Interfaces.InlinePictureData[]; } /** An interface for updating data on the ListCollection object, for use in `listCollection.set({ ... })`. */ interface ListCollectionUpdateData { items?: Word.Interfaces.ListData[]; } /** An interface for updating data on the ListItem object, for use in `listItem.set({ ... })`. */ interface ListItemUpdateData { /** * Specifies the level of the item in the list. * * @remarks * [Api set: WordApi 1.3] */ level?: number; } /** An interface for updating data on the NoteItem object, for use in `noteItem.set({ ... })`. */ interface NoteItemUpdateData { /** * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ body?: Word.Interfaces.BodyUpdateData; /** * Represents a footnote or endnote reference in the main document. * * @remarks * [Api set: WordApi 1.5] */ reference?: Word.Interfaces.RangeUpdateData; } /** An interface for updating data on the NoteItemCollection object, for use in `noteItemCollection.set({ ... })`. */ interface NoteItemCollectionUpdateData { items?: Word.Interfaces.NoteItemData[]; } /** An interface for updating data on the Paragraph object, for use in `paragraph.set({ ... })`. */ interface ParagraphUpdateData { /** * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontUpdateData; /** * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. * * @remarks * [Api set: WordApi 1.3] */ listItem?: Word.Interfaces.ListItemUpdateData; /** * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; /** * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * * @remarks * [Api set: WordApi 1.1] */ alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.1] */ firstLineIndent?: number; /** * Specifies the left indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ leftIndent?: number; /** * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. * * @remarks * [Api set: WordApi 1.1] */ lineSpacing?: number; /** * Specifies the amount of spacing, in grid lines, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitAfter?: number; /** * Specifies the amount of spacing, in grid lines, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitBefore?: number; /** * Specifies the outline level for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ outlineLevel?: number; /** * Specifies the right indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ rightIndent?: number; /** * Specifies the spacing, in points, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceAfter?: number; /** * Specifies the spacing, in points, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceBefore?: number; /** * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; } /** An interface for updating data on the ParagraphCollection object, for use in `paragraphCollection.set({ ... })`. */ interface ParagraphCollectionUpdateData { items?: Word.Interfaces.ParagraphData[]; } /** An interface for updating data on the ParagraphFormat object, for use in `paragraphFormat.set({ ... })`. */ interface ParagraphFormatUpdateData { /** * Specifies the alignment for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.5] */ firstLineIndent?: number; /** * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepTogether?: boolean; /** * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepWithNext?: boolean; /** * Specifies the left indent. * * @remarks * [Api set: WordApi 1.5] */ leftIndent?: number; /** * Specifies the line spacing (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineSpacing?: number; /** * Specifies the amount of spacing (in gridlines) after the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitAfter?: number; /** * Specifies the amount of spacing (in gridlines) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitBefore?: number; /** * Specifies whether left and right indents are the same width. * * @remarks * [Api set: WordApi 1.5] */ mirrorIndents?: boolean; /** * Specifies the outline level for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; /** * Specifies the right indent (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ rightIndent?: number; /** * Specifies the amount of spacing (in points) after the specified paragraph or text column. * * @remarks * [Api set: WordApi 1.5] */ spaceAfter?: number; /** * Specifies the spacing (in points) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ spaceBefore?: number; /** * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ widowControl?: boolean; } /** An interface for updating data on the Range object, for use in `range.set({ ... })`. */ interface RangeUpdateData { /** * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontUpdateData; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.3] */ hyperlink?: string; /** * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; } /** An interface for updating data on the RangeCollection object, for use in `rangeCollection.set({ ... })`. */ interface RangeCollectionUpdateData { items?: Word.Interfaces.RangeData[]; } /** An interface for updating data on the SearchOptions object, for use in `searchOptions.set({ ... })`. */ interface SearchOptionsUpdateData { /** * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignorePunct?: boolean; /** * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignoreSpace?: boolean; /** * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchCase?: boolean; /** * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchPrefix?: boolean; /** * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchSuffix?: boolean; /** * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWholeWord?: boolean; /** * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWildcards?: boolean; } /** An interface for updating data on the Section object, for use in `section.set({ ... })`. */ interface SectionUpdateData { /** * Gets the body object of the section. This doesn't include the header/footer and other section metadata. * * @remarks * [Api set: WordApi 1.1] */ body?: Word.Interfaces.BodyUpdateData; } /** An interface for updating data on the SectionCollection object, for use in `sectionCollection.set({ ... })`. */ interface SectionCollectionUpdateData { items?: Word.Interfaces.SectionData[]; } /** An interface for updating data on the Setting object, for use in `setting.set({ ... })`. */ interface SettingUpdateData { /** * Specifies the value of the setting. * * @remarks * [Api set: WordApi 1.4] */ value?: any; } /** An interface for updating data on the SettingCollection object, for use in `settingCollection.set({ ... })`. */ interface SettingCollectionUpdateData { items?: Word.Interfaces.SettingData[]; } /** An interface for updating data on the StyleCollection object, for use in `styleCollection.set({ ... })`. */ interface StyleCollectionUpdateData { items?: Word.Interfaces.StyleData[]; } /** An interface for updating data on the Style object, for use in `style.set({ ... })`. */ interface StyleUpdateData { /** * Gets a font object that represents the character formatting of the specified style. * * @remarks * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontUpdateData; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * * @remarks * [Api set: WordApi 1.5] */ paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; /** * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. * * @remarks * [Api set: WordApi 1.6] */ shading?: Word.Interfaces.ShadingUpdateData; /** * Gets a TableStyle object representing Style properties that can be applied to a table. * * @remarks * [Api set: WordApi 1.6] */ tableStyle?: Word.Interfaces.TableStyleUpdateData; /** * Specifies the name of an existing style to use as the base formatting of another style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. */ baseStyle?: string; /** * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. */ nextParagraphStyle?: string; /** * Specifies the priority. * * @remarks * [Api set: WordApi 1.5] */ priority?: number; /** * Specifies whether the style corresponds to an available quick style. * * @remarks * [Api set: WordApi 1.5] */ quickStyle?: boolean; /** * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. * * @remarks * [Api set: WordApi 1.5] */ unhideWhenUsed?: boolean; /** * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. * * @remarks * [Api set: WordApi 1.5] */ visibility?: boolean; } /** An interface for updating data on the Shading object, for use in `shading.set({ ... })`. */ interface ShadingUpdateData { /** * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.6] */ backgroundPatternColor?: string; } /** An interface for updating data on the Table object, for use in `table.set({ ... })`. */ interface TableUpdateData { /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontUpdateData; /** * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. * * @remarks * [Api set: WordApi 1.3] */ alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the number of header rows. * * @remarks * [Api set: WordApi 1.3] */ headerRowCount?: number; /** * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: string; /** * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.3] */ style?: string; /** * Specifies whether the table has banded columns. * * @remarks * [Api set: WordApi 1.3] */ styleBandedColumns?: boolean; /** * Specifies whether the table has banded rows. * * @remarks * [Api set: WordApi 1.3] */ styleBandedRows?: boolean; /** * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Specifies whether the table has a first column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleFirstColumn?: boolean; /** * Specifies whether the table has a last column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleLastColumn?: boolean; /** * Specifies whether the table has a total (last) row with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleTotalRow?: boolean; /** * Specifies the text values in the table, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: string[][]; /** * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * Specifies the width of the table in points. * * @remarks * [Api set: WordApi 1.3] */ width?: number; } /** An interface for updating data on the TableStyle object, for use in `tableStyle.set({ ... })`. */ interface TableStyleUpdateData { /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ bottomCellMargin?: number; /** * Specifies the spacing (in points) between the cells in a table style. * * @remarks * [Api set: WordApi 1.6] */ cellSpacing?: number; /** * Specifies the amount of space to add between the contents and the left borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ leftCellMargin?: number; /** * Specifies the amount of space to add between the contents and the right borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ rightCellMargin?: number; /** * Specifies the amount of space to add between the contents and the top borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ topCellMargin?: number; } /** An interface for updating data on the TableCollection object, for use in `tableCollection.set({ ... })`. */ interface TableCollectionUpdateData { items?: Word.Interfaces.TableData[]; } /** An interface for updating data on the TableRow object, for use in `tableRow.set({ ... })`. */ interface TableRowUpdateData { /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontUpdateData; /** * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the preferred height of the row in points. * * @remarks * [Api set: WordApi 1.3] */ preferredHeight?: number; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: string; /** * Specifies the text values in the row, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: string[][]; /** * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; } /** An interface for updating data on the TableRowCollection object, for use in `tableRowCollection.set({ ... })`. */ interface TableRowCollectionUpdateData { items?: Word.Interfaces.TableRowData[]; } /** An interface for updating data on the TableCell object, for use in `tableCell.set({ ... })`. */ interface TableCellUpdateData { /** * Gets the body object of the cell. * * @remarks * [Api set: WordApi 1.3] */ body?: Word.Interfaces.BodyUpdateData; /** * Specifies the width of the cell's column in points. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] */ columnWidth?: number; /** * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: string; /** * Specifies the text of the cell. * * @remarks * [Api set: WordApi 1.3] */ value?: string; /** * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; } /** An interface for updating data on the TableCellCollection object, for use in `tableCellCollection.set({ ... })`. */ interface TableCellCollectionUpdateData { items?: Word.Interfaces.TableCellData[]; } /** An interface for updating data on the TableBorder object, for use in `tableBorder.set({ ... })`. */ interface TableBorderUpdateData { /** * Specifies the table border color. * * @remarks * [Api set: WordApi 1.3] */ color?: string; /** * Specifies the type of the table border. * * @remarks * [Api set: WordApi 1.3] */ type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; /** * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. * * @remarks * [Api set: WordApi 1.3] */ width?: number; } /** An interface for updating data on the TrackedChangeCollection object, for use in `trackedChangeCollection.set({ ... })`. */ interface TrackedChangeCollectionUpdateData { items?: Word.Interfaces.TrackedChangeData[]; } /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ interface CritiqueAnnotationData { /** * Gets the critique that was passed when the annotation was inserted. * * @remarks * [Api set: WordApi 1.7] */ critique?: Word.Critique; } /** An interface describing the data returned by calling `annotation.toJSON()`. */ interface AnnotationData { /** * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. * * @remarks * [Api set: WordApi 1.7] */ id?: string; /** * Gets the state of the annotation. * * @remarks * [Api set: WordApi 1.7] */ state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; } /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ interface AnnotationCollectionData { items?: Word.Interfaces.AnnotationData[]; } /** An interface describing the data returned by calling `body.toJSON()`. */ interface BodyData { /** * Gets the collection of rich text content control objects in the body. * * @remarks * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; /** * Gets the collection of field objects in the body. * * @remarks * [Api set: WordApi 1.4] */ fields?: Word.Interfaces.FieldData[]; /** * Gets the text format of the body. Use this to get and set font name, size, color and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontData; /** * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. * * @remarks * [Api set: WordApi 1.1] */ inlinePictures?: Word.Interfaces.InlinePictureData[]; /** * Gets the collection of list objects in the body. * * @remarks * [Api set: WordApi 1.3] */ lists?: Word.Interfaces.ListData[]; /** * Gets the collection of paragraph objects in the body. * * @remarks * [Api set: WordApi 1.1] * * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. */ paragraphs?: Word.Interfaces.ParagraphData[]; /** * Gets the collection of table objects in the body. * * @remarks * [Api set: WordApi 1.3] */ tables?: Word.Interfaces.TableData[]; /** * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the text of the body. Use the insertText method to insert text. * * @remarks * [Api set: WordApi 1.1] */ text?: string; /** * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. * * @remarks * [Api set: WordApi 1.3] */ type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; } /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ interface CheckboxContentControlData { /** * Specifies the current state of the checkbox. * * @remarks * [Api set: WordApi 1.7] */ isChecked?: boolean; } /** An interface describing the data returned by calling `comment.toJSON()`. */ interface CommentData { /** * Specifies the comment's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeData; /** * Gets the collection of reply objects associated with the comment. * * @remarks * [Api set: WordApi 1.4] */ replies?: Word.Interfaces.CommentReplyData[]; /** * Gets the email of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ authorEmail?: string; /** * Gets the name of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ authorName?: string; /** * Specifies the comment's content as plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: string; /** * Gets the creation date of the comment. * * @remarks * [Api set: WordApi 1.4] */ creationDate?: Date; /** * Gets the ID of the comment. * * @remarks * [Api set: WordApi 1.4] */ id?: string; /** * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. * * @remarks * [Api set: WordApi 1.4] */ resolved?: boolean; } /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ interface CommentCollectionData { items?: Word.Interfaces.CommentData[]; } /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ interface CommentContentRangeData { /** * Specifies a value that indicates whether the comment text is bold. * * @remarks * [Api set: WordApi 1.4] */ bold?: boolean; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. * * @remarks * [Api set: WordApi 1.4] */ hyperlink?: string; /** * Checks whether the range length is zero. * * @remarks * [Api set: WordApi 1.4] */ isEmpty?: boolean; /** * Specifies a value that indicates whether the comment text is italicized. * * @remarks * [Api set: WordApi 1.4] */ italic?: boolean; /** * Specifies a value that indicates whether the comment text has a strikethrough. * * @remarks * [Api set: WordApi 1.4] */ strikeThrough?: boolean; /** * Gets the text of the comment range. * * @remarks * [Api set: WordApi 1.4] */ text?: string; /** * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. * * @remarks * [Api set: WordApi 1.4] */ underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; } /** An interface describing the data returned by calling `commentReply.toJSON()`. */ interface CommentReplyData { /** * Specifies the commentReply's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeData; /** * Gets the parent comment of this reply. * * @remarks * [Api set: WordApi 1.4] */ parentComment?: Word.Interfaces.CommentData; /** * Gets the email of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ authorEmail?: string; /** * Gets the name of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ authorName?: string; /** * Specifies the comment reply's content. The string is plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: string; /** * Gets the creation date of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ creationDate?: Date; /** * Gets the ID of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ id?: string; } /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ interface CommentReplyCollectionData { items?: Word.Interfaces.CommentReplyData[]; } /** An interface describing the data returned by calling `contentControl.toJSON()`. */ interface ContentControlData { /** * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; /** * Gets the collection of content control objects in the content control. * * @remarks * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; /** * Gets the collection of field objects in the content control. * * @remarks * [Api set: WordApi 1.4] */ fields?: Word.Interfaces.FieldData[]; /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontData; /** * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. * * @remarks * [Api set: WordApi 1.1] */ inlinePictures?: Word.Interfaces.InlinePictureData[]; /** * Gets the collection of list objects in the content control. * * @remarks * [Api set: WordApi 1.3] */ lists?: Word.Interfaces.ListData[]; /** * Gets the collection of paragraph objects in the content control. * * @remarks * [Api set: WordApi 1.1] * * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. */ paragraphs?: Word.Interfaces.ParagraphData[]; /** * Gets the collection of table objects in the content control. * * @remarks * [Api set: WordApi 1.3] */ tables?: Word.Interfaces.TableData[]; /** * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. * * @remarks * [Api set: WordApi 1.1] */ appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; /** * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. * * @remarks * [Api set: WordApi 1.1] */ cannotDelete?: boolean; /** * Specifies a value that indicates whether the user can edit the contents of the content control. * * @remarks * [Api set: WordApi 1.1] */ cannotEdit?: boolean; /** * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. * * @remarks * [Api set: WordApi 1.1] */ color?: string; /** * Gets an integer that represents the content control identifier. * * @remarks * [Api set: WordApi 1.1] */ id?: number; /** * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. Note: The set operation for this property isn't supported in Word on the web. * * @remarks * [Api set: WordApi 1.1] */ placeholderText?: string; /** * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. * * @remarks * [Api set: WordApi 1.1] */ removeWhenEdited?: boolean; /** * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. * * @remarks * [Api set: WordApi 1.3] */ subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; /** * Specifies a tag to identify a content control. * * @remarks * [Api set: WordApi 1.1] */ tag?: string; /** * Gets the text of the content control. * * @remarks * [Api set: WordApi 1.1] */ text?: string; /** * Specifies the title for a content control. * * @remarks * [Api set: WordApi 1.1] */ title?: string; /** * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. * * @remarks * [Api set: WordApi 1.1] */ type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; } /** An interface describing the data returned by calling `contentControlCollection.toJSON()`. */ interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ interface CustomPropertyData { /** * Gets the key of the custom property. * * @remarks * [Api set: WordApi 1.3] */ key?: string; /** * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. * * @remarks * [Api set: WordApi 1.3] */ type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; /** * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). * * @remarks * [Api set: WordApi 1.3] */ value?: any; } /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ interface CustomPropertyCollectionData { items?: Word.Interfaces.CustomPropertyData[]; } /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ interface CustomXmlPartData { /** * Gets the ID of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ id?: string; /** * Gets the namespace URI of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ namespaceUri?: string; } /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ interface CustomXmlPartCollectionData { items?: Word.Interfaces.CustomXmlPartData[]; } /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ interface CustomXmlPartScopedCollectionData { items?: Word.Interfaces.CustomXmlPartData[]; } /** An interface describing the data returned by calling `document.toJSON()`. */ interface DocumentData { /** * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApi 1.1] */ body?: Word.Interfaces.BodyData; /** * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. * * @remarks * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; /** * Gets the custom XML parts in the document. * * @remarks * [Api set: WordApi 1.4] */ customXmlParts?: Word.Interfaces.CustomXmlPartData[]; /** * Gets the properties of the document. * * @remarks * [Api set: WordApi 1.3] */ properties?: Word.Interfaces.DocumentPropertiesData; /** * Gets the collection of section objects in the document. * * @remarks * [Api set: WordApi 1.1] */ sections?: Word.Interfaces.SectionData[]; /** * Gets the add-in's settings in the document. * * @remarks * [Api set: WordApi 1.4] */ settings?: Word.Interfaces.SettingData[]; /** * Specifies the ChangeTracking mode. * * @remarks * [Api set: WordApi 1.4] */ changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; /** * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. * * @remarks * [Api set: WordApi 1.1] */ saved?: boolean; } /** An interface describing the data returned by calling `documentCreated.toJSON()`. */ interface DocumentCreatedData { /** * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ body?: Word.Interfaces.BodyData; /** * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ contentControls?: Word.Interfaces.ContentControlData[]; /** * Gets the custom XML parts in the document. * * @remarks * [Api set: WordApiHiddenDocument 1.4] */ customXmlParts?: Word.Interfaces.CustomXmlPartData[]; /** * Gets the properties of the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ properties?: Word.Interfaces.DocumentPropertiesData; /** * Gets the collection of section objects in the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ sections?: Word.Interfaces.SectionData[]; /** * Gets the add-in's settings in the document. * * @remarks * [Api set: WordApiHiddenDocument 1.4] */ settings?: Word.Interfaces.SettingData[]; /** * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ saved?: boolean; } /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ interface DocumentPropertiesData { /** * Gets the collection of custom properties of the document. * * @remarks * [Api set: WordApi 1.3] */ customProperties?: Word.Interfaces.CustomPropertyData[]; /** * Gets the application name of the document. * * @remarks * [Api set: WordApi 1.3] */ applicationName?: string; /** * Specifies the author of the document. * * @remarks * [Api set: WordApi 1.3] */ author?: string; /** * Specifies the category of the document. * * @remarks * [Api set: WordApi 1.3] */ category?: string; /** * Specifies the comments of the document. * * @remarks * [Api set: WordApi 1.3] */ comments?: string; /** * Specifies the company of the document. * * @remarks * [Api set: WordApi 1.3] */ company?: string; /** * Gets the creation date of the document. * * @remarks * [Api set: WordApi 1.3] */ creationDate?: Date; /** * Specifies the format of the document. * * @remarks * [Api set: WordApi 1.3] */ format?: string; /** * Specifies the keywords of the document. * * @remarks * [Api set: WordApi 1.3] */ keywords?: string; /** * Gets the last author of the document. * * @remarks * [Api set: WordApi 1.3] */ lastAuthor?: string; /** * Gets the last print date of the document. * * @remarks * [Api set: WordApi 1.3] */ lastPrintDate?: Date; /** * Gets the last save time of the document. * * @remarks * [Api set: WordApi 1.3] */ lastSaveTime?: Date; /** * Specifies the manager of the document. * * @remarks * [Api set: WordApi 1.3] */ manager?: string; /** * Gets the revision number of the document. * * @remarks * [Api set: WordApi 1.3] */ revisionNumber?: string; /** * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. * * @remarks * [Api set: WordApi 1.3] */ security?: number; /** * Specifies the subject of the document. * * @remarks * [Api set: WordApi 1.3] */ subject?: string; /** * Gets the template of the document. * * @remarks * [Api set: WordApi 1.3] */ template?: string; /** * Specifies the title of the document. * * @remarks * [Api set: WordApi 1.3] */ title?: string; } /** An interface describing the data returned by calling `field.toJSON()`. */ interface FieldData { /** * Gets the field's result data. * * @remarks * [Api set: WordApi 1.4] */ result?: Word.Interfaces.RangeData; /** * Specifies the field's code instruction. * * @remarks * [Api set: WordApi 1.4] * * Note: The ability to set the code was introduced in WordApi 1.5. */ code?: string; /** * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. * * @remarks * [Api set: WordApi 1.5] */ data?: string; /** * Gets the field's kind. * * @remarks * [Api set: WordApi 1.5] */ kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; /** * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. * * @remarks * [Api set: WordApi 1.5] */ locked?: boolean; /** * Gets the field's type. * * @remarks * [Api set: WordApi 1.5] */ type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; } /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ interface FieldCollectionData { items?: Word.Interfaces.FieldData[]; } /** An interface describing the data returned by calling `font.toJSON()`. */ interface FontData { /** * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ bold?: boolean; /** * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.1] */ color?: string; /** * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ doubleStrikeThrough?: boolean; /** * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. * * @remarks * [Api set: WordApi 1.1] */ highlightColor?: string; /** * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ italic?: boolean; /** * Specifies a value that represents the name of the font. * * @remarks * [Api set: WordApi 1.1] */ name?: string; /** * Specifies a value that represents the font size in points. * * @remarks * [Api set: WordApi 1.1] */ size?: number; /** * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ strikeThrough?: boolean; /** * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ subscript?: boolean; /** * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ superscript?: boolean; /** * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. * * @remarks * [Api set: WordApi 1.1] */ underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; } /** An interface describing the data returned by calling `inlinePicture.toJSON()`. */ interface InlinePictureData { /** * Specifies a string that represents the alternative text associated with the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextDescription?: string; /** * Specifies a string that contains the title for the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextTitle?: string; /** * Specifies a number that describes the height of the inline image. * * @remarks * [Api set: WordApi 1.1] */ height?: number; /** * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.1] */ hyperlink?: string; /** * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * * @remarks * [Api set: WordApi 1.1] */ lockAspectRatio?: boolean; /** * Specifies a number that describes the width of the inline image. * * @remarks * [Api set: WordApi 1.1] */ width?: number; } /** An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. */ interface InlinePictureCollectionData { items?: Word.Interfaces.InlinePictureData[]; } /** An interface describing the data returned by calling `list.toJSON()`. */ interface ListData { /** * Gets paragraphs in the list. Read-only. * * @remarks * [Api set: WordApi 1.3] */ paragraphs?: Word.Interfaces.ParagraphData[]; /** * Gets the list's id. * * @remarks * [Api set: WordApi 1.3] */ id?: number; /** * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. * * @remarks * [Api set: WordApi 1.3] */ levelExistences?: boolean[]; /** * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. * * @remarks * [Api set: WordApi 1.3] */ levelTypes?: Word.ListLevelType[]; } /** An interface describing the data returned by calling `listCollection.toJSON()`. */ interface ListCollectionData { items?: Word.Interfaces.ListData[]; } /** An interface describing the data returned by calling `listItem.toJSON()`. */ interface ListItemData { /** * Specifies the level of the item in the list. * * @remarks * [Api set: WordApi 1.3] */ level?: number; /** * Gets the list item bullet, number, or picture as a string. * * @remarks * [Api set: WordApi 1.3] */ listString?: string; /** * Gets the list item order number in relation to its siblings. * * @remarks * [Api set: WordApi 1.3] */ siblingIndex?: number; } /** An interface describing the data returned by calling `noteItem.toJSON()`. */ interface NoteItemData { /** * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ body?: Word.Interfaces.BodyData; /** * Represents a footnote or endnote reference in the main document. * * @remarks * [Api set: WordApi 1.5] */ reference?: Word.Interfaces.RangeData; /** * Represents the note item type: footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ type?: Word.NoteItemType | "Footnote" | "Endnote"; } /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ interface NoteItemCollectionData { items?: Word.Interfaces.NoteItemData[]; } /** An interface describing the data returned by calling `paragraph.toJSON()`. */ interface ParagraphData { /** * Gets the collection of fields in the paragraph. * * @remarks * [Api set: WordApi 1.4] */ fields?: Word.Interfaces.FieldData[]; /** * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontData; /** * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. * * @remarks * [Api set: WordApi 1.1] */ inlinePictures?: Word.Interfaces.InlinePictureData[]; /** * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. * * @remarks * [Api set: WordApi 1.3] */ listItem?: Word.Interfaces.ListItemData; /** * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ listItemOrNullObject?: Word.Interfaces.ListItemData; /** * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * * @remarks * [Api set: WordApi 1.1] */ alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.1] */ firstLineIndent?: number; /** * Indicates the paragraph is the last one inside its parent body. * * @remarks * [Api set: WordApi 1.3] */ isLastParagraph?: boolean; /** * Checks whether the paragraph is a list item. * * @remarks * [Api set: WordApi 1.3] */ isListItem?: boolean; /** * Specifies the left indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ leftIndent?: number; /** * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. * * @remarks * [Api set: WordApi 1.1] */ lineSpacing?: number; /** * Specifies the amount of spacing, in grid lines, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitAfter?: number; /** * Specifies the amount of spacing, in grid lines, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitBefore?: number; /** * Specifies the outline level for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ outlineLevel?: number; /** * Specifies the right indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ rightIndent?: number; /** * Specifies the spacing, in points, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceAfter?: number; /** * Specifies the spacing, in points, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceBefore?: number; /** * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. * * @remarks * [Api set: WordApi 1.3] */ tableNestingLevel?: number; /** * Gets the text of the paragraph. * * @remarks * [Api set: WordApi 1.1] */ text?: string; /** * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. * * @remarks * [Api set: WordApi 1.6] */ uniqueLocalId?: string; } /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ interface ParagraphCollectionData { items?: Word.Interfaces.ParagraphData[]; } /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ interface ParagraphFormatData { /** * Specifies the alignment for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.5] */ firstLineIndent?: number; /** * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepTogether?: boolean; /** * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepWithNext?: boolean; /** * Specifies the left indent. * * @remarks * [Api set: WordApi 1.5] */ leftIndent?: number; /** * Specifies the line spacing (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineSpacing?: number; /** * Specifies the amount of spacing (in gridlines) after the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitAfter?: number; /** * Specifies the amount of spacing (in gridlines) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitBefore?: number; /** * Specifies whether left and right indents are the same width. * * @remarks * [Api set: WordApi 1.5] */ mirrorIndents?: boolean; /** * Specifies the outline level for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; /** * Specifies the right indent (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ rightIndent?: number; /** * Specifies the amount of spacing (in points) after the specified paragraph or text column. * * @remarks * [Api set: WordApi 1.5] */ spaceAfter?: number; /** * Specifies the spacing (in points) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ spaceBefore?: number; /** * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ widowControl?: boolean; } /** An interface describing the data returned by calling `range.toJSON()`. */ interface RangeData { /** * Gets the collection of field objects in the range. * * @remarks * [Api set: WordApi 1.4] */ fields?: Word.Interfaces.FieldData[]; /** * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontData; /** * Gets the collection of inline picture objects in the range. * * @remarks * [Api set: WordApi 1.2] */ inlinePictures?: Word.Interfaces.InlinePictureData[]; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.3] */ hyperlink?: string; /** * Checks whether the range length is zero. * * @remarks * [Api set: WordApi 1.3] */ isEmpty?: boolean; /** * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: string; /** * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Gets the text of the range. * * @remarks * [Api set: WordApi 1.1] */ text?: string; } /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ interface RangeCollectionData { items?: Word.Interfaces.RangeData[]; } /** An interface describing the data returned by calling `searchOptions.toJSON()`. */ interface SearchOptionsData { /** * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignorePunct?: boolean; /** * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignoreSpace?: boolean; /** * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchCase?: boolean; /** * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchPrefix?: boolean; /** * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchSuffix?: boolean; /** * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWholeWord?: boolean; /** * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWildcards?: boolean; } /** An interface describing the data returned by calling `section.toJSON()`. */ interface SectionData { /** * Gets the body object of the section. This doesn't include the header/footer and other section metadata. * * @remarks * [Api set: WordApi 1.1] */ body?: Word.Interfaces.BodyData; } /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ interface SectionCollectionData { items?: Word.Interfaces.SectionData[]; } /** An interface describing the data returned by calling `setting.toJSON()`. */ interface SettingData { /** * Gets the key of the setting. * * @remarks * [Api set: WordApi 1.4] */ key?: string; /** * Specifies the value of the setting. * * @remarks * [Api set: WordApi 1.4] */ value?: any; } /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ interface SettingCollectionData { items?: Word.Interfaces.SettingData[]; } /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ interface StyleCollectionData { items?: Word.Interfaces.StyleData[]; } /** An interface describing the data returned by calling `style.toJSON()`. */ interface StyleData { /** * Gets a font object that represents the character formatting of the specified style. * * @remarks * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontData; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * * @remarks * [Api set: WordApi 1.5] */ paragraphFormat?: Word.Interfaces.ParagraphFormatData; /** * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. * * @remarks * [Api set: WordApi 1.6] */ shading?: Word.Interfaces.ShadingData; /** * Gets a TableStyle object representing Style properties that can be applied to a table. * * @remarks * [Api set: WordApi 1.6] */ tableStyle?: Word.Interfaces.TableStyleData; /** * Specifies the name of an existing style to use as the base formatting of another style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. */ baseStyle?: string; /** * Gets whether the specified style is a built-in style. * * @remarks * [Api set: WordApi 1.5] */ builtIn?: boolean; /** * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. * * @remarks * [Api set: WordApi 1.5] */ inUse?: boolean; /** * Gets whether a style is a linked style that can be used for both paragraph and character formatting. * * @remarks * [Api set: WordApi 1.5] */ linked?: boolean; /** * Gets the name of a style in the language of the user. * * @remarks * [Api set: WordApi 1.5] */ nameLocal?: string; /** * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. */ nextParagraphStyle?: string; /** * Specifies the priority. * * @remarks * [Api set: WordApi 1.5] */ priority?: number; /** * Specifies whether the style corresponds to an available quick style. * * @remarks * [Api set: WordApi 1.5] */ quickStyle?: boolean; /** * Gets the style type. * * @remarks * [Api set: WordApi 1.5] */ type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; /** * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. * * @remarks * [Api set: WordApi 1.5] */ unhideWhenUsed?: boolean; /** * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. * * @remarks * [Api set: WordApi 1.5] */ visibility?: boolean; } /** An interface describing the data returned by calling `shading.toJSON()`. */ interface ShadingData { /** * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.6] */ backgroundPatternColor?: string; } /** An interface describing the data returned by calling `table.toJSON()`. */ interface TableData { /** * Gets the collection of field objects in the table. * * @remarks * [Api set: WordApi 1.4] */ fields?: Word.Interfaces.FieldData[]; /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontData; /** * Gets all of the table rows. * * @remarks * [Api set: WordApi 1.3] */ rows?: Word.Interfaces.TableRowData[]; /** * Gets the child tables nested one level deeper. * * @remarks * [Api set: WordApi 1.3] */ tables?: Word.Interfaces.TableData[]; /** * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. * * @remarks * [Api set: WordApi 1.3] */ alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Specifies the number of header rows. * * @remarks * [Api set: WordApi 1.3] */ headerRowCount?: number; /** * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Indicates whether all of the table rows are uniform. * * @remarks * [Api set: WordApi 1.3] */ isUniform?: boolean; /** * Gets the nesting level of the table. Top-level tables have level 1. * * @remarks * [Api set: WordApi 1.3] */ nestingLevel?: number; /** * Gets the number of rows in the table. * * @remarks * [Api set: WordApi 1.3] */ rowCount?: number; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: string; /** * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.3] */ style?: string; /** * Specifies whether the table has banded columns. * * @remarks * [Api set: WordApi 1.3] */ styleBandedColumns?: boolean; /** * Specifies whether the table has banded rows. * * @remarks * [Api set: WordApi 1.3] */ styleBandedRows?: boolean; /** * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; /** * Specifies whether the table has a first column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleFirstColumn?: boolean; /** * Specifies whether the table has a last column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleLastColumn?: boolean; /** * Specifies whether the table has a total (last) row with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleTotalRow?: boolean; /** * Specifies the text values in the table, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: string[][]; /** * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * Specifies the width of the table in points. * * @remarks * [Api set: WordApi 1.3] */ width?: number; } /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ interface TableStyleData { /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ bottomCellMargin?: number; /** * Specifies the spacing (in points) between the cells in a table style. * * @remarks * [Api set: WordApi 1.6] */ cellSpacing?: number; /** * Specifies the amount of space to add between the contents and the left borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ leftCellMargin?: number; /** * Specifies the amount of space to add between the contents and the right borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ rightCellMargin?: number; /** * Specifies the amount of space to add between the contents and the top borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ topCellMargin?: number; } /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ interface TableCollectionData { items?: Word.Interfaces.TableData[]; } /** An interface describing the data returned by calling `tableRow.toJSON()`. */ interface TableRowData { /** * Gets cells. Read-only. * * @remarks * [Api set: WordApi 1.3] */ cells?: Word.Interfaces.TableCellData[]; /** * Gets the collection of field objects in the table row. * * @remarks * [Api set: WordApi 1.4] */ fields?: Word.Interfaces.FieldData[]; /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontData; /** * Gets the number of cells in the row. * * @remarks * [Api set: WordApi 1.3] */ cellCount?: number; /** * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. * * @remarks * [Api set: WordApi 1.3] */ isHeader?: boolean; /** * Specifies the preferred height of the row in points. * * @remarks * [Api set: WordApi 1.3] */ preferredHeight?: number; /** * Gets the index of the row in its parent table. * * @remarks * [Api set: WordApi 1.3] */ rowIndex?: number; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: string; /** * Specifies the text values in the row, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: string[][]; /** * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; } /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ interface TableRowCollectionData { items?: Word.Interfaces.TableRowData[]; } /** An interface describing the data returned by calling `tableCell.toJSON()`. */ interface TableCellData { /** * Gets the body object of the cell. * * @remarks * [Api set: WordApi 1.3] */ body?: Word.Interfaces.BodyData; /** * Gets the index of the cell in its row. * * @remarks * [Api set: WordApi 1.3] */ cellIndex?: number; /** * Specifies the width of the cell's column in points. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] */ columnWidth?: number; /** * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * Gets the index of the cell's row in the table. * * @remarks * [Api set: WordApi 1.3] */ rowIndex?: number; /** * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: string; /** * Specifies the text of the cell. * * @remarks * [Api set: WordApi 1.3] */ value?: string; /** * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * Gets the width of the cell in points. * * @remarks * [Api set: WordApi 1.3] */ width?: number; } /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ interface TableCellCollectionData { items?: Word.Interfaces.TableCellData[]; } /** An interface describing the data returned by calling `tableBorder.toJSON()`. */ interface TableBorderData { /** * Specifies the table border color. * * @remarks * [Api set: WordApi 1.3] */ color?: string; /** * Specifies the type of the table border. * * @remarks * [Api set: WordApi 1.3] */ type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; /** * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. * * @remarks * [Api set: WordApi 1.3] */ width?: number; } /** An interface describing the data returned by calling `trackedChange.toJSON()`. */ interface TrackedChangeData { /** * Specifies the author of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ author?: string; /** * Specifies the date of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ date?: Date; /** * Specifies the text of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ text?: string; /** * Specifies the type of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; } /** An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. */ interface TrackedChangeCollectionData { items?: Word.Interfaces.TrackedChangeData[]; } /** * Represents an annotation wrapper around critique displayed in the document. * * @remarks * [Api set: WordApi 1.7] */ interface CritiqueAnnotationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the range of text that is annotated. * * @remarks * [Api set: WordApi 1.7] */ range?: Word.Interfaces.RangeLoadOptions; /** * Gets the critique that was passed when the annotation was inserted. * * @remarks * [Api set: WordApi 1.7] */ critique?: boolean; } /** * Represents an annotation attached to a paragraph. * * @remarks * [Api set: WordApi 1.7] */ interface AnnotationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the critique annotation object. * * @remarks * [Api set: WordApi 1.7] */ critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; /** * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. * * @remarks * [Api set: WordApi 1.7] */ id?: boolean; /** * Gets the state of the annotation. * * @remarks * [Api set: WordApi 1.7] */ state?: boolean; } /** * Contains a collection of {@link Word.Annotation} objects. * * @remarks * [Api set: WordApi 1.7] */ interface AnnotationCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the critique annotation object. * * @remarks * [Api set: WordApi 1.7] */ critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; /** * For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. * * @remarks * [Api set: WordApi 1.7] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the state of the annotation. * * @remarks * [Api set: WordApi 1.7] */ state?: boolean; } /** * Represents the body of a document or a section. * * @remarks * [Api set: WordApi 1.1] */ interface BodyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the text format of the body. Use this to get and set font name, size, color and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontLoadOptions; /** * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; /** * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. * * @remarks * [Api set: WordApi 1.3] */ parentSection?: Word.Interfaces.SectionLoadOptions; /** * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; /** * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: boolean; /** * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * Gets the text of the body. Use the insertText method to insert text. * * @remarks * [Api set: WordApi 1.1] */ text?: boolean; /** * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. * * @remarks * [Api set: WordApi 1.3] */ type?: boolean; } /** * The data specific to content controls of type CheckBox. * * @remarks * [Api set: WordApi 1.7] */ interface CheckboxContentControlLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the current state of the checkbox. * * @remarks * [Api set: WordApi 1.7] */ isChecked?: boolean; } /** * Represents a comment in the document. * * @remarks * [Api set: WordApi 1.4] */ interface CommentLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the comment's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; /** * Gets the email of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ authorEmail?: boolean; /** * Gets the name of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ authorName?: boolean; /** * Specifies the comment's content as plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: boolean; /** * Gets the creation date of the comment. * * @remarks * [Api set: WordApi 1.4] */ creationDate?: boolean; /** * Gets the ID of the comment. * * @remarks * [Api set: WordApi 1.4] */ id?: boolean; /** * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. * * @remarks * [Api set: WordApi 1.4] */ resolved?: boolean; } /** * Contains a collection of {@link Word.Comment} objects. * * @remarks * [Api set: WordApi 1.4] */ interface CommentCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the comment's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; /** * For EACH ITEM in the collection: Gets the email of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ authorEmail?: boolean; /** * For EACH ITEM in the collection: Gets the name of the comment's author. * * @remarks * [Api set: WordApi 1.4] */ authorName?: boolean; /** * For EACH ITEM in the collection: Specifies the comment's content as plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: boolean; /** * For EACH ITEM in the collection: Gets the creation date of the comment. * * @remarks * [Api set: WordApi 1.4] */ creationDate?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the comment. * * @remarks * [Api set: WordApi 1.4] */ id?: boolean; /** * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. * * @remarks * [Api set: WordApi 1.4] */ resolved?: boolean; } /** * @remarks * [Api set: WordApi 1.4] */ interface CommentContentRangeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies a value that indicates whether the comment text is bold. * * @remarks * [Api set: WordApi 1.4] */ bold?: boolean; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. * * @remarks * [Api set: WordApi 1.4] */ hyperlink?: boolean; /** * Checks whether the range length is zero. * * @remarks * [Api set: WordApi 1.4] */ isEmpty?: boolean; /** * Specifies a value that indicates whether the comment text is italicized. * * @remarks * [Api set: WordApi 1.4] */ italic?: boolean; /** * Specifies a value that indicates whether the comment text has a strikethrough. * * @remarks * [Api set: WordApi 1.4] */ strikeThrough?: boolean; /** * Gets the text of the comment range. * * @remarks * [Api set: WordApi 1.4] */ text?: boolean; /** * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. * * @remarks * [Api set: WordApi 1.4] */ underline?: boolean; } /** * Represents a comment reply in the document. * * @remarks * [Api set: WordApi 1.4] */ interface CommentReplyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the commentReply's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; /** * Gets the parent comment of this reply. * * @remarks * [Api set: WordApi 1.4] */ parentComment?: Word.Interfaces.CommentLoadOptions; /** * Gets the email of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ authorEmail?: boolean; /** * Gets the name of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ authorName?: boolean; /** * Specifies the comment reply's content. The string is plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: boolean; /** * Gets the creation date of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ creationDate?: boolean; /** * Gets the ID of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ id?: boolean; } /** * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. * * @remarks * [Api set: WordApi 1.4] */ interface CommentReplyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the commentReply's content range. * * @remarks * [Api set: WordApi 1.4] */ contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; /** * For EACH ITEM in the collection: Gets the parent comment of this reply. * * @remarks * [Api set: WordApi 1.4] */ parentComment?: Word.Interfaces.CommentLoadOptions; /** * For EACH ITEM in the collection: Gets the email of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ authorEmail?: boolean; /** * For EACH ITEM in the collection: Gets the name of the comment reply's author. * * @remarks * [Api set: WordApi 1.4] */ authorName?: boolean; /** * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. * * @remarks * [Api set: WordApi 1.4] */ content?: boolean; /** * For EACH ITEM in the collection: Gets the creation date of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ creationDate?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the comment reply. * * @remarks * [Api set: WordApi 1.4] */ id?: boolean; } /** * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. * * @remarks * [Api set: WordApi 1.1] */ interface ContentControlLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontLoadOptions; /** * Gets the parent body of the content control. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. * * @remarks * [Api set: WordApi 1.1] */ appearance?: boolean; /** * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. * * @remarks * [Api set: WordApi 1.1] */ cannotDelete?: boolean; /** * Specifies a value that indicates whether the user can edit the contents of the content control. * * @remarks * [Api set: WordApi 1.1] */ cannotEdit?: boolean; /** * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. * * @remarks * [Api set: WordApi 1.1] */ color?: boolean; /** * Gets an integer that represents the content control identifier. * * @remarks * [Api set: WordApi 1.1] */ id?: boolean; /** * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. Note: The set operation for this property isn't supported in Word on the web. * * @remarks * [Api set: WordApi 1.1] */ placeholderText?: boolean; /** * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. * * @remarks * [Api set: WordApi 1.1] */ removeWhenEdited?: boolean; /** * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: boolean; /** * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. * * @remarks * [Api set: WordApi 1.3] */ subtype?: boolean; /** * Specifies a tag to identify a content control. * * @remarks * [Api set: WordApi 1.1] */ tag?: boolean; /** * Gets the text of the content control. * * @remarks * [Api set: WordApi 1.1] */ text?: boolean; /** * Specifies the title for a content control. * * @remarks * [Api set: WordApi 1.1] */ title?: boolean; /** * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. * * @remarks * [Api set: WordApi 1.1] */ type?: boolean; } /** * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text and plain text content controls are supported. * * @remarks * [Api set: WordApi 1.1] */ interface ContentControlCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontLoadOptions; /** * For EACH ITEM in the collection: Gets the parent body of the content control. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. * * @remarks * [Api set: WordApi 1.1] */ appearance?: boolean; /** * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. * * @remarks * [Api set: WordApi 1.1] */ cannotDelete?: boolean; /** * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. * * @remarks * [Api set: WordApi 1.1] */ cannotEdit?: boolean; /** * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. * * @remarks * [Api set: WordApi 1.1] */ color?: boolean; /** * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. * * @remarks * [Api set: WordApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. Note: The set operation for this property isn't supported in Word on the web. * * @remarks * [Api set: WordApi 1.1] */ placeholderText?: boolean; /** * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. * * @remarks * [Api set: WordApi 1.1] */ removeWhenEdited?: boolean; /** * For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: boolean; /** * For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. * * @remarks * [Api set: WordApi 1.3] */ subtype?: boolean; /** * For EACH ITEM in the collection: Specifies a tag to identify a content control. * * @remarks * [Api set: WordApi 1.1] */ tag?: boolean; /** * For EACH ITEM in the collection: Gets the text of the content control. * * @remarks * [Api set: WordApi 1.1] */ text?: boolean; /** * For EACH ITEM in the collection: Specifies the title for a content control. * * @remarks * [Api set: WordApi 1.1] */ title?: boolean; /** * For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. * * @remarks * [Api set: WordApi 1.1] */ type?: boolean; } /** * Represents a custom property. * * @remarks * [Api set: WordApi 1.3] */ interface CustomPropertyLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the key of the custom property. * * @remarks * [Api set: WordApi 1.3] */ key?: boolean; /** * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. * * @remarks * [Api set: WordApi 1.3] */ type?: boolean; /** * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). * * @remarks * [Api set: WordApi 1.3] */ value?: boolean; } /** * Contains the collection of {@link Word.CustomProperty} objects. * * @remarks * [Api set: WordApi 1.3] */ interface CustomPropertyCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the key of the custom property. * * @remarks * [Api set: WordApi 1.3] */ key?: boolean; /** * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. * * @remarks * [Api set: WordApi 1.3] */ type?: boolean; /** * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). * * @remarks * [Api set: WordApi 1.3] */ value?: boolean; } /** * Represents a custom XML part. * * @remarks * [Api set: WordApi 1.4] */ interface CustomXmlPartLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the ID of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ id?: boolean; /** * Gets the namespace URI of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ namespaceUri?: boolean; } /** * Contains the collection of {@link Word.CustomXmlPart} objects. * * @remarks * [Api set: WordApi 1.4] */ interface CustomXmlPartCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ namespaceUri?: boolean; } /** * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. * * @remarks * [Api set: WordApi 1.4] */ interface CustomXmlPartScopedCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. * * @remarks * [Api set: WordApi 1.4] */ namespaceUri?: boolean; } /** * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * * @remarks * [Api set: WordApi 1.1] */ interface DocumentLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApi 1.1] */ body?: Word.Interfaces.BodyLoadOptions; /** * Gets the properties of the document. * * @remarks * [Api set: WordApi 1.3] */ properties?: Word.Interfaces.DocumentPropertiesLoadOptions; /** * Specifies the ChangeTracking mode. * * @remarks * [Api set: WordApi 1.4] */ changeTrackingMode?: boolean; /** * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. * * @remarks * [Api set: WordApi 1.1] */ saved?: boolean; } /** * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. * * @remarks * [Api set: WordApi 1.3] */ interface DocumentCreatedLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ body?: Word.Interfaces.BodyLoadOptions; /** * Gets the properties of the document. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ properties?: Word.Interfaces.DocumentPropertiesLoadOptions; /** * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. * * @remarks * [Api set: WordApiHiddenDocument 1.3] */ saved?: boolean; } /** * Represents document properties. * * @remarks * [Api set: WordApi 1.3] */ interface DocumentPropertiesLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the application name of the document. * * @remarks * [Api set: WordApi 1.3] */ applicationName?: boolean; /** * Specifies the author of the document. * * @remarks * [Api set: WordApi 1.3] */ author?: boolean; /** * Specifies the category of the document. * * @remarks * [Api set: WordApi 1.3] */ category?: boolean; /** * Specifies the comments of the document. * * @remarks * [Api set: WordApi 1.3] */ comments?: boolean; /** * Specifies the company of the document. * * @remarks * [Api set: WordApi 1.3] */ company?: boolean; /** * Gets the creation date of the document. * * @remarks * [Api set: WordApi 1.3] */ creationDate?: boolean; /** * Specifies the format of the document. * * @remarks * [Api set: WordApi 1.3] */ format?: boolean; /** * Specifies the keywords of the document. * * @remarks * [Api set: WordApi 1.3] */ keywords?: boolean; /** * Gets the last author of the document. * * @remarks * [Api set: WordApi 1.3] */ lastAuthor?: boolean; /** * Gets the last print date of the document. * * @remarks * [Api set: WordApi 1.3] */ lastPrintDate?: boolean; /** * Gets the last save time of the document. * * @remarks * [Api set: WordApi 1.3] */ lastSaveTime?: boolean; /** * Specifies the manager of the document. * * @remarks * [Api set: WordApi 1.3] */ manager?: boolean; /** * Gets the revision number of the document. * * @remarks * [Api set: WordApi 1.3] */ revisionNumber?: boolean; /** * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. * * @remarks * [Api set: WordApi 1.3] */ security?: boolean; /** * Specifies the subject of the document. * * @remarks * [Api set: WordApi 1.3] */ subject?: boolean; /** * Gets the template of the document. * * @remarks * [Api set: WordApi 1.3] */ template?: boolean; /** * Specifies the title of the document. * * @remarks * [Api set: WordApi 1.3] */ title?: boolean; } /** * Represents a field. * * @remarks * [Api set: WordApi 1.4] */ interface FieldLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the parent body of the field. * * @remarks * [Api set: WordApi 1.4] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.4] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.4] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.4] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * Gets the field's result data. * * @remarks * [Api set: WordApi 1.4] */ result?: Word.Interfaces.RangeLoadOptions; /** * Specifies the field's code instruction. * * @remarks * [Api set: WordApi 1.4] * * Note: The ability to set the code was introduced in WordApi 1.5. */ code?: boolean; /** * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. * * @remarks * [Api set: WordApi 1.5] */ data?: boolean; /** * Gets the field's kind. * * @remarks * [Api set: WordApi 1.5] */ kind?: boolean; /** * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. * * @remarks * [Api set: WordApi 1.5] */ locked?: boolean; /** * Gets the field's type. * * @remarks * [Api set: WordApi 1.5] */ type?: boolean; } /** * Contains a collection of {@link Word.Field} objects. * * @remarks * [Api set: WordApi 1.4] */ interface FieldCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the parent body of the field. * * @remarks * [Api set: WordApi 1.4] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.4] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.4] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.4] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.4] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the field's result data. * * @remarks * [Api set: WordApi 1.4] */ result?: Word.Interfaces.RangeLoadOptions; /** * For EACH ITEM in the collection: Specifies the field's code instruction. * * @remarks * [Api set: WordApi 1.4] * * Note: The ability to set the code was introduced in WordApi 1.5. */ code?: boolean; /** * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. * * @remarks * [Api set: WordApi 1.5] */ data?: boolean; /** * For EACH ITEM in the collection: Gets the field's kind. * * @remarks * [Api set: WordApi 1.5] */ kind?: boolean; /** * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. * * @remarks * [Api set: WordApi 1.5] */ locked?: boolean; /** * For EACH ITEM in the collection: Gets the field's type. * * @remarks * [Api set: WordApi 1.5] */ type?: boolean; } /** * Represents a font. * * @remarks * [Api set: WordApi 1.1] */ interface FontLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ bold?: boolean; /** * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.1] */ color?: boolean; /** * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ doubleStrikeThrough?: boolean; /** * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. * * @remarks * [Api set: WordApi 1.1] */ highlightColor?: boolean; /** * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ italic?: boolean; /** * Specifies a value that represents the name of the font. * * @remarks * [Api set: WordApi 1.1] */ name?: boolean; /** * Specifies a value that represents the font size in points. * * @remarks * [Api set: WordApi 1.1] */ size?: boolean; /** * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ strikeThrough?: boolean; /** * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ subscript?: boolean; /** * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. * * @remarks * [Api set: WordApi 1.1] */ superscript?: boolean; /** * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. * * @remarks * [Api set: WordApi 1.1] */ underline?: boolean; } /** * Represents an inline picture. * * @remarks * [Api set: WordApi 1.1] */ interface InlinePictureLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the parent paragraph that contains the inline image. * * @remarks * [Api set: WordApi 1.2] */ paragraph?: Word.Interfaces.ParagraphLoadOptions; /** * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * Specifies a string that represents the alternative text associated with the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextDescription?: boolean; /** * Specifies a string that contains the title for the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextTitle?: boolean; /** * Specifies a number that describes the height of the inline image. * * @remarks * [Api set: WordApi 1.1] */ height?: boolean; /** * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.1] */ hyperlink?: boolean; /** * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * * @remarks * [Api set: WordApi 1.1] */ lockAspectRatio?: boolean; /** * Specifies a number that describes the width of the inline image. * * @remarks * [Api set: WordApi 1.1] */ width?: boolean; } /** * Contains a collection of {@link Word.InlinePicture} objects. * * @remarks * [Api set: WordApi 1.1] */ interface InlinePictureCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. * * @remarks * [Api set: WordApi 1.2] */ paragraph?: Word.Interfaces.ParagraphLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextDescription?: boolean; /** * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. * * @remarks * [Api set: WordApi 1.1] */ altTextTitle?: boolean; /** * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. * * @remarks * [Api set: WordApi 1.1] */ height?: boolean; /** * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.1] */ hyperlink?: boolean; /** * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * * @remarks * [Api set: WordApi 1.1] */ lockAspectRatio?: boolean; /** * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. * * @remarks * [Api set: WordApi 1.1] */ width?: boolean; } /** * Contains a collection of {@link Word.Paragraph} objects. * * @remarks * [Api set: WordApi 1.3] */ interface ListLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the list's id. * * @remarks * [Api set: WordApi 1.3] */ id?: boolean; /** * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. * * @remarks * [Api set: WordApi 1.3] */ levelExistences?: boolean; /** * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. * * @remarks * [Api set: WordApi 1.3] */ levelTypes?: boolean; } /** * Contains a collection of {@link Word.List} objects. * * @remarks * [Api set: WordApi 1.3] */ interface ListCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the list's id. * * @remarks * [Api set: WordApi 1.3] */ id?: boolean; /** * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. * * @remarks * [Api set: WordApi 1.3] */ levelExistences?: boolean; /** * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. * * @remarks * [Api set: WordApi 1.3] */ levelTypes?: boolean; } /** * Represents the paragraph list item format. * * @remarks * [Api set: WordApi 1.3] */ interface ListItemLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the level of the item in the list. * * @remarks * [Api set: WordApi 1.3] */ level?: boolean; /** * Gets the list item bullet, number, or picture as a string. * * @remarks * [Api set: WordApi 1.3] */ listString?: boolean; /** * Gets the list item order number in relation to its siblings. * * @remarks * [Api set: WordApi 1.3] */ siblingIndex?: boolean; } /** * Represents a footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ interface NoteItemLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ body?: Word.Interfaces.BodyLoadOptions; /** * Represents a footnote or endnote reference in the main document. * * @remarks * [Api set: WordApi 1.5] */ reference?: Word.Interfaces.RangeLoadOptions; /** * Represents the note item type: footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ type?: boolean; } /** * Contains a collection of {@link Word.NoteItem} objects. * * @remarks * [Api set: WordApi 1.5] */ interface NoteItemCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ body?: Word.Interfaces.BodyLoadOptions; /** * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. * * @remarks * [Api set: WordApi 1.5] */ reference?: Word.Interfaces.RangeLoadOptions; /** * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. * * @remarks * [Api set: WordApi 1.5] */ type?: boolean; } /** * Represents a single paragraph in a selection, range, content control, or document body. * * @remarks * [Api set: WordApi 1.1] */ interface ParagraphLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontLoadOptions; /** * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. * * @remarks * [Api set: WordApi 1.3] */ list?: Word.Interfaces.ListLoadOptions; /** * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. * * @remarks * [Api set: WordApi 1.3] */ listItem?: Word.Interfaces.ListItemLoadOptions; /** * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; /** * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ listOrNullObject?: Word.Interfaces.ListLoadOptions; /** * Gets the parent body of the paragraph. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * * @remarks * [Api set: WordApi 1.1] */ alignment?: boolean; /** * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.1] */ firstLineIndent?: boolean; /** * Indicates the paragraph is the last one inside its parent body. * * @remarks * [Api set: WordApi 1.3] */ isLastParagraph?: boolean; /** * Checks whether the paragraph is a list item. * * @remarks * [Api set: WordApi 1.3] */ isListItem?: boolean; /** * Specifies the left indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ leftIndent?: boolean; /** * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. * * @remarks * [Api set: WordApi 1.1] */ lineSpacing?: boolean; /** * Specifies the amount of spacing, in grid lines, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitAfter?: boolean; /** * Specifies the amount of spacing, in grid lines, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitBefore?: boolean; /** * Specifies the outline level for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ outlineLevel?: boolean; /** * Specifies the right indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ rightIndent?: boolean; /** * Specifies the spacing, in points, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceAfter?: boolean; /** * Specifies the spacing, in points, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceBefore?: boolean; /** * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: boolean; /** * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. * * @remarks * [Api set: WordApi 1.3] */ tableNestingLevel?: boolean; /** * Gets the text of the paragraph. * * @remarks * [Api set: WordApi 1.1] */ text?: boolean; /** * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. * * @remarks * [Api set: WordApi 1.6] */ uniqueLocalId?: boolean; } /** * Contains a collection of {@link Word.Paragraph} objects. * * @remarks * [Api set: WordApi 1.1] */ interface ParagraphCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontLoadOptions; /** * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. * * @remarks * [Api set: WordApi 1.3] */ list?: Word.Interfaces.ListLoadOptions; /** * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. * * @remarks * [Api set: WordApi 1.3] */ listItem?: Word.Interfaces.ListItemLoadOptions; /** * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; /** * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ listOrNullObject?: Word.Interfaces.ListLoadOptions; /** * For EACH ITEM in the collection: Gets the parent body of the paragraph. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * * @remarks * [Api set: WordApi 1.1] */ alignment?: boolean; /** * For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.1] */ firstLineIndent?: boolean; /** * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. * * @remarks * [Api set: WordApi 1.3] */ isLastParagraph?: boolean; /** * For EACH ITEM in the collection: Checks whether the paragraph is a list item. * * @remarks * [Api set: WordApi 1.3] */ isListItem?: boolean; /** * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ leftIndent?: boolean; /** * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. * * @remarks * [Api set: WordApi 1.1] */ lineSpacing?: boolean; /** * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitAfter?: boolean; /** * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ lineUnitBefore?: boolean; /** * For EACH ITEM in the collection: Specifies the outline level for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ outlineLevel?: boolean; /** * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. * * @remarks * [Api set: WordApi 1.1] */ rightIndent?: boolean; /** * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceAfter?: boolean; /** * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. * * @remarks * [Api set: WordApi 1.1] */ spaceBefore?: boolean; /** * For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: boolean; /** * For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. * * @remarks * [Api set: WordApi 1.3] */ tableNestingLevel?: boolean; /** * For EACH ITEM in the collection: Gets the text of the paragraph. * * @remarks * [Api set: WordApi 1.1] */ text?: boolean; /** * For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. * * @remarks * [Api set: WordApi 1.6] */ uniqueLocalId?: boolean; } /** * Represents a style of paragraph in a document. * * @remarks * [Api set: WordApi 1.5] */ interface ParagraphFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the alignment for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ alignment?: boolean; /** * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * * @remarks * [Api set: WordApi 1.5] */ firstLineIndent?: boolean; /** * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepTogether?: boolean; /** * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ keepWithNext?: boolean; /** * Specifies the left indent. * * @remarks * [Api set: WordApi 1.5] */ leftIndent?: boolean; /** * Specifies the line spacing (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineSpacing?: boolean; /** * Specifies the amount of spacing (in gridlines) after the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitAfter?: boolean; /** * Specifies the amount of spacing (in gridlines) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ lineUnitBefore?: boolean; /** * Specifies whether left and right indents are the same width. * * @remarks * [Api set: WordApi 1.5] */ mirrorIndents?: boolean; /** * Specifies the outline level for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ outlineLevel?: boolean; /** * Specifies the right indent (in points) for the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ rightIndent?: boolean; /** * Specifies the amount of spacing (in points) after the specified paragraph or text column. * * @remarks * [Api set: WordApi 1.5] */ spaceAfter?: boolean; /** * Specifies the spacing (in points) before the specified paragraphs. * * @remarks * [Api set: WordApi 1.5] */ spaceBefore?: boolean; /** * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. * * @remarks * [Api set: WordApi 1.5] */ widowControl?: boolean; } /** * Represents a contiguous area in a document. * * @remarks * [Api set: WordApi 1.1] */ interface RangeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontLoadOptions; /** * Gets the parent body of the range. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.3] */ hyperlink?: boolean; /** * Checks whether the range length is zero. * * @remarks * [Api set: WordApi 1.3] */ isEmpty?: boolean; /** * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: boolean; /** * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * Gets the text of the range. * * @remarks * [Api set: WordApi 1.1] */ text?: boolean; } /** * Contains a collection of {@link Word.Range} objects. * * @remarks * [Api set: WordApi 1.1] */ interface RangeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.1] */ font?: Word.Interfaces.FontLoadOptions; /** * For EACH ITEM in the collection: Gets the parent body of the range. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.1] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. * * @remarks * [Api set: WordApi 1.3] */ hyperlink?: boolean; /** * For EACH ITEM in the collection: Checks whether the range length is zero. * * @remarks * [Api set: WordApi 1.3] */ isEmpty?: boolean; /** * For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.1] */ style?: boolean; /** * For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * For EACH ITEM in the collection: Gets the text of the range. * * @remarks * [Api set: WordApi 1.1] */ text?: boolean; } /** * Specifies the options to be included in a search operation. To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. * * @remarks * [Api set: WordApi 1.1] */ interface SearchOptionsLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignorePunct?: boolean; /** * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ ignoreSpace?: boolean; /** * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchCase?: boolean; /** * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchPrefix?: boolean; /** * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchSuffix?: boolean; /** * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWholeWord?: boolean; /** * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. * * @remarks * [Api set: WordApi 1.1] */ matchWildcards?: boolean; } /** * Represents a section in a Word document. * * @remarks * [Api set: WordApi 1.1] */ interface SectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the body object of the section. This doesn't include the header/footer and other section metadata. * * @remarks * [Api set: WordApi 1.1] */ body?: Word.Interfaces.BodyLoadOptions; } /** * Contains the collection of the document's {@link Word.Section} objects. * * @remarks * [Api set: WordApi 1.1] */ interface SectionCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and other section metadata. * * @remarks * [Api set: WordApi 1.1] */ body?: Word.Interfaces.BodyLoadOptions; } /** * Represents a setting of the add-in. * * @remarks * [Api set: WordApi 1.4] */ interface SettingLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the key of the setting. * * @remarks * [Api set: WordApi 1.4] */ key?: boolean; /** * Specifies the value of the setting. * * @remarks * [Api set: WordApi 1.4] */ value?: boolean; } /** * Contains the collection of {@link Word.Setting} objects. * * @remarks * [Api set: WordApi 1.4] */ interface SettingCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the key of the setting. * * @remarks * [Api set: WordApi 1.4] */ key?: boolean; /** * For EACH ITEM in the collection: Specifies the value of the setting. * * @remarks * [Api set: WordApi 1.4] */ value?: boolean; } /** * Contains a collection of {@link Word.Style} objects. * * @remarks * [Api set: WordApi 1.5] */ interface StyleCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. * * @remarks * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontLoadOptions; /** * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * * @remarks * [Api set: WordApi 1.5] */ paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; /** * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. * * @remarks * [Api set: WordApi 1.6] */ shading?: Word.Interfaces.ShadingLoadOptions; /** * For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a table. * * @remarks * [Api set: WordApi 1.6] */ tableStyle?: Word.Interfaces.TableStyleLoadOptions; /** * For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. */ baseStyle?: boolean; /** * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. * * @remarks * [Api set: WordApi 1.5] */ builtIn?: boolean; /** * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. * * @remarks * [Api set: WordApi 1.5] */ inUse?: boolean; /** * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. * * @remarks * [Api set: WordApi 1.5] */ linked?: boolean; /** * For EACH ITEM in the collection: Gets the name of a style in the language of the user. * * @remarks * [Api set: WordApi 1.5] */ nameLocal?: boolean; /** * For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. */ nextParagraphStyle?: boolean; /** * For EACH ITEM in the collection: Specifies the priority. * * @remarks * [Api set: WordApi 1.5] */ priority?: boolean; /** * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. * * @remarks * [Api set: WordApi 1.5] */ quickStyle?: boolean; /** * For EACH ITEM in the collection: Gets the style type. * * @remarks * [Api set: WordApi 1.5] */ type?: boolean; /** * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. * * @remarks * [Api set: WordApi 1.5] */ unhideWhenUsed?: boolean; /** * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. * * @remarks * [Api set: WordApi 1.5] */ visibility?: boolean; } /** * Represents a style in a Word document. * * @remarks * [Api set: WordApi 1.3] */ interface StyleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets a font object that represents the character formatting of the specified style. * * @remarks * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontLoadOptions; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * * @remarks * [Api set: WordApi 1.5] */ paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; /** * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. * * @remarks * [Api set: WordApi 1.6] */ shading?: Word.Interfaces.ShadingLoadOptions; /** * Gets a TableStyle object representing Style properties that can be applied to a table. * * @remarks * [Api set: WordApi 1.6] */ tableStyle?: Word.Interfaces.TableStyleLoadOptions; /** * Specifies the name of an existing style to use as the base formatting of another style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. */ baseStyle?: boolean; /** * Gets whether the specified style is a built-in style. * * @remarks * [Api set: WordApi 1.5] */ builtIn?: boolean; /** * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. * * @remarks * [Api set: WordApi 1.5] */ inUse?: boolean; /** * Gets whether a style is a linked style that can be used for both paragraph and character formatting. * * @remarks * [Api set: WordApi 1.5] */ linked?: boolean; /** * Gets the name of a style in the language of the user. * * @remarks * [Api set: WordApi 1.5] */ nameLocal?: boolean; /** * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. * * @remarks * [Api set: WordApi 1.5] * * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. */ nextParagraphStyle?: boolean; /** * Specifies the priority. * * @remarks * [Api set: WordApi 1.5] */ priority?: boolean; /** * Specifies whether the style corresponds to an available quick style. * * @remarks * [Api set: WordApi 1.5] */ quickStyle?: boolean; /** * Gets the style type. * * @remarks * [Api set: WordApi 1.5] */ type?: boolean; /** * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. * * @remarks * [Api set: WordApi 1.5] */ unhideWhenUsed?: boolean; /** * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. * * @remarks * [Api set: WordApi 1.5] */ visibility?: boolean; } /** * Represents the shading object. * * @remarks * [Api set: WordApi 1.6] */ interface ShadingLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. * * @remarks * [Api set: WordApi 1.6] */ backgroundPatternColor?: boolean; } /** * Represents a table in a Word document. * * @remarks * [Api set: WordApi 1.3] */ interface TableLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontLoadOptions; /** * Gets the parent body of the table. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.3] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. * * @remarks * [Api set: WordApi 1.3] */ alignment?: boolean; /** * Specifies the number of header rows. * * @remarks * [Api set: WordApi 1.3] */ headerRowCount?: boolean; /** * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: boolean; /** * Indicates whether all of the table rows are uniform. * * @remarks * [Api set: WordApi 1.3] */ isUniform?: boolean; /** * Gets the nesting level of the table. Top-level tables have level 1. * * @remarks * [Api set: WordApi 1.3] */ nestingLevel?: boolean; /** * Gets the number of rows in the table. * * @remarks * [Api set: WordApi 1.3] */ rowCount?: boolean; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: boolean; /** * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.3] */ style?: boolean; /** * Specifies whether the table has banded columns. * * @remarks * [Api set: WordApi 1.3] */ styleBandedColumns?: boolean; /** * Specifies whether the table has banded rows. * * @remarks * [Api set: WordApi 1.3] */ styleBandedRows?: boolean; /** * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * Specifies whether the table has a first column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleFirstColumn?: boolean; /** * Specifies whether the table has a last column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleLastColumn?: boolean; /** * Specifies whether the table has a total (last) row with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleTotalRow?: boolean; /** * Specifies the text values in the table, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: boolean; /** * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: boolean; /** * Specifies the width of the table in points. * * @remarks * [Api set: WordApi 1.3] */ width?: boolean; } /** * Represents the TableStyle object. * * @remarks * [Api set: WordApi 1.6] */ interface TableStyleLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ bottomCellMargin?: boolean; /** * Specifies the spacing (in points) between the cells in a table style. * * @remarks * [Api set: WordApi 1.6] */ cellSpacing?: boolean; /** * Specifies the amount of space to add between the contents and the left borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ leftCellMargin?: boolean; /** * Specifies the amount of space to add between the contents and the right borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ rightCellMargin?: boolean; /** * Specifies the amount of space to add between the contents and the top borders of the cells. * * @remarks * [Api set: WordApi 1.6] */ topCellMargin?: boolean; } /** * Contains the collection of the document's Table objects. * * @remarks * [Api set: WordApi 1.3] */ interface TableCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontLoadOptions; /** * For EACH ITEM in the collection: Gets the parent body of the table. * * @remarks * [Api set: WordApi 1.3] */ parentBody?: Word.Interfaces.BodyLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. * * @remarks * [Api set: WordApi 1.3] */ parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. * * @remarks * [Api set: WordApi 1.3] */ parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] */ parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. * * @remarks * [Api set: WordApi 1.3] */ alignment?: boolean; /** * For EACH ITEM in the collection: Specifies the number of header rows. * * @remarks * [Api set: WordApi 1.3] */ headerRowCount?: boolean; /** * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: boolean; /** * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. * * @remarks * [Api set: WordApi 1.3] */ isUniform?: boolean; /** * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. * * @remarks * [Api set: WordApi 1.3] */ nestingLevel?: boolean; /** * For EACH ITEM in the collection: Gets the number of rows in the table. * * @remarks * [Api set: WordApi 1.3] */ rowCount?: boolean; /** * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: boolean; /** * For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * @remarks * [Api set: WordApi 1.3] */ style?: boolean; /** * For EACH ITEM in the collection: Specifies whether the table has banded columns. * * @remarks * [Api set: WordApi 1.3] */ styleBandedColumns?: boolean; /** * For EACH ITEM in the collection: Specifies whether the table has banded rows. * * @remarks * [Api set: WordApi 1.3] */ styleBandedRows?: boolean; /** * For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * @remarks * [Api set: WordApi 1.3] */ styleBuiltIn?: boolean; /** * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleFirstColumn?: boolean; /** * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleLastColumn?: boolean; /** * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. * * @remarks * [Api set: WordApi 1.3] */ styleTotalRow?: boolean; /** * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: boolean; /** * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: boolean; /** * For EACH ITEM in the collection: Specifies the width of the table in points. * * @remarks * [Api set: WordApi 1.3] */ width?: boolean; } /** * Represents a row in a Word document. * * @remarks * [Api set: WordApi 1.3] */ interface TableRowLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontLoadOptions; /** * Gets parent table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the number of cells in the row. * * @remarks * [Api set: WordApi 1.3] */ cellCount?: boolean; /** * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: boolean; /** * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. * * @remarks * [Api set: WordApi 1.3] */ isHeader?: boolean; /** * Specifies the preferred height of the row in points. * * @remarks * [Api set: WordApi 1.3] */ preferredHeight?: boolean; /** * Gets the index of the row in its parent table. * * @remarks * [Api set: WordApi 1.3] */ rowIndex?: boolean; /** * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: boolean; /** * Specifies the text values in the row, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: boolean; /** * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: boolean; } /** * Contains the collection of the document's TableRow objects. * * @remarks * [Api set: WordApi 1.3] */ interface TableRowCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. * * @remarks * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontLoadOptions; /** * For EACH ITEM in the collection: Gets parent table. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the number of cells in the row. * * @remarks * [Api set: WordApi 1.3] */ cellCount?: boolean; /** * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: boolean; /** * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. * * @remarks * [Api set: WordApi 1.3] */ isHeader?: boolean; /** * For EACH ITEM in the collection: Specifies the preferred height of the row in points. * * @remarks * [Api set: WordApi 1.3] */ preferredHeight?: boolean; /** * For EACH ITEM in the collection: Gets the index of the row in its parent table. * * @remarks * [Api set: WordApi 1.3] */ rowIndex?: boolean; /** * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: boolean; /** * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. * * @remarks * [Api set: WordApi 1.3] */ values?: boolean; /** * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: boolean; } /** * Represents a table cell in a Word document. * * @remarks * [Api set: WordApi 1.3] */ interface TableCellLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the body object of the cell. * * @remarks * [Api set: WordApi 1.3] */ body?: Word.Interfaces.BodyLoadOptions; /** * Gets the parent row of the cell. * * @remarks * [Api set: WordApi 1.3] */ parentRow?: Word.Interfaces.TableRowLoadOptions; /** * Gets the parent table of the cell. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * Gets the index of the cell in its row. * * @remarks * [Api set: WordApi 1.3] */ cellIndex?: boolean; /** * Specifies the width of the cell's column in points. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] */ columnWidth?: boolean; /** * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: boolean; /** * Gets the index of the cell's row in the table. * * @remarks * [Api set: WordApi 1.3] */ rowIndex?: boolean; /** * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: boolean; /** * Specifies the text of the cell. * * @remarks * [Api set: WordApi 1.3] */ value?: boolean; /** * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: boolean; /** * Gets the width of the cell in points. * * @remarks * [Api set: WordApi 1.3] */ width?: boolean; } /** * Contains the collection of the document's TableCell objects. * * @remarks * [Api set: WordApi 1.3] */ interface TableCellCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the body object of the cell. * * @remarks * [Api set: WordApi 1.3] */ body?: Word.Interfaces.BodyLoadOptions; /** * For EACH ITEM in the collection: Gets the parent row of the cell. * * @remarks * [Api set: WordApi 1.3] */ parentRow?: Word.Interfaces.TableRowLoadOptions; /** * For EACH ITEM in the collection: Gets the parent table of the cell. * * @remarks * [Api set: WordApi 1.3] */ parentTable?: Word.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the index of the cell in its row. * * @remarks * [Api set: WordApi 1.3] */ cellIndex?: boolean; /** * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. * * @remarks * [Api set: WordApi 1.3] */ columnWidth?: boolean; /** * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. * * @remarks * [Api set: WordApi 1.3] */ horizontalAlignment?: boolean; /** * For EACH ITEM in the collection: Gets the index of the cell's row in the table. * * @remarks * [Api set: WordApi 1.3] */ rowIndex?: boolean; /** * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * * @remarks * [Api set: WordApi 1.3] */ shadingColor?: boolean; /** * For EACH ITEM in the collection: Specifies the text of the cell. * * @remarks * [Api set: WordApi 1.3] */ value?: boolean; /** * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. * * @remarks * [Api set: WordApi 1.3] */ verticalAlignment?: boolean; /** * For EACH ITEM in the collection: Gets the width of the cell in points. * * @remarks * [Api set: WordApi 1.3] */ width?: boolean; } /** * Specifies the border style. * * @remarks * [Api set: WordApi 1.3] */ interface TableBorderLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the table border color. * * @remarks * [Api set: WordApi 1.3] */ color?: boolean; /** * Specifies the type of the table border. * * @remarks * [Api set: WordApi 1.3] */ type?: boolean; /** * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. * * @remarks * [Api set: WordApi 1.3] */ width?: boolean; } /** * Represents a tracked change in a Word document. * * @remarks * [Api set: WordApi 1.6] */ interface TrackedChangeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies the author of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ author?: boolean; /** * Specifies the date of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ date?: boolean; /** * Specifies the text of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ text?: boolean; /** * Specifies the type of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ type?: boolean; } /** * Contains a collection of {@link Word.TrackedChange} objects. * * @remarks * [Api set: WordApi 1.6] */ interface TrackedChangeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Specifies the author of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ author?: boolean; /** * For EACH ITEM in the collection: Specifies the date of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ date?: boolean; /** * For EACH ITEM in the collection: Specifies the text of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ text?: boolean; /** * For EACH ITEM in the collection: Specifies the type of the tracked change. * * @remarks * [Api set: WordApi 1.6] */ type?: boolean; } } } declare namespace Word { /** * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. */ class RequestContext extends OfficeCore.RequestContext { constructor(url?: string); readonly document: Document; readonly application: Application; } /** * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. */ function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. */ function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. */ function run(batch: (context: Word.RequestContext) => Promise): Promise; } //////////////////////////////////////////////////////////////// //////////////////////// End Word APIs ///////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// ////////////////////// Begin OneNote APIs ////////////////////// //////////////////////////////////////////////////////////////// declare namespace OneNote { /** * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. * * @remarks * [Api set: OneNoteApi 1.1] */ class Application extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of notebooks that are open in the OneNote application instance. In OneNote Online, only one notebook at a time is open in the application instance. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly notebooks: OneNote.NotebookCollection; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.Application): void; /** * Gets the active notebook if one exists. If no notebook is active, throws ItemNotFound. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveNotebook(): OneNote.Notebook; /** * Gets the active notebook if one exists. If no notebook is active, returns null. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveNotebookOrNull(): OneNote.Notebook; /** * Gets the active outline if one exists, If no outline is active, throws ItemNotFound. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveOutline(): OneNote.Outline; /** * Gets the active outline if one exists, otherwise returns null. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveOutlineOrNull(): OneNote.Outline; /** * Gets the active page if one exists. If no page is active, throws ItemNotFound. * * @remarks * [Api set: OneNoteApi 1.1] */ getActivePage(): OneNote.Page; /** * Gets the active page if one exists. If no page is active, returns null. * * @remarks * [Api set: OneNoteApi 1.1] */ getActivePageOrNull(): OneNote.Page; /** * Gets the active Paragraph if one exists, If no Paragraph is active, throws ItemNotFound. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveParagraph(): OneNote.Paragraph; /** * Gets the active Paragraph if one exists, otherwise returns null. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveParagraphOrNull(): OneNote.Paragraph; /** * Gets the active section if one exists. If no section is active, throws ItemNotFound. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveSection(): OneNote.Section; /** * Gets the active section if one exists. If no section is active, returns null. * * @remarks * [Api set: OneNoteApi 1.1] */ getActiveSectionOrNull(): OneNote.Section; /** * Gets the currently selected ink strokes. * * @remarks * [Api set: OneNoteApi 1.9] */ getSelectedInkStrokes(): OneNote.InkStrokeCollection; getWindowSize(): OfficeExtension.ClientResult; insertHtmlAtCurrentPosition(html: string): void; isViewingDeletedNotes(): OfficeExtension.ClientResult; /** * Opens the specified page in the application instance. * * @remarks * [Api set: OneNoteApi 1.1] * * @param page The page to open. */ navigateToPage(page: OneNote.Page): void; /** * Gets the specified page, and opens it in the application instance. Navigation may still not be carried out when no fails. Caller should validate the returned page if so desired. * * @remarks * [Api set: OneNoteApi 1.1] * * @param url The client url of the page to open. */ navigateToPageWithClientUrl(url: string): OneNote.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.ApplicationLoadOptions): OneNote.Application; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Application; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Application; /** * 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 OneNote.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.ApplicationData; } /** * Represents ink analysis data for a given set of ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkAnalysis extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the parent page object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly page: OneNote.Page; /** * Gets the ID of the InkAnalysis object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.InkAnalysisUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.InkAnalysis): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkAnalysisLoadOptions): OneNote.InkAnalysis; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkAnalysis; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.InkAnalysis; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkAnalysis; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkAnalysis; /** * 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 OneNote.InkAnalysis object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.InkAnalysisData; } /** * Represents ink analysis data for an identified paragraph formed by ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkAnalysisParagraph extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Reference to the parent InkAnalysisPage. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly inkAnalysis: OneNote.InkAnalysis; /** * Gets the ink analysis lines in this ink analysis paragraph. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly lines: OneNote.InkAnalysisLineCollection; /** * Gets the ID of the InkAnalysisParagraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.InkAnalysisParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.InkAnalysisParagraph): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions): OneNote.InkAnalysisParagraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkAnalysisParagraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.InkAnalysisParagraph; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkAnalysisParagraph; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkAnalysisParagraph; /** * 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 OneNote.InkAnalysisParagraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisParagraphData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.InkAnalysisParagraphData; } /** * Represents a collection of InkAnalysisParagraph objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkAnalysisParagraphCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkAnalysisParagraph[]; /** * Returns the number of InkAnalysisParagraphs in the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a InkAnalysisParagraph object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the InkAnalysisParagraph object, or the index location of the InkAnalysisParagraph object in the collection. */ getItem(index: number | string): OneNote.InkAnalysisParagraph; /** * Gets a InkAnalysisParagraph on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.InkAnalysisParagraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkAnalysisParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisParagraphCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkAnalysisParagraphCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkAnalysisParagraphCollection; /** * 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 `OneNote.InkAnalysisParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.InkAnalysisParagraphCollectionData; } /** * Represents ink analysis data for an identified text line formed by ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkAnalysisLine extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Reference to the parent InkAnalysisParagraph. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraph: OneNote.InkAnalysisParagraph; /** * Gets the ink analysis words in this ink analysis line. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly words: OneNote.InkAnalysisWordCollection; /** * Gets the ID of the InkAnalysisLine object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.InkAnalysisLineUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.InkAnalysisLine): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkAnalysisLineLoadOptions): OneNote.InkAnalysisLine; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkAnalysisLine; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.InkAnalysisLine; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkAnalysisLine; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkAnalysisLine; /** * 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 OneNote.InkAnalysisLine object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisLineData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.InkAnalysisLineData; } /** * Represents a collection of InkAnalysisLine objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkAnalysisLineCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkAnalysisLine[]; /** * Returns the number of InkAnalysisLines in the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a InkAnalysisLine object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the InkAnalysisLine object, or the index location of the InkAnalysisLine object in the collection. */ getItem(index: number | string): OneNote.InkAnalysisLine; /** * Gets a InkAnalysisLine on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.InkAnalysisLine; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisLineCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkAnalysisLineCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisLineCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkAnalysisLineCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkAnalysisLineCollection; /** * 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 `OneNote.InkAnalysisLineCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisLineCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.InkAnalysisLineCollectionData; } /** * Represents ink analysis data for an identified word formed by ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkAnalysisWord extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Reference to the parent InkAnalysisLine. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly line: OneNote.InkAnalysisLine; /** * Gets the ID of the InkAnalysisWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * The id of the recognized language in this inkAnalysisWord. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly languageId: string; /** * Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly strokePointers: OneNote.InkStrokePointer[]; /** * The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly wordAlternates: string[]; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.InkAnalysisWordUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.InkAnalysisWord): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkAnalysisWordLoadOptions): OneNote.InkAnalysisWord; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkAnalysisWord; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.InkAnalysisWord; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkAnalysisWord; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkAnalysisWord; /** * 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 OneNote.InkAnalysisWord object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisWordData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.InkAnalysisWordData; } /** * Represents a collection of InkAnalysisWord objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkAnalysisWordCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkAnalysisWord[]; /** * Returns the number of InkAnalysisWords in the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a InkAnalysisWord object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the InkAnalysisWord object, or the index location of the InkAnalysisWord object in the collection. */ getItem(index: number | string): OneNote.InkAnalysisWord; /** * Gets a InkAnalysisWord on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.InkAnalysisWord; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisWordCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkAnalysisWordCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisWordCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkAnalysisWordCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkAnalysisWordCollection; /** * 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 `OneNote.InkAnalysisWordCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisWordCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.InkAnalysisWordCollectionData; } /** * Represents a group of ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ class FloatingInk extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the strokes of the FloatingInk object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly inkStrokes: OneNote.InkStrokeCollection; /** * Gets the PageContent parent of the FloatingInk object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly pageContent: OneNote.PageContent; /** * Gets the ID of the FloatingInk object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.FloatingInkLoadOptions): OneNote.FloatingInk; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.FloatingInk; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.FloatingInk; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.FloatingInk; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.FloatingInk; /** * 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 OneNote.FloatingInk object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.FloatingInkData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.FloatingInkData; } /** * Represents a single stroke of ink. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkStroke extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the ID of the InkStroke object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly floatingInk: OneNote.FloatingInk; /** * Gets the ID of the InkStroke object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkStrokeLoadOptions): OneNote.InkStroke; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkStroke; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.InkStroke; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkStroke; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkStroke; /** * 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 OneNote.InkStroke object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkStrokeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.InkStrokeData; } /** * Represents a collection of InkStroke objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkStrokeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkStroke[]; /** * Returns the number of InkStrokes in the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a InkStroke object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the InkStroke object, or the index location of the InkStroke object in the collection. */ getItem(index: number | string): OneNote.InkStroke; /** * Gets a InkStroke on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.InkStroke; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkStrokeCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkStrokeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkStrokeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkStrokeCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkStrokeCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkStrokeCollection; /** * 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 `OneNote.InkStrokeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkStrokeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.InkStrokeCollectionData; } /** * Represents a single point of ink stroke * * @remarks * [Api set: OneNoteApi 1.9] */ class Point extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the ID of the Point object. Read-only. * * @remarks * [Api set: OneNoteApi 1.9] */ readonly id: string; readonly x: number; readonly y: number; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.PointLoadOptions): OneNote.Point; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Point; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Point; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Point; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Point; /** * 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 OneNote.Point object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PointData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.PointData; } /** * Represents a collection of Point objects. * * @remarks * [Api set: OneNoteApi 1.9] */ class PointCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Point[]; /** * Returns the number of Point in the stroke. Read-only. * * @remarks * [Api set: OneNoteApi 1.9] */ readonly count: number; /** * Gets a Point object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.9] * * @param index The ID of the Point object, or the index location of the Point object in the collection. */ getItem(index: number | string): OneNote.Point; /** * Gets a Point on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.9] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.Point; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.PointCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PointCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.PointCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PointCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.PointCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.PointCollection; /** * 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 `OneNote.PointCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PointCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.PointCollectionData; } /** * A container for the ink in a word in a paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkWord extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The parent paragraph containing the ink word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraph: OneNote.Paragraph; /** * Gets the ID of the InkWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * The id of the recognized language in this ink word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly languageId: string; /** * The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly wordAlternates: string[]; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkWordLoadOptions): OneNote.InkWord; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkWord; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.InkWord; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkWord; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkWord; /** * 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 OneNote.InkWord object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkWordData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.InkWordData; } /** * Represents a collection of InkWord objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class InkWordCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkWord[]; /** * Returns the number of InkWords in the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a InkWord object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the InkWord object, or the index location of the InkWord object in the collection. */ getItem(index: number | string): OneNote.InkWord; /** * Gets a InkWord on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.InkWord; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.InkWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkWordCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.InkWordCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkWordCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.InkWordCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.InkWordCollection; /** * 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 `OneNote.InkWordCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkWordCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.InkWordCollectionData; } /** * Represents a OneNote notebook. Notebooks contain section groups and sections. * * @remarks * [Api set: OneNoteApi 1.1] */ class Notebook extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The section groups in the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly sectionGroups: OneNote.SectionGroupCollection; /** * The sections of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly sections: OneNote.SectionCollection; /** * The url of the site where this notebook is located. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly baseUrl: string; /** * The client url of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly clientUrl: string; /** * Gets the ID of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * True if the notebook is not created by the user (i.e., 'Misplaced Sections'). Read only * * @remarks * [Api set: OneNoteApi 1.2] */ readonly isVirtual: boolean; /** * Gets the name of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly name: string; /** * Adds a new section to the end of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] * * @param name The name of the new section. */ addSection(name: string): OneNote.Section; /** * Adds a new section group to the end of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] * * @param name The name of the new section. */ addSectionGroup(name: string): OneNote.SectionGroup; /** * Gets the REST API ID. * * @remarks * [Api set: OneNoteApi 1.1] */ getRestApiId(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.NotebookLoadOptions): OneNote.Notebook; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Notebook; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Notebook; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Notebook; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Notebook; /** * 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 OneNote.Notebook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NotebookData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.NotebookData; } /** * Represents a collection of notebooks. * * @remarks * [Api set: OneNoteApi 1.1] */ class NotebookCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Notebook[]; /** * Returns the number of notebooks in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets the collection of notebooks with the specified name that are open in the application instance. * * @remarks * [Api set: OneNoteApi 1.1] * * @param name The name of the notebook. */ getByName(name: string): OneNote.NotebookCollection; /** * Gets a notebook by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the notebook, or the index location of the notebook in the collection. */ getItem(index: number | string): OneNote.Notebook; /** * Gets a notebook on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.Notebook; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.NotebookCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.NotebookCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.NotebookCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.NotebookCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.NotebookCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.NotebookCollection; /** * 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 `OneNote.NotebookCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NotebookCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.NotebookCollectionData; } /** * Represents a OneNote section group. Section groups can contain sections and other section groups. * * @remarks * [Api set: OneNoteApi 1.1] */ class SectionGroup extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the notebook that contains the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly notebook: OneNote.Notebook; /** * Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentSectionGroup: OneNote.SectionGroup; /** * Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentSectionGroupOrNull: OneNote.SectionGroup; /** * The collection of section groups in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly sectionGroups: OneNote.SectionGroupCollection; /** * The collection of sections in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly sections: OneNote.SectionCollection; /** * The client url of the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly clientUrl: string; /** * Gets the ID of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets the name of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly name: string; /** * Adds a new section to the end of the section group. * * @remarks * [Api set: OneNoteApi 1.1] * * @param title The name of the new section. */ addSection(title: string): OneNote.Section; /** * Adds a new section group to the end of this sectionGroup. * * @remarks * [Api set: OneNoteApi 1.1] * * @param name The name of the new section. */ addSectionGroup(name: string): OneNote.SectionGroup; /** * Gets the REST API ID. * * @remarks * [Api set: OneNoteApi 1.1] */ getRestApiId(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.SectionGroupLoadOptions): OneNote.SectionGroup; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.SectionGroup; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.SectionGroup; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.SectionGroup; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.SectionGroup; /** * 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 OneNote.SectionGroup object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionGroupData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.SectionGroupData; } /** * Represents a collection of section groups. * * @remarks * [Api set: OneNoteApi 1.1] */ class SectionGroupCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.SectionGroup[]; /** * Returns the number of section groups in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets the collection of section groups with the specified name. * * @remarks * [Api set: OneNoteApi 1.1] * * @param name The name of the section group. */ getByName(name: string): OneNote.SectionGroupCollection; /** * Gets a section group by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the section group, or the index location of the section group in the collection. */ getItem(index: number | string): OneNote.SectionGroup; /** * Gets a section group on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.SectionGroup; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.SectionGroupCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionGroupCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.SectionGroupCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.SectionGroupCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.SectionGroupCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.SectionGroupCollection; /** * 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 `OneNote.SectionGroupCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionGroupCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.SectionGroupCollectionData; } /** * Represents a OneNote section. Sections can contain pages. * * @remarks * [Api set: OneNoteApi 1.1] */ class Section extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the notebook that contains the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly notebook: OneNote.Notebook; /** * The collection of pages in the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly pages: OneNote.PageCollection; /** * Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentSectionGroup: OneNote.SectionGroup; /** * Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentSectionGroupOrNull: OneNote.SectionGroup; /** * The client url of the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly clientUrl: string; /** * Gets the ID of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * True if this section is encrypted with a password. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ readonly isEncrypted: boolean; /** * True if this section is locked. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ readonly isLocked: boolean; /** * Gets the name of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly name: string; /** * The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly webUrl: string; /** * Adds a new page to the end of the section. * * @remarks * [Api set: OneNoteApi 1.1] * * @param title The title of the new page. */ addPage(title: string): OneNote.Page; /** * Copies this section to specified notebook. * * @remarks * [Api set: OneNoteApi 1.1] * * @param destinationNotebook The notebook to copy this section to. */ copyToNotebook(destinationNotebook: OneNote.Notebook): OneNote.Section; /** * Copies this section to specified section group. * * @remarks * [Api set: OneNoteApi 1.1] * * @param destinationSectionGroup The section group to copy this section to. */ copyToSectionGroup(destinationSectionGroup: OneNote.SectionGroup): OneNote.Section; /** * Gets the REST API ID. * * @remarks * [Api set: OneNoteApi 1.1] */ getRestApiId(): OfficeExtension.ClientResult; /** * Inserts a new section before or after the current section. * * @remarks * [Api set: OneNoteApi 1.1] * * @param location The location of the new section relative to the current section. * @param title The name of the new section. */ insertSectionAsSibling(location: OneNote.InsertLocation, title: string): OneNote.Section; /** * Inserts a new section before or after the current section. * * @remarks * [Api set: OneNoteApi 1.1] * * @param location The location of the new section relative to the current section. * @param title The name of the new section. */ insertSectionAsSibling(location: "Before" | "After", title: string): OneNote.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.SectionLoadOptions): OneNote.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Section; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Section; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Section; /** * 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 OneNote.Section object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.SectionData; } /** * Represents a collection of sections. * * @remarks * [Api set: OneNoteApi 1.1] */ class SectionCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Section[]; /** * Returns the number of sections in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets the collection of sections with the specified name. * * @remarks * [Api set: OneNoteApi 1.1] * * @param name The name of the section. */ getByName(name: string): OneNote.SectionCollection; /** * Gets a section by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the section, or the index location of the section in the collection. */ getItem(index: number | string): OneNote.Section; /** * Gets a section on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.Section; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.SectionCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.SectionCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.SectionCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.SectionCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.SectionCollection; /** * 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 `OneNote.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.SectionCollectionData; } /** * Represents a OneNote page. * * @remarks * [Api set: OneNoteApi 1.1] */ class Page extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * The collection of PageContent objects on the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly contents: OneNote.PageContentCollection; /** * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly inkAnalysisOrNull: OneNote.InkAnalysis; /** * Gets the section that contains the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentSection: OneNote.Section; /** * Gets the ClassNotebookPageSource to the page. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly classNotebookPageSource: string; /** * The client url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly clientUrl: string; /** * Gets the ID of the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets or sets the indentation level of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ pageLevel: number; /** * Gets or sets the title of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ title: string; /** * The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly webUrl: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PageUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.Page): void; /** * Adds an Outline to the page at the specified position. * * @remarks * [Api set: OneNoteApi 1.1] * * @param left The left position of the top, left corner of the Outline. * @param top The top position of the top, left corner of the Outline. * @param html An HTML string that describes the visual presentation of the Outline. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ addOutline(left: number, top: number, html: string): OneNote.Outline; /** * Return a json string with node id and content in html format. * * @remarks * [Api set: OneNoteApi 1.1] */ analyzePage(): OfficeExtension.ClientResult; /** * Inserts a new page with translated content. * * @remarks * [Api set: OneNoteApi 1.1] * * @param translatedContent Translated content of the page */ applyTranslation(translatedContent: string): void; /** * Copies this page to specified section. * * @remarks * [Api set: OneNoteApi 1.1] * * @param destinationSection The section to copy this page to. */ copyToSection(destinationSection: OneNote.Section): OneNote.Page; /** * Copies this page to specified section and sets ClassNotebookPageSource. * * @remarks * [Api set: OneNoteApi 1.1] */ copyToSectionAndSetClassNotebookPageSource(destinationSection: OneNote.Section): OneNote.Page; /** * Gets the REST API ID. * * @remarks * [Api set: OneNoteApi 1.1] */ getRestApiId(): OfficeExtension.ClientResult; /** * Does the page has content title. * * @remarks * [Api set: OneNoteApi 1.1] */ hasTitleContent(): OfficeExtension.ClientResult; /** * Inserts a new page before or after the current page. * * @remarks * [Api set: OneNoteApi 1.1] * * @param location The location of the new page relative to the current page. * @param title The title of the new page. */ insertPageAsSibling(location: OneNote.InsertLocation, title: string): OneNote.Page; /** * Inserts a new page before or after the current page. * * @remarks * [Api set: OneNoteApi 1.1] * * @param location The location of the new page relative to the current page. * @param title The title of the new page. */ insertPageAsSibling(location: "Before" | "After", title: string): OneNote.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.PageLoadOptions): OneNote.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Page; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Page; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Page; /** * 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 OneNote.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.PageData; } /** * Represents a collection of pages. * * @remarks * [Api set: OneNoteApi 1.1] */ class PageCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Page[]; /** * Returns the number of pages in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets the collection of pages with the specified title. * * @remarks * [Api set: OneNoteApi 1.1] * * @param title The title of the page. */ getByTitle(title: string): OneNote.PageCollection; /** * Gets a page by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the page, or the index location of the page in the collection. */ getItem(index: number | string): OneNote.Page; /** * Gets a page on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.PageCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.PageCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PageCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.PageCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.PageCollection; /** * 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 `OneNote.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.PageCollectionData; } /** * Represents a region on a page that contains top-level content types such as Outline or Image. A PageContent object can be assigned an XY position. * * @remarks * [Api set: OneNoteApi 1.1] */ class PageContent extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly image: OneNote.Image; /** * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly ink: OneNote.FloatingInk; /** * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly outline: OneNote.Outline; /** * Gets the page that contains the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentPage: OneNote.Page; /** * Gets the ID of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets or sets the left (X-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ left: number; /** * Gets or sets the top (Y-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ top: number; /** * Gets the type of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly type: OneNote.PageContentType | "Outline" | "Image" | "Ink" | "Other"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PageContentUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.PageContent): void; /** * Deletes the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ delete(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.PageContentLoadOptions): OneNote.PageContent; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.PageContent; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.PageContent; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.PageContent; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.PageContent; /** * 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 OneNote.PageContent object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageContentData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.PageContentData; } /** * Represents the contents of a page, as a collection of PageContent objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class PageContentCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.PageContent[]; /** * Returns the number of page contents in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a PageContent object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the PageContent object, or the index location of the PageContent object in the collection. */ getItem(index: number | string): OneNote.PageContent; /** * Gets a page content on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.PageContent; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.PageContentCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageContentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.PageContentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PageContentCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.PageContentCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.PageContentCollection; /** * 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 `OneNote.PageContentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageContentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.PageContentCollectionData; } /** * Represents a container for Paragraph objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class Outline extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly pageContent: OneNote.PageContent; /** * Gets the collection of Paragraph objects in the Outline. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraphs: OneNote.ParagraphCollection; /** * Gets the ID of the Outline object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Adds the specified HTML to the bottom of the Outline. * * @remarks * [Api set: OneNoteApi 1.1] * * @param html The HTML string to append. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ appendHtml(html: string): void; /** * Adds the specified image to the bottom of the Outline. * * @remarks * [Api set: OneNoteApi 1.1] * * @param base64EncodedImage HTML string to append. * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. */ appendImage(base64EncodedImage: string, width: number, height: number): OneNote.Image; /** * Adds the specified text to the bottom of the Outline. * * @remarks * [Api set: OneNoteApi 1.1] * * @param paragraphText HTML string to append. */ appendRichText(paragraphText: string): OneNote.RichText; /** * Adds a table with the specified number of rows and columns to the bottom of the outline. * * @remarks * [Api set: OneNoteApi 1.1] * * @param rowCount Required. The number of rows in the table. * @param columnCount Required. The number of columns in the table. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ appendTable(rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; /** * Check if the outline is title outline. * * @remarks * [Api set: OneNoteApi 1.1] */ isTitle(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.OutlineLoadOptions): OneNote.Outline; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Outline; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Outline; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Outline; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Outline; /** * 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 OneNote.Outline object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.OutlineData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.OutlineData; } /** * A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content. * * @remarks * [Api set: OneNoteApi 1.1] */ class Paragraph extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly image: OneNote.Image; /** * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly inkWords: OneNote.InkWordCollection; /** * Gets the Outline object that contains the Paragraph. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly outline: OneNote.Outline; /** * The collection of paragraphs under this paragraph. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraphs: OneNote.ParagraphCollection; /** * Gets the parent paragraph object. Throws if a parent paragraph does not exist. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentParagraph: OneNote.Paragraph; /** * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentParagraphOrNull: OneNote.Paragraph; /** * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentTableCell: OneNote.TableCell; /** * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentTableCellOrNull: OneNote.TableCell; /** * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only * * @remarks * [Api set: OneNoteApi 1.1] */ readonly richText: OneNote.RichText; /** * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly table: OneNote.Table; /** * Gets the ID of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets the type of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly type: OneNote.ParagraphType | "RichText" | "Image" | "Table" | "Ink" | "Other"; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.Paragraph): void; /** * Add NoteTag to the paragraph. * * @remarks * [Api set: OneNoteApi 1.1] * * @param type The type of the NoteTag. * @param status The status of the NoteTag. */ addNoteTag(type: OneNote.NoteTagType, status: OneNote.NoteTagStatus): OneNote.NoteTag; /** * Add NoteTag to the paragraph. * * @remarks * [Api set: OneNoteApi 1.1] * * @param type The type of the NoteTag. * @param status The status of the NoteTag. */ addNoteTag(type: "Unknown" | "ToDo" | "Important" | "Question" | "Contact" | "Address" | "PhoneNumber" | "Website" | "Idea" | "Critical" | "ToDoPriority1" | "ToDoPriority2", status: "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"): OneNote.NoteTag; /** * Deletes the paragraph * * @remarks * [Api set: OneNoteApi 1.1] */ delete(): void; /** * Get list information of paragraph * * @remarks * [Api set: OneNoteApi 1.1] */ getParagraphInfo(): OfficeExtension.ClientResult; /** * Inserts the specified HTML content * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of new contents relative to the current Paragraph. * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ insertHtmlAsSibling(insertLocation: OneNote.InsertLocation, html: string): void; /** * Inserts the specified HTML content * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of new contents relative to the current Paragraph. * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ insertHtmlAsSibling(insertLocation: "Before" | "After", html: string): void; /** * Inserts the image at the specified insert location.. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of the table relative to the current Paragraph. * @param base64EncodedImage HTML string to append. * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. */ insertImageAsSibling(insertLocation: OneNote.InsertLocation, base64EncodedImage: string, width: number, height: number): OneNote.Image; /** * Inserts the image at the specified insert location.. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of the table relative to the current Paragraph. * @param base64EncodedImage HTML string to append. * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. */ insertImageAsSibling(insertLocation: "Before" | "After", base64EncodedImage: string, width: number, height: number): OneNote.Image; /** * Inserts the paragraph text at the specifiec insert location. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of the table relative to the current Paragraph. * @param paragraphText HTML string to append. */ insertRichTextAsSibling(insertLocation: OneNote.InsertLocation, paragraphText: string): OneNote.RichText; /** * Inserts the paragraph text at the specifiec insert location. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of the table relative to the current Paragraph. * @param paragraphText HTML string to append. */ insertRichTextAsSibling(insertLocation: "Before" | "After", paragraphText: string): OneNote.RichText; /** * Adds a table with the specified number of rows and columns before or after the current paragraph. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of the table relative to the current Paragraph. * @param rowCount The number of rows in the table. * @param columnCount The number of columns in the table. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTableAsSibling(insertLocation: OneNote.InsertLocation, rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; /** * Adds a table with the specified number of rows and columns before or after the current paragraph. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of the table relative to the current Paragraph. * @param rowCount The number of rows in the table. * @param columnCount The number of columns in the table. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTableAsSibling(insertLocation: "Before" | "After", rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.ParagraphLoadOptions): OneNote.Paragraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Paragraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Paragraph; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Paragraph; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Paragraph; /** * 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 OneNote.Paragraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.ParagraphData; } /** * Represents a collection of Paragraph objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class ParagraphCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Paragraph[]; /** * Returns the number of paragraphs in the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a Paragraph object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index The ID of the Paragraph object, or the index location of the Paragraph object in the collection. */ getItem(index: number | string): OneNote.Paragraph; /** * Gets a paragraph on its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.Paragraph; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.ParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.ParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.ParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.ParagraphCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.ParagraphCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.ParagraphCollection; /** * 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 `OneNote.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.ParagraphCollectionData; } /** * A container for the NoteTag in a paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ class NoteTag extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the Id of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets the status of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly status: OneNote.NoteTagStatus | "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"; /** * Gets the type of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly type: OneNote.NoteTagType | "Unknown" | "ToDo" | "Important" | "Question" | "Contact" | "Address" | "PhoneNumber" | "Website" | "Idea" | "Critical" | "ToDoPriority1" | "ToDoPriority2"; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.NoteTagLoadOptions): OneNote.NoteTag; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.NoteTag; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.NoteTag; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.NoteTag; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.NoteTag; /** * 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 OneNote.NoteTag object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NoteTagData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.NoteTagData; } /** * Represents a RichText object in a Paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ class RichText extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the Paragraph object that contains the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraph: OneNote.Paragraph; /** * Gets the ID of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * The language id of the text. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly languageId: string; /** * Gets the text style of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.8] */ readonly style: OneNote.ParagraphStyle; /** * Gets the text content of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly text: string; /** * Get the HTML of the rich text * * @remarks * [Api set: OneNoteApi 1.1] * @returns The html of the rich text */ getHtml(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.RichTextLoadOptions): OneNote.RichText; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.RichText; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.RichText; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.RichText; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.RichText; /** * 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 OneNote.RichText object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.RichTextData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.RichTextData; } /** * Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object. * * @remarks * [Api set: OneNoteApi 1.1] */ class Image extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the PageContent object that contains the Image. Throws if the Image is not a direct child of a PageContent. This object defines the position of the Image on the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly pageContent: OneNote.PageContent; /** * Gets the Paragraph object that contains the Image. Throws if the Image is not a direct child of a Paragraph. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraph: OneNote.Paragraph; /** * Gets or sets the description of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ description: string; /** * Gets or sets the height of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ height: number; /** * Gets or sets the hyperlink of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ hyperlink: string; /** * Gets the ID of the Image object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets the data obtained by OCR (Optical Character Recognition) of this Image, such as OCR text and language. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly ocrData: OneNote.ImageOcrData; /** * Gets or sets the width of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ImageUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.Image): void; /** * Gets the base64-encoded binary representation of the Image. Example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA... * * @remarks * [Api set: OneNoteApi 1.1] */ getBase64Image(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.ImageLoadOptions): OneNote.Image; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Image; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Image; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Image; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Image; /** * 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 OneNote.Image object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ImageData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.ImageData; } /** * Represents a table in a OneNote page. * * @remarks * [Api set: OneNoteApi 1.1] */ class Table extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the Paragraph object that contains the Table object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraph: OneNote.Paragraph; /** * Gets all of the table rows. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly rows: OneNote.TableRowCollection; /** * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. * * @remarks * [Api set: OneNoteApi 1.1] */ borderVisible: boolean; /** * Gets the number of columns in the table. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly columnCount: number; /** * Gets the ID of the table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets the number of rows in the table. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly rowCount: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.Table): void; /** * Adds a column to the end of the table. Values, if specified, are set in the new column. Otherwise the column is empty. * * @remarks * [Api set: OneNoteApi 1.1] * * @param values Optional. Strings to insert in the new column, specified as an array. Must not have more values than rows in the table. */ appendColumn(values?: string[]): void; /** * Adds a row to the end of the table. Values, if specified, are set in the new row. Otherwise the row is empty. * * @remarks * [Api set: OneNoteApi 1.1] * * @param values Optional. Strings to insert in the new row, specified as an array. Must not have more values than columns in the table. */ appendRow(values?: string[]): OneNote.TableRow; /** * Clears the contents of the table. * * @remarks * [Api set: OneNoteApi 1.1] */ clear(): void; /** * Gets the table cell at a specified row and column. * * @remarks * [Api set: OneNoteApi 1.1] * * @param rowIndex The index of the row. * @param cellIndex The index of the cell in the row. */ getCell(rowIndex: number, cellIndex: number): OneNote.TableCell; /** * Inserts a column at the given index in the table. Values, if specified, are set in the new column. Otherwise the column is empty. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index where the column will be inserted in the table. * @param values Optional. Strings to insert in the new column, specified as an array. Must not have more values than rows in the table. */ insertColumn(index: number, values?: string[]): void; /** * Inserts a row at the given index in the table. Values, if specified, are set in the new row. Otherwise the row is empty. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index where the row will be inserted in the table. * @param values Optional. Strings to insert in the new row, specified as an array. Must not have more values than columns in the table. */ insertRow(index: number, values?: string[]): OneNote.TableRow; /** * Sets the shading color of all cells in the table. The color code to set the cells to. * * @remarks * [Api set: OneNoteApi 1.1] */ setShadingColor(colorCode: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.TableLoadOptions): OneNote.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.Table; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.Table; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.Table; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.Table; /** * 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 OneNote.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.TableData; } /** * Represents a row in a table. * * @remarks * [Api set: OneNoteApi 1.1] */ class TableRow extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the cells in the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly cells: OneNote.TableCellCollection; /** * Gets the parent table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentTable: OneNote.Table; /** * Gets the number of cells in the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly cellCount: number; /** * Gets the ID of the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets the index of the row in its parent table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly rowIndex: number; /** * Clears the contents of the row. * * @remarks * [Api set: OneNoteApi 1.1] */ clear(): void; /** * Inserts a row before or after the current row. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation Where the new rows should be inserted relative to the current row. * @param values Strings to insert in the new row, specified as an array. Must not have more cells than in the current row. Optional. */ insertRowAsSibling(insertLocation: OneNote.InsertLocation, values?: string[]): OneNote.TableRow; /** * Inserts a row before or after the current row. * * @remarks * [Api set: OneNoteApi 1.1] * * @param insertLocation Where the new rows should be inserted relative to the current row. * @param values Strings to insert in the new row, specified as an array. Must not have more cells than in the current row. Optional. */ insertRowAsSibling(insertLocation: "Before" | "After", values?: string[]): OneNote.TableRow; /** * Sets the shading color of all cells in the row. The color code to set the cells to. * * @remarks * [Api set: OneNoteApi 1.1] */ setShadingColor(colorCode: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.TableRowLoadOptions): OneNote.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.TableRow; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.TableRow; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.TableRow; /** * 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 OneNote.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.TableRowData; } /** * Contains a collection of TableRow objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class TableRowCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.TableRow[]; /** * Returns the number of table rows in this collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a table row object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index A number that identifies the index location of a table row object. */ getItem(index: number | string): OneNote.TableRow; /** * Gets a table row at its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.TableRow; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.TableRowCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableRowCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.TableRowCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.TableRowCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.TableRowCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.TableRowCollection; /** * 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 `OneNote.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.TableRowCollectionData; } /** * Represents a cell in a OneNote table. * * @remarks * [Api set: OneNoteApi 1.1] */ class TableCell extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of Paragraph objects in the TableCell. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly paragraphs: OneNote.ParagraphCollection; /** * Gets the parent row of the cell. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly parentRow: OneNote.TableRow; /** * Gets the index of the cell in its row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly cellIndex: number; /** * Gets the ID of the cell. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly id: string; /** * Gets the index of the cell's row in the table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly rowIndex: number; /** * Gets and sets the shading color of the cell * * @remarks * [Api set: OneNoteApi 1.1] */ shadingColor: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: OneNote.TableCell): void; /** * Adds the specified HTML to the bottom of the TableCell. * * @remarks * [Api set: OneNoteApi 1.1] * * @param html The HTML string to append. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ appendHtml(html: string): void; /** * Adds the specified image to table cell. * * @remarks * [Api set: OneNoteApi 1.1] * * @param base64EncodedImage HTML string to append. * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. */ appendImage(base64EncodedImage: string, width: number, height: number): OneNote.Image; /** * Adds the specified text to table cell. * * @remarks * [Api set: OneNoteApi 1.1] * * @param paragraphText HTML string to append. */ appendRichText(paragraphText: string): OneNote.RichText; /** * Adds a table with the specified number of rows and columns to table cell. * * @remarks * [Api set: OneNoteApi 1.1] * * @param rowCount Required. The number of rows in the table. * @param columnCount Required. The number of columns in the table. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ appendTable(rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; /** * Clears the contents of the cell. * * @remarks * [Api set: OneNoteApi 1.1] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.TableCellLoadOptions): OneNote.TableCell; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.TableCell; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): OneNote.TableCell; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.TableCell; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.TableCell; /** * 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 OneNote.TableCell object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): OneNote.Interfaces.TableCellData; } /** * Contains a collection of TableCell objects. * * @remarks * [Api set: OneNoteApi 1.1] */ class TableCellCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.TableCell[]; /** * Returns the number of tablecells in this collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ readonly count: number; /** * Gets a table cell object by ID or by its index in the collection. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index A number that identifies the index location of a table cell object. */ getItem(index: number | string): OneNote.TableCell; /** * Gets a tablecell at its position in the collection. * * @remarks * [Api set: OneNoteApi 1.1] * * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): OneNote.TableCell; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: OneNote.Interfaces.TableCellCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableCellCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): OneNote.TableCellCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.TableCellCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for `context.trackedObjects.add(thisObject)`. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ track(): OneNote.TableCellCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for `context.trackedObjects.remove(thisObject)`. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. */ untrack(): OneNote.TableCellCollection; /** * 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 `OneNote.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): OneNote.Interfaces.TableCellCollectionData; } /** * Represents data obtained by OCR (optical character recognition) of an image. * * @remarks * [Api set: OneNoteApi 1.1] */ interface ImageOcrData { /** * Represents the OCR language, with values such as EN-US * * @remarks * [Api set: OneNoteApi 1.1] */ ocrLanguageId: string; /** * Represents the text obtained by OCR of the image * * @remarks * [Api set: OneNoteApi 1.1] */ ocrText: string; } /** * Weak reference to an ink stroke object and its content parent. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkStrokePointer { /** * Represents the id of the page content object corresponding to this stroke * * @remarks * [Api set: OneNoteApi 1.1] */ contentId: string; /** * Represents the id of the ink stroke * * @remarks * [Api set: OneNoteApi 1.1] */ inkStrokeId: string; } /** * List information for paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ interface ParagraphInfo { /** * // Bullet list type of paragraph * * @remarks * [Api set: OneNoteApi 1.1] */ bulletType: string; /** * // Level of indentation of the paragraph * * @remarks * [Api set: OneNoteApi 1.8] */ indentationLevel: number; /** * // Index of paragraph in a list * * @remarks * [Api set: OneNoteApi 1.1] */ index: number; /** * // Type of list in paragraph * * @remarks * [Api set: OneNoteApi 1.1] */ listType: OneNote.ListType | "None" | "Number" | "Bullet"; /** * // Numbered list type of paragraph * * @remarks * [Api set: OneNoteApi 1.1] */ numberType: OneNote.NumberType | "None" | "Arabic" | "UCRoman" | "LCRoman" | "UCLetter" | "LCLetter" | "Ordinal" | "Cardtext" | "Ordtext" | "Hex" | "ChiManSty" | "DbNum1" | "DbNum2" | "Aiueo" | "Iroha" | "DbChar" | "SbChar" | "DbNum3" | "DbNum4" | "Circlenum" | "DArabic" | "DAiueo" | "DIroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GB1" | "GB2" | "GB3" | "GB4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TpeDbNum1" | "TpeDbNum2" | "TpeDbNum3" | "TpeDbNum4" | "ChnDbNum1" | "ChnDbNum2" | "ChnDbNum3" | "ChnDbNum4" | "KorDbNum1" | "KorDbNum2" | "KorDbNum3" | "KorDbNum4" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "Hindi1" | "Hindi2" | "Hindi3" | "Thai1" | "Thai2" | "NumInDash" | "LCRus" | "UCRus" | "LCGreek" | "UCGreek" | "Lim" | "Custom"; } /** * @remarks * [Api set: OneNoteApi 1.1] */ enum InsertLocation { /** * @remarks * [Api set: OneNoteApi 1.1] */ before = "Before", /** * @remarks * [Api set: OneNoteApi 1.1] */ after = "After", } /** * @remarks * [Api set: OneNoteApi 1.1] */ enum PageContentType { /** * @remarks * [Api set: OneNoteApi 1.1] */ outline = "Outline", /** * @remarks * [Api set: OneNoteApi 1.1] */ image = "Image", /** * @remarks * [Api set: OneNoteApi 1.1] */ ink = "Ink", /** * @remarks * [Api set: OneNoteApi 1.1] */ other = "Other", } /** * @remarks * [Api set: OneNoteApi 1.1] */ enum ParagraphType { /** * @remarks * [Api set: OneNoteApi 1.1] */ richText = "RichText", /** * @remarks * [Api set: OneNoteApi 1.1] */ image = "Image", /** * @remarks * [Api set: OneNoteApi 1.1] */ table = "Table", /** * @remarks * [Api set: OneNoteApi 1.1] */ ink = "Ink", /** * @remarks * [Api set: OneNoteApi 1.1] */ other = "Other", } /** * @remarks * [Api set: OneNoteApi 1.1] */ enum NoteTagType { /** * @remarks * [Api set: OneNoteApi 1.1] */ unknown = "Unknown", /** * @remarks * [Api set: OneNoteApi 1.1] */ toDo = "ToDo", /** * @remarks * [Api set: OneNoteApi 1.1] */ important = "Important", /** * @remarks * [Api set: OneNoteApi 1.1] */ question = "Question", /** * @remarks * [Api set: OneNoteApi 1.1] */ contact = "Contact", /** * @remarks * [Api set: OneNoteApi 1.1] */ address = "Address", /** * @remarks * [Api set: OneNoteApi 1.1] */ phoneNumber = "PhoneNumber", /** * @remarks * [Api set: OneNoteApi 1.1] */ website = "Website", /** * @remarks * [Api set: OneNoteApi 1.1] */ idea = "Idea", /** * @remarks * [Api set: OneNoteApi 1.1] */ critical = "Critical", /** * @remarks * [Api set: OneNoteApi 1.1] */ toDoPriority1 = "ToDoPriority1", /** * @remarks * [Api set: OneNoteApi 1.1] */ toDoPriority2 = "ToDoPriority2", } /** * @remarks * [Api set: OneNoteApi 1.1] */ enum NoteTagStatus { /** * @remarks * [Api set: OneNoteApi 1.1] */ unknown = "Unknown", /** * @remarks * [Api set: OneNoteApi 1.1] */ normal = "Normal", /** * @remarks * [Api set: OneNoteApi 1.1] */ completed = "Completed", /** * @remarks * [Api set: OneNoteApi 1.1] */ disabled = "Disabled", /** * @remarks * [Api set: OneNoteApi 1.1] */ outlookTask = "OutlookTask", /** * @remarks * [Api set: OneNoteApi 1.1] */ taskNotSyncedYet = "TaskNotSyncedYet", /** * @remarks * [Api set: OneNoteApi 1.1] */ taskRemoved = "TaskRemoved", } /** * @remarks * [Api set: OneNoteApi 1.1] */ enum ListType { /** * @remarks * [Api set: OneNoteApi 1.1] */ none = "None", /** * @remarks * [Api set: OneNoteApi 1.1] */ number = "Number", /** * @remarks * [Api set: OneNoteApi 1.1] */ bullet = "Bullet", } /** * @remarks * [Api set: OneNoteApi 1.1] */ enum NumberType { /** * @remarks * [Api set: OneNoteApi 1.1] */ none = "None", /** * @remarks * [Api set: OneNoteApi 1.1] */ arabic = "Arabic", /** * @remarks * [Api set: OneNoteApi 1.1] */ ucroman = "UCRoman", /** * @remarks * [Api set: OneNoteApi 1.1] */ lcroman = "LCRoman", /** * @remarks * [Api set: OneNoteApi 1.1] */ ucletter = "UCLetter", /** * @remarks * [Api set: OneNoteApi 1.1] */ lcletter = "LCLetter", /** * @remarks * [Api set: OneNoteApi 1.1] */ ordinal = "Ordinal", /** * @remarks * [Api set: OneNoteApi 1.1] */ cardtext = "Cardtext", /** * @remarks * [Api set: OneNoteApi 1.1] */ ordtext = "Ordtext", /** * @remarks * [Api set: OneNoteApi 1.1] */ hex = "Hex", /** * @remarks * [Api set: OneNoteApi 1.1] */ chiManSty = "ChiManSty", /** * @remarks * [Api set: OneNoteApi 1.1] */ dbNum1 = "DbNum1", /** * @remarks * [Api set: OneNoteApi 1.1] */ dbNum2 = "DbNum2", /** * @remarks * [Api set: OneNoteApi 1.1] */ aiueo = "Aiueo", /** * @remarks * [Api set: OneNoteApi 1.1] */ iroha = "Iroha", /** * @remarks * [Api set: OneNoteApi 1.1] */ dbChar = "DbChar", /** * @remarks * [Api set: OneNoteApi 1.1] */ sbChar = "SbChar", /** * @remarks * [Api set: OneNoteApi 1.1] */ dbNum3 = "DbNum3", /** * @remarks * [Api set: OneNoteApi 1.1] */ dbNum4 = "DbNum4", /** * @remarks * [Api set: OneNoteApi 1.1] */ circlenum = "Circlenum", /** * @remarks * [Api set: OneNoteApi 1.1] */ darabic = "DArabic", /** * @remarks * [Api set: OneNoteApi 1.1] */ daiueo = "DAiueo", /** * @remarks * [Api set: OneNoteApi 1.1] */ diroha = "DIroha", /** * @remarks * [Api set: OneNoteApi 1.1] */ arabicLZ = "ArabicLZ", /** * @remarks * [Api set: OneNoteApi 1.1] */ bullet = "Bullet", /** * @remarks * [Api set: OneNoteApi 1.1] */ ganada = "Ganada", /** * @remarks * [Api set: OneNoteApi 1.1] */ chosung = "Chosung", /** * @remarks * [Api set: OneNoteApi 1.1] */ gb1 = "GB1", /** * @remarks * [Api set: OneNoteApi 1.1] */ gb2 = "GB2", /** * @remarks * [Api set: OneNoteApi 1.1] */ gb3 = "GB3", /** * @remarks * [Api set: OneNoteApi 1.1] */ gb4 = "GB4", /** * @remarks * [Api set: OneNoteApi 1.1] */ zodiac1 = "Zodiac1", /** * @remarks * [Api set: OneNoteApi 1.1] */ zodiac2 = "Zodiac2", /** * @remarks * [Api set: OneNoteApi 1.1] */ zodiac3 = "Zodiac3", /** * @remarks * [Api set: OneNoteApi 1.1] */ tpeDbNum1 = "TpeDbNum1", /** * @remarks * [Api set: OneNoteApi 1.1] */ tpeDbNum2 = "TpeDbNum2", /** * @remarks * [Api set: OneNoteApi 1.1] */ tpeDbNum3 = "TpeDbNum3", /** * @remarks * [Api set: OneNoteApi 1.1] */ tpeDbNum4 = "TpeDbNum4", /** * @remarks * [Api set: OneNoteApi 1.1] */ chnDbNum1 = "ChnDbNum1", /** * @remarks * [Api set: OneNoteApi 1.1] */ chnDbNum2 = "ChnDbNum2", /** * @remarks * [Api set: OneNoteApi 1.1] */ chnDbNum3 = "ChnDbNum3", /** * @remarks * [Api set: OneNoteApi 1.1] */ chnDbNum4 = "ChnDbNum4", /** * @remarks * [Api set: OneNoteApi 1.1] */ korDbNum1 = "KorDbNum1", /** * @remarks * [Api set: OneNoteApi 1.1] */ korDbNum2 = "KorDbNum2", /** * @remarks * [Api set: OneNoteApi 1.1] */ korDbNum3 = "KorDbNum3", /** * @remarks * [Api set: OneNoteApi 1.1] */ korDbNum4 = "KorDbNum4", /** * @remarks * [Api set: OneNoteApi 1.1] */ hebrew1 = "Hebrew1", /** * @remarks * [Api set: OneNoteApi 1.1] */ arabic1 = "Arabic1", /** * @remarks * [Api set: OneNoteApi 1.1] */ hebrew2 = "Hebrew2", /** * @remarks * [Api set: OneNoteApi 1.1] */ arabic2 = "Arabic2", /** * @remarks * [Api set: OneNoteApi 1.1] */ hindi1 = "Hindi1", /** * @remarks * [Api set: OneNoteApi 1.1] */ hindi2 = "Hindi2", /** * @remarks * [Api set: OneNoteApi 1.1] */ hindi3 = "Hindi3", /** * @remarks * [Api set: OneNoteApi 1.1] */ thai1 = "Thai1", /** * @remarks * [Api set: OneNoteApi 1.1] */ thai2 = "Thai2", /** * @remarks * [Api set: OneNoteApi 1.1] */ numInDash = "NumInDash", /** * @remarks * [Api set: OneNoteApi 1.1] */ lcrus = "LCRus", /** * @remarks * [Api set: OneNoteApi 1.1] */ ucrus = "UCRus", /** * @remarks * [Api set: OneNoteApi 1.1] */ lcgreek = "LCGreek", /** * @remarks * [Api set: OneNoteApi 1.1] */ ucgreek = "UCGreek", /** * @remarks * [Api set: OneNoteApi 1.1] */ lim = "Lim", /** * @remarks * [Api set: OneNoteApi 1.1] */ custom = "Custom", } /** * @remarks * [Api set: OneNoteApi 1.9] */ enum EventType { /** * @remarks * [Api set: OneNoteApi 1.9] */ alterationSelected = "AlterationSelected", /** * @remarks * [Api set: OneNoteApi 1.9] */ inkSelectedForCorrection = "InkSelectedForCorrection", /** * @remarks * [Api set: OneNoteApi 1.9] */ restrictionsCalculated = "RestrictionsCalculated", /** * @remarks * [Api set: OneNoteApi 1.9] */ reset = "Reset", } /** * @remarks * [Api set: OneNoteApi 1.8] */ enum ParagraphStyle { /** * @remarks * [Api set: OneNoteApi 1.8] */ noStyle = 0, /** * @remarks * [Api set: OneNoteApi 1.8] */ normal = 1, /** * @remarks * [Api set: OneNoteApi 1.8] */ title = 2, /** * @remarks * [Api set: OneNoteApi 1.8] */ dateTime = 3, /** * @remarks * [Api set: OneNoteApi 1.8] */ heading1 = 4, /** * @remarks * [Api set: OneNoteApi 1.8] */ heading2 = 5, /** * @remarks * [Api set: OneNoteApi 1.8] */ heading3 = 6, /** * @remarks * [Api set: OneNoteApi 1.8] */ heading4 = 7, /** * @remarks * [Api set: OneNoteApi 1.8] */ heading5 = 8, /** * @remarks * [Api set: OneNoteApi 1.8] */ heading6 = 9, /** * @remarks * [Api set: OneNoteApi 1.8] */ quote = 10, /** * @remarks * [Api set: OneNoteApi 1.8] */ citation = 11, /** * @remarks * [Api set: OneNoteApi 1.8] */ code = 12, } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", invalidArgument = "InvalidArgument", invalidOperation = "InvalidOperation", invalidState = "InvalidState", itemNotFound = "ItemNotFound", notImplemented = "NotImplemented", notSupported = "NotSupported", operationAborted = "OperationAborted", } namespace Interfaces { /** * Provides ways to load properties of only a subset of members of a collection. */ interface CollectionLoadOptions { /** * Specify the number of items in the queried collection to be included in the result. */ $top?: number; /** * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. */ $skip?: number; } /** An interface for updating data on the Application object, for use in `application.set({ ... })`. */ interface ApplicationUpdateData { } /** An interface for updating data on the InkAnalysis object, for use in `inkAnalysis.set({ ... })`. */ interface InkAnalysisUpdateData { /** * Gets the parent page object. * * @remarks * [Api set: OneNoteApi 1.1] */ page?: OneNote.Interfaces.PageUpdateData; } /** An interface for updating data on the InkAnalysisParagraph object, for use in `inkAnalysisParagraph.set({ ... })`. */ interface InkAnalysisParagraphUpdateData { /** * Reference to the parent InkAnalysisPage. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysis?: OneNote.Interfaces.InkAnalysisUpdateData; } /** An interface for updating data on the InkAnalysisParagraphCollection object, for use in `inkAnalysisParagraphCollection.set({ ... })`. */ interface InkAnalysisParagraphCollectionUpdateData { items?: OneNote.Interfaces.InkAnalysisParagraphData[]; } /** An interface for updating data on the InkAnalysisLine object, for use in `inkAnalysisLine.set({ ... })`. */ interface InkAnalysisLineUpdateData { /** * Reference to the parent InkAnalysisParagraph. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.InkAnalysisParagraphUpdateData; } /** An interface for updating data on the InkAnalysisLineCollection object, for use in `inkAnalysisLineCollection.set({ ... })`. */ interface InkAnalysisLineCollectionUpdateData { items?: OneNote.Interfaces.InkAnalysisLineData[]; } /** An interface for updating data on the InkAnalysisWord object, for use in `inkAnalysisWord.set({ ... })`. */ interface InkAnalysisWordUpdateData { /** * Reference to the parent InkAnalysisLine. * * @remarks * [Api set: OneNoteApi 1.1] */ line?: OneNote.Interfaces.InkAnalysisLineUpdateData; } /** An interface for updating data on the InkAnalysisWordCollection object, for use in `inkAnalysisWordCollection.set({ ... })`. */ interface InkAnalysisWordCollectionUpdateData { items?: OneNote.Interfaces.InkAnalysisWordData[]; } /** An interface for updating data on the InkStrokeCollection object, for use in `inkStrokeCollection.set({ ... })`. */ interface InkStrokeCollectionUpdateData { items?: OneNote.Interfaces.InkStrokeData[]; } /** An interface for updating data on the PointCollection object, for use in `pointCollection.set({ ... })`. */ interface PointCollectionUpdateData { items?: OneNote.Interfaces.PointData[]; } /** An interface for updating data on the InkWordCollection object, for use in `inkWordCollection.set({ ... })`. */ interface InkWordCollectionUpdateData { items?: OneNote.Interfaces.InkWordData[]; } /** An interface for updating data on the NotebookCollection object, for use in `notebookCollection.set({ ... })`. */ interface NotebookCollectionUpdateData { items?: OneNote.Interfaces.NotebookData[]; } /** An interface for updating data on the SectionGroupCollection object, for use in `sectionGroupCollection.set({ ... })`. */ interface SectionGroupCollectionUpdateData { items?: OneNote.Interfaces.SectionGroupData[]; } /** An interface for updating data on the SectionCollection object, for use in `sectionCollection.set({ ... })`. */ interface SectionCollectionUpdateData { items?: OneNote.Interfaces.SectionData[]; } /** An interface for updating data on the Page object, for use in `page.set({ ... })`. */ interface PageUpdateData { /** * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisUpdateData; /** * Gets or sets the indentation level of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ pageLevel?: number; /** * Gets or sets the title of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ title?: string; } /** An interface for updating data on the PageCollection object, for use in `pageCollection.set({ ... })`. */ interface PageCollectionUpdateData { items?: OneNote.Interfaces.PageData[]; } /** An interface for updating data on the PageContent object, for use in `pageContent.set({ ... })`. */ interface PageContentUpdateData { /** * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageUpdateData; /** * Gets or sets the left (X-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ left?: number; /** * Gets or sets the top (Y-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ top?: number; } /** An interface for updating data on the PageContentCollection object, for use in `pageContentCollection.set({ ... })`. */ interface PageContentCollectionUpdateData { items?: OneNote.Interfaces.PageContentData[]; } /** An interface for updating data on the Paragraph object, for use in `paragraph.set({ ... })`. */ interface ParagraphUpdateData { /** * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageUpdateData; /** * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. * * @remarks * [Api set: OneNoteApi 1.1] */ table?: OneNote.Interfaces.TableUpdateData; } /** An interface for updating data on the ParagraphCollection object, for use in `paragraphCollection.set({ ... })`. */ interface ParagraphCollectionUpdateData { items?: OneNote.Interfaces.ParagraphData[]; } /** An interface for updating data on the Image object, for use in `image.set({ ... })`. */ interface ImageUpdateData { /** * Gets or sets the description of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ description?: string; /** * Gets or sets the height of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ height?: number; /** * Gets or sets the hyperlink of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ hyperlink?: string; /** * Gets or sets the width of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ width?: number; } /** An interface for updating data on the Table object, for use in `table.set({ ... })`. */ interface TableUpdateData { /** * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. * * @remarks * [Api set: OneNoteApi 1.1] */ borderVisible?: boolean; } /** An interface for updating data on the TableRowCollection object, for use in `tableRowCollection.set({ ... })`. */ interface TableRowCollectionUpdateData { items?: OneNote.Interfaces.TableRowData[]; } /** An interface for updating data on the TableCell object, for use in `tableCell.set({ ... })`. */ interface TableCellUpdateData { /** * Gets and sets the shading color of the cell * * @remarks * [Api set: OneNoteApi 1.1] */ shadingColor?: string; } /** An interface for updating data on the TableCellCollection object, for use in `tableCellCollection.set({ ... })`. */ interface TableCellCollectionUpdateData { items?: OneNote.Interfaces.TableCellData[]; } /** An interface describing the data returned by calling `application.toJSON()`. */ interface ApplicationData { /** * Gets the collection of notebooks that are open in the OneNote application instance. In OneNote Online, only one notebook at a time is open in the application instance. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ notebooks?: OneNote.Interfaces.NotebookData[]; } /** An interface describing the data returned by calling `inkAnalysis.toJSON()`. */ interface InkAnalysisData { /** * Gets the parent page object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ page?: OneNote.Interfaces.PageData; /** * Gets the ID of the InkAnalysis object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; } /** An interface describing the data returned by calling `inkAnalysisParagraph.toJSON()`. */ interface InkAnalysisParagraphData { /** * Reference to the parent InkAnalysisPage. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysis?: OneNote.Interfaces.InkAnalysisData; /** * Gets the ink analysis lines in this ink analysis paragraph. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ lines?: OneNote.Interfaces.InkAnalysisLineData[]; /** * Gets the ID of the InkAnalysisParagraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; } /** An interface describing the data returned by calling `inkAnalysisParagraphCollection.toJSON()`. */ interface InkAnalysisParagraphCollectionData { items?: OneNote.Interfaces.InkAnalysisParagraphData[]; } /** An interface describing the data returned by calling `inkAnalysisLine.toJSON()`. */ interface InkAnalysisLineData { /** * Reference to the parent InkAnalysisParagraph. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.InkAnalysisParagraphData; /** * Gets the ink analysis words in this ink analysis line. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ words?: OneNote.Interfaces.InkAnalysisWordData[]; /** * Gets the ID of the InkAnalysisLine object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; } /** An interface describing the data returned by calling `inkAnalysisLineCollection.toJSON()`. */ interface InkAnalysisLineCollectionData { items?: OneNote.Interfaces.InkAnalysisLineData[]; } /** An interface describing the data returned by calling `inkAnalysisWord.toJSON()`. */ interface InkAnalysisWordData { /** * Reference to the parent InkAnalysisLine. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ line?: OneNote.Interfaces.InkAnalysisLineData; /** * Gets the ID of the InkAnalysisWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * The id of the recognized language in this inkAnalysisWord. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: string; /** * Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ strokePointers?: OneNote.InkStrokePointer[]; /** * The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ wordAlternates?: string[]; } /** An interface describing the data returned by calling `inkAnalysisWordCollection.toJSON()`. */ interface InkAnalysisWordCollectionData { items?: OneNote.Interfaces.InkAnalysisWordData[]; } /** An interface describing the data returned by calling `floatingInk.toJSON()`. */ interface FloatingInkData { /** * Gets the strokes of the FloatingInk object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ inkStrokes?: OneNote.Interfaces.InkStrokeData[]; /** * Gets the ID of the FloatingInk object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; } /** An interface describing the data returned by calling `inkStroke.toJSON()`. */ interface InkStrokeData { /** * Gets the ID of the InkStroke object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ floatingInk?: OneNote.Interfaces.FloatingInkData; /** * Gets the ID of the InkStroke object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; } /** An interface describing the data returned by calling `inkStrokeCollection.toJSON()`. */ interface InkStrokeCollectionData { items?: OneNote.Interfaces.InkStrokeData[]; } /** An interface describing the data returned by calling `point.toJSON()`. */ interface PointData { /** * Gets the ID of the Point object. Read-only. * * @remarks * [Api set: OneNoteApi 1.9] */ id?: string; x?: number; y?: number; } /** An interface describing the data returned by calling `pointCollection.toJSON()`. */ interface PointCollectionData { items?: OneNote.Interfaces.PointData[]; } /** An interface describing the data returned by calling `inkWord.toJSON()`. */ interface InkWordData { /** * Gets the ID of the InkWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * The id of the recognized language in this ink word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: string; /** * The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ wordAlternates?: string[]; } /** An interface describing the data returned by calling `inkWordCollection.toJSON()`. */ interface InkWordCollectionData { items?: OneNote.Interfaces.InkWordData[]; } /** An interface describing the data returned by calling `notebook.toJSON()`. */ interface NotebookData { /** * The section groups in the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sectionGroups?: OneNote.Interfaces.SectionGroupData[]; /** * The sections of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sections?: OneNote.Interfaces.SectionData[]; /** * The url of the site where this notebook is located. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ baseUrl?: string; /** * The client url of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: string; /** * Gets the ID of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * True if the notebook is not created by the user (i.e., 'Misplaced Sections'). Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isVirtual?: boolean; /** * Gets the name of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: string; } /** An interface describing the data returned by calling `notebookCollection.toJSON()`. */ interface NotebookCollectionData { items?: OneNote.Interfaces.NotebookData[]; } /** An interface describing the data returned by calling `sectionGroup.toJSON()`. */ interface SectionGroupData { /** * The collection of section groups in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sectionGroups?: OneNote.Interfaces.SectionGroupData[]; /** * The collection of sections in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sections?: OneNote.Interfaces.SectionData[]; /** * The client url of the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: string; /** * Gets the ID of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets the name of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: string; } /** An interface describing the data returned by calling `sectionGroupCollection.toJSON()`. */ interface SectionGroupCollectionData { items?: OneNote.Interfaces.SectionGroupData[]; } /** An interface describing the data returned by calling `section.toJSON()`. */ interface SectionData { /** * The collection of pages in the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ pages?: OneNote.Interfaces.PageData[]; /** * The client url of the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: string; /** * Gets the ID of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * True if this section is encrypted with a password. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isEncrypted?: boolean; /** * True if this section is locked. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isLocked?: boolean; /** * Gets the name of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: string; /** * The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ webUrl?: string; } /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ interface SectionCollectionData { items?: OneNote.Interfaces.SectionData[]; } /** An interface describing the data returned by calling `page.toJSON()`. */ interface PageData { /** * The collection of PageContent objects on the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ contents?: OneNote.Interfaces.PageContentData[]; /** * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisData; /** * Gets the ClassNotebookPageSource to the page. * * @remarks * [Api set: OneNoteApi 1.1] */ classNotebookPageSource?: string; /** * The client url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: string; /** * Gets the ID of the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets or sets the indentation level of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ pageLevel?: number; /** * Gets or sets the title of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ title?: string; /** * The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ webUrl?: string; } /** An interface describing the data returned by calling `pageCollection.toJSON()`. */ interface PageCollectionData { items?: OneNote.Interfaces.PageData[]; } /** An interface describing the data returned by calling `pageContent.toJSON()`. */ interface PageContentData { /** * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageData; /** * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. * * @remarks * [Api set: OneNoteApi 1.1] */ ink?: OneNote.Interfaces.FloatingInkData; /** * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. * * @remarks * [Api set: OneNoteApi 1.1] */ outline?: OneNote.Interfaces.OutlineData; /** * Gets the ID of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets or sets the left (X-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ left?: number; /** * Gets or sets the top (Y-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ top?: number; /** * Gets the type of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: OneNote.PageContentType | "Outline" | "Image" | "Ink" | "Other"; } /** An interface describing the data returned by calling `pageContentCollection.toJSON()`. */ interface PageContentCollectionData { items?: OneNote.Interfaces.PageContentData[]; } /** An interface describing the data returned by calling `outline.toJSON()`. */ interface OutlineData { /** * Gets the collection of Paragraph objects in the Outline. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphData[]; /** * Gets the ID of the Outline object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; } /** An interface describing the data returned by calling `paragraph.toJSON()`. */ interface ParagraphData { /** * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageData; /** * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ inkWords?: OneNote.Interfaces.InkWordData[]; /** * The collection of paragraphs under this paragraph. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphData[]; /** * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only * * @remarks * [Api set: OneNoteApi 1.1] */ richText?: OneNote.Interfaces.RichTextData; /** * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ table?: OneNote.Interfaces.TableData; /** * Gets the ID of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets the type of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: OneNote.ParagraphType | "RichText" | "Image" | "Table" | "Ink" | "Other"; } /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ interface ParagraphCollectionData { items?: OneNote.Interfaces.ParagraphData[]; } /** An interface describing the data returned by calling `noteTag.toJSON()`. */ interface NoteTagData { /** * Gets the Id of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets the status of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ status?: OneNote.NoteTagStatus | "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"; /** * Gets the type of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: OneNote.NoteTagType | "Unknown" | "ToDo" | "Important" | "Question" | "Contact" | "Address" | "PhoneNumber" | "Website" | "Idea" | "Critical" | "ToDoPriority1" | "ToDoPriority2"; } /** An interface describing the data returned by calling `richText.toJSON()`. */ interface RichTextData { /** * Gets the ID of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * The language id of the text. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: string; /** * Gets the text style of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.8] */ style?: OneNote.ParagraphStyle; /** * Gets the text content of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ text?: string; } /** An interface describing the data returned by calling `image.toJSON()`. */ interface ImageData { /** * Gets or sets the description of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ description?: string; /** * Gets or sets the height of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ height?: number; /** * Gets or sets the hyperlink of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ hyperlink?: string; /** * Gets the ID of the Image object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets the data obtained by OCR (Optical Character Recognition) of this Image, such as OCR text and language. * * @remarks * [Api set: OneNoteApi 1.1] */ ocrData?: OneNote.ImageOcrData; /** * Gets or sets the width of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ width?: number; } /** An interface describing the data returned by calling `table.toJSON()`. */ interface TableData { /** * Gets all of the table rows. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ rows?: OneNote.Interfaces.TableRowData[]; /** * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. * * @remarks * [Api set: OneNoteApi 1.1] */ borderVisible?: boolean; /** * Gets the number of columns in the table. * * @remarks * [Api set: OneNoteApi 1.1] */ columnCount?: number; /** * Gets the ID of the table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets the number of rows in the table. * * @remarks * [Api set: OneNoteApi 1.1] */ rowCount?: number; } /** An interface describing the data returned by calling `tableRow.toJSON()`. */ interface TableRowData { /** * Gets the cells in the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ cells?: OneNote.Interfaces.TableCellData[]; /** * Gets the number of cells in the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ cellCount?: number; /** * Gets the ID of the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets the index of the row in its parent table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ rowIndex?: number; } /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ interface TableRowCollectionData { items?: OneNote.Interfaces.TableRowData[]; } /** An interface describing the data returned by calling `tableCell.toJSON()`. */ interface TableCellData { /** * Gets the collection of Paragraph objects in the TableCell. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphData[]; /** * Gets the index of the cell in its row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ cellIndex?: number; /** * Gets the ID of the cell. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: string; /** * Gets the index of the cell's row in the table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ rowIndex?: number; /** * Gets and sets the shading color of the cell * * @remarks * [Api set: OneNoteApi 1.1] */ shadingColor?: string; } /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ interface TableCellCollectionData { items?: OneNote.Interfaces.TableCellData[]; } /** * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. * * @remarks * [Api set: OneNoteApi 1.1] */ interface ApplicationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the collection of notebooks that are open in the OneNote application instance. In OneNote Online, only one notebook at a time is open in the application instance. * * @remarks * [Api set: OneNoteApi 1.1] */ notebooks?: OneNote.Interfaces.NotebookCollectionLoadOptions; } /** * Represents ink analysis data for a given set of ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkAnalysisLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the parent page object. * * @remarks * [Api set: OneNoteApi 1.1] */ page?: OneNote.Interfaces.PageLoadOptions; /** * Gets the ID of the InkAnalysis object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents ink analysis data for an identified paragraph formed by ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkAnalysisParagraphLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Reference to the parent InkAnalysisPage. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysis?: OneNote.Interfaces.InkAnalysisLoadOptions; /** * Gets the ink analysis lines in this ink analysis paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; /** * Gets the ID of the InkAnalysisParagraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents a collection of InkAnalysisParagraph objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkAnalysisParagraphCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Reference to the parent InkAnalysisPage. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysis?: OneNote.Interfaces.InkAnalysisLoadOptions; /** * For EACH ITEM in the collection: Gets the ink analysis lines in this ink analysis paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the ID of the InkAnalysisParagraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents ink analysis data for an identified text line formed by ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkAnalysisLineLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Reference to the parent InkAnalysisParagraph. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions; /** * Gets the ink analysis words in this ink analysis line. * * @remarks * [Api set: OneNoteApi 1.1] */ words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; /** * Gets the ID of the InkAnalysisLine object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents a collection of InkAnalysisLine objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkAnalysisLineCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Reference to the parent InkAnalysisParagraph. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions; /** * For EACH ITEM in the collection: Gets the ink analysis words in this ink analysis line. * * @remarks * [Api set: OneNoteApi 1.1] */ words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the ID of the InkAnalysisLine object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents ink analysis data for an identified word formed by ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkAnalysisWordLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Reference to the parent InkAnalysisLine. * * @remarks * [Api set: OneNoteApi 1.1] */ line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; /** * Gets the ID of the InkAnalysisWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * The id of the recognized language in this inkAnalysisWord. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: boolean; /** * Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ strokePointers?: boolean; /** * The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ wordAlternates?: boolean; } /** * Represents a collection of InkAnalysisWord objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkAnalysisWordCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Reference to the parent InkAnalysisLine. * * @remarks * [Api set: OneNoteApi 1.1] */ line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; /** * For EACH ITEM in the collection: Gets the ID of the InkAnalysisWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: The id of the recognized language in this inkAnalysisWord. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: boolean; /** * For EACH ITEM in the collection: Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ strokePointers?: boolean; /** * For EACH ITEM in the collection: The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ wordAlternates?: boolean; } /** * Represents a group of ink strokes. * * @remarks * [Api set: OneNoteApi 1.1] */ interface FloatingInkLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the strokes of the FloatingInk object. * * @remarks * [Api set: OneNoteApi 1.1] */ inkStrokes?: OneNote.Interfaces.InkStrokeCollectionLoadOptions; /** * Gets the PageContent parent of the FloatingInk object. * * @remarks * [Api set: OneNoteApi 1.1] */ pageContent?: OneNote.Interfaces.PageContentLoadOptions; /** * Gets the ID of the FloatingInk object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents a single stroke of ink. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkStrokeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the ID of the InkStroke object. * * @remarks * [Api set: OneNoteApi 1.1] */ floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; /** * Gets the ID of the InkStroke object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents a collection of InkStroke objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkStrokeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the InkStroke object. * * @remarks * [Api set: OneNoteApi 1.1] */ floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; /** * For EACH ITEM in the collection: Gets the ID of the InkStroke object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * Represents a single point of ink stroke * * @remarks * [Api set: OneNoteApi 1.9] */ interface PointLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the ID of the Point object. Read-only. * * @remarks * [Api set: OneNoteApi 1.9] */ id?: boolean; x?: boolean; y?: boolean; } /** * Represents a collection of Point objects. * * @remarks * [Api set: OneNoteApi 1.9] */ interface PointCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the Point object. Read-only. * * @remarks * [Api set: OneNoteApi 1.9] */ id?: boolean; /** * For EACH ITEM in the collection: X */ x?: boolean; /** * For EACH ITEM in the collection: Y */ y?: boolean; } /** * A container for the ink in a word in a paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkWordLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The parent paragraph containing the ink word. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.ParagraphLoadOptions; /** * Gets the ID of the InkWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * The id of the recognized language in this ink word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: boolean; /** * The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ wordAlternates?: boolean; } /** * Represents a collection of InkWord objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface InkWordCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The parent paragraph containing the ink word. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.ParagraphLoadOptions; /** * For EACH ITEM in the collection: Gets the ID of the InkWord object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: The id of the recognized language in this ink word. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: boolean; /** * For EACH ITEM in the collection: The words that were recognized in this ink word, in order of likelihood. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ wordAlternates?: boolean; } /** * Represents a OneNote notebook. Notebooks contain section groups and sections. * * @remarks * [Api set: OneNoteApi 1.1] */ interface NotebookLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The section groups in the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; /** * The sections of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sections?: OneNote.Interfaces.SectionCollectionLoadOptions; /** * The url of the site where this notebook is located. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ baseUrl?: boolean; /** * The client url of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * Gets the ID of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * True if the notebook is not created by the user (i.e., 'Misplaced Sections'). Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isVirtual?: boolean; /** * Gets the name of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: boolean; } /** * Represents a collection of notebooks. * * @remarks * [Api set: OneNoteApi 1.1] */ interface NotebookCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The section groups in the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; /** * For EACH ITEM in the collection: The sections of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sections?: OneNote.Interfaces.SectionCollectionLoadOptions; /** * For EACH ITEM in the collection: The url of the site where this notebook is located. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ baseUrl?: boolean; /** * For EACH ITEM in the collection: The client url of the notebook. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: True if the notebook is not created by the user (i.e., 'Misplaced Sections'). Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isVirtual?: boolean; /** * For EACH ITEM in the collection: Gets the name of the notebook. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: boolean; } /** * Represents a OneNote section group. Section groups can contain sections and other section groups. * * @remarks * [Api set: OneNoteApi 1.1] */ interface SectionGroupLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the notebook that contains the section group. * * @remarks * [Api set: OneNoteApi 1.1] */ notebook?: OneNote.Interfaces.NotebookLoadOptions; /** * Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; /** * Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; /** * The collection of section groups in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; /** * The collection of sections in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sections?: OneNote.Interfaces.SectionCollectionLoadOptions; /** * The client url of the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * Gets the ID of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets the name of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: boolean; } /** * Represents a collection of section groups. * * @remarks * [Api set: OneNoteApi 1.1] */ interface SectionGroupCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the notebook that contains the section group. * * @remarks * [Api set: OneNoteApi 1.1] */ notebook?: OneNote.Interfaces.NotebookLoadOptions; /** * For EACH ITEM in the collection: Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; /** * For EACH ITEM in the collection: Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; /** * For EACH ITEM in the collection: The collection of section groups in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; /** * For EACH ITEM in the collection: The collection of sections in the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ sections?: OneNote.Interfaces.SectionCollectionLoadOptions; /** * For EACH ITEM in the collection: The client url of the section group. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the name of the section group. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: boolean; } /** * Represents a OneNote section. Sections can contain pages. * * @remarks * [Api set: OneNoteApi 1.1] */ interface SectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the notebook that contains the section. * * @remarks * [Api set: OneNoteApi 1.1] */ notebook?: OneNote.Interfaces.NotebookLoadOptions; /** * The collection of pages in the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ pages?: OneNote.Interfaces.PageCollectionLoadOptions; /** * Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; /** * Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; /** * The client url of the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * Gets the ID of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * True if this section is encrypted with a password. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isEncrypted?: boolean; /** * True if this section is locked. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isLocked?: boolean; /** * Gets the name of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: boolean; /** * The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ webUrl?: boolean; } /** * Represents a collection of sections. * * @remarks * [Api set: OneNoteApi 1.1] */ interface SectionCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the notebook that contains the section. * * @remarks * [Api set: OneNoteApi 1.1] */ notebook?: OneNote.Interfaces.NotebookLoadOptions; /** * For EACH ITEM in the collection: The collection of pages in the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ pages?: OneNote.Interfaces.PageCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; /** * For EACH ITEM in the collection: Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; /** * For EACH ITEM in the collection: The client url of the section. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: True if this section is encrypted with a password. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isEncrypted?: boolean; /** * For EACH ITEM in the collection: True if this section is locked. Read only * * @remarks * [Api set: OneNoteApi 1.2] */ isLocked?: boolean; /** * For EACH ITEM in the collection: Gets the name of the section. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ webUrl?: boolean; } /** * Represents a OneNote page. * * @remarks * [Api set: OneNoteApi 1.1] */ interface PageLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * The collection of PageContent objects on the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ contents?: OneNote.Interfaces.PageContentCollectionLoadOptions; /** * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; /** * Gets the section that contains the page. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSection?: OneNote.Interfaces.SectionLoadOptions; /** * Gets the ClassNotebookPageSource to the page. * * @remarks * [Api set: OneNoteApi 1.1] */ classNotebookPageSource?: boolean; /** * The client url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * Gets the ID of the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets or sets the indentation level of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ pageLevel?: boolean; /** * Gets or sets the title of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ title?: boolean; /** * The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ webUrl?: boolean; } /** * Represents a collection of pages. * * @remarks * [Api set: OneNoteApi 1.1] */ interface PageCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: The collection of PageContent objects on the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ contents?: OneNote.Interfaces.PageContentCollectionLoadOptions; /** * For EACH ITEM in the collection: Text interpretation for the ink on the page. Returns null if there is no ink analysis information. * * @remarks * [Api set: OneNoteApi 1.1] */ inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; /** * For EACH ITEM in the collection: Gets the section that contains the page. * * @remarks * [Api set: OneNoteApi 1.1] */ parentSection?: OneNote.Interfaces.SectionLoadOptions; /** * For EACH ITEM in the collection: Gets the ClassNotebookPageSource to the page. * * @remarks * [Api set: OneNoteApi 1.1] */ classNotebookPageSource?: boolean; /** * For EACH ITEM in the collection: The client url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ clientUrl?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the page. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Gets or sets the indentation level of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ pageLevel?: boolean; /** * For EACH ITEM in the collection: Gets or sets the title of the page. * * @remarks * [Api set: OneNoteApi 1.1] */ title?: boolean; /** * For EACH ITEM in the collection: The web url of the page. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ webUrl?: boolean; } /** * Represents a region on a page that contains top-level content types such as Outline or Image. A PageContent object can be assigned an XY position. * * @remarks * [Api set: OneNoteApi 1.1] */ interface PageContentLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageLoadOptions; /** * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. * * @remarks * [Api set: OneNoteApi 1.1] */ ink?: OneNote.Interfaces.FloatingInkLoadOptions; /** * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. * * @remarks * [Api set: OneNoteApi 1.1] */ outline?: OneNote.Interfaces.OutlineLoadOptions; /** * Gets the page that contains the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ parentPage?: OneNote.Interfaces.PageLoadOptions; /** * Gets the ID of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets or sets the left (X-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ left?: boolean; /** * Gets or sets the top (Y-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ top?: boolean; /** * Gets the type of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: boolean; } /** * Represents the contents of a page, as a collection of PageContent objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface PageContentCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageLoadOptions; /** * For EACH ITEM in the collection: Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. * * @remarks * [Api set: OneNoteApi 1.1] */ ink?: OneNote.Interfaces.FloatingInkLoadOptions; /** * For EACH ITEM in the collection: Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. * * @remarks * [Api set: OneNoteApi 1.1] */ outline?: OneNote.Interfaces.OutlineLoadOptions; /** * For EACH ITEM in the collection: Gets the page that contains the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ parentPage?: OneNote.Interfaces.PageLoadOptions; /** * For EACH ITEM in the collection: Gets the ID of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Gets or sets the left (X-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ left?: boolean; /** * For EACH ITEM in the collection: Gets or sets the top (Y-axis) position of the PageContent object. * * @remarks * [Api set: OneNoteApi 1.1] */ top?: boolean; /** * For EACH ITEM in the collection: Gets the type of the PageContent object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: boolean; } /** * Represents a container for Paragraph objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface OutlineLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. * * @remarks * [Api set: OneNoteApi 1.1] */ pageContent?: OneNote.Interfaces.PageContentLoadOptions; /** * Gets the collection of Paragraph objects in the Outline. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; /** * Gets the ID of the Outline object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; } /** * A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content. * * @remarks * [Api set: OneNoteApi 1.1] */ interface ParagraphLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageLoadOptions; /** * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. * * @remarks * [Api set: OneNoteApi 1.1] */ inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; /** * Gets the Outline object that contains the Paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ outline?: OneNote.Interfaces.OutlineLoadOptions; /** * The collection of paragraphs under this paragraph. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; /** * Gets the parent paragraph object. Throws if a parent paragraph does not exist. * * @remarks * [Api set: OneNoteApi 1.1] */ parentParagraph?: OneNote.Interfaces.ParagraphLoadOptions; /** * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. * * @remarks * [Api set: OneNoteApi 1.1] */ parentParagraphOrNull?: OneNote.Interfaces.ParagraphLoadOptions; /** * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. * * @remarks * [Api set: OneNoteApi 1.1] */ parentTableCell?: OneNote.Interfaces.TableCellLoadOptions; /** * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. * * @remarks * [Api set: OneNoteApi 1.1] */ parentTableCellOrNull?: OneNote.Interfaces.TableCellLoadOptions; /** * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. * * @remarks * [Api set: OneNoteApi 1.1] */ richText?: OneNote.Interfaces.RichTextLoadOptions; /** * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. * * @remarks * [Api set: OneNoteApi 1.1] */ table?: OneNote.Interfaces.TableLoadOptions; /** * Gets the ID of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets the type of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: boolean; } /** * Represents a collection of Paragraph objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface ParagraphCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. * * @remarks * [Api set: OneNoteApi 1.1] */ image?: OneNote.Interfaces.ImageLoadOptions; /** * For EACH ITEM in the collection: Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. * * @remarks * [Api set: OneNoteApi 1.1] */ inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the Outline object that contains the Paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ outline?: OneNote.Interfaces.OutlineLoadOptions; /** * For EACH ITEM in the collection: The collection of paragraphs under this paragraph. Read only * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the parent paragraph object. Throws if a parent paragraph does not exist. * * @remarks * [Api set: OneNoteApi 1.1] */ parentParagraph?: OneNote.Interfaces.ParagraphLoadOptions; /** * For EACH ITEM in the collection: Gets the parent paragraph object. Returns null if a parent paragraph does not exist. * * @remarks * [Api set: OneNoteApi 1.1] */ parentParagraphOrNull?: OneNote.Interfaces.ParagraphLoadOptions; /** * For EACH ITEM in the collection: Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. * * @remarks * [Api set: OneNoteApi 1.1] */ parentTableCell?: OneNote.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. * * @remarks * [Api set: OneNoteApi 1.1] */ parentTableCellOrNull?: OneNote.Interfaces.TableCellLoadOptions; /** * For EACH ITEM in the collection: Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. * * @remarks * [Api set: OneNoteApi 1.1] */ richText?: OneNote.Interfaces.RichTextLoadOptions; /** * For EACH ITEM in the collection: Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. * * @remarks * [Api set: OneNoteApi 1.1] */ table?: OneNote.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the ID of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the type of the Paragraph object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: boolean; } /** * A container for the NoteTag in a paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ interface NoteTagLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the Id of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets the status of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ status?: boolean; /** * Gets the type of the NoteTag object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ type?: boolean; } /** * Represents a RichText object in a Paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ interface RichTextLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the Paragraph object that contains the RichText object. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.ParagraphLoadOptions; /** * Gets the ID of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * The language id of the text. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ languageId?: boolean; /** * Gets the text style of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.8] */ style?: boolean; /** * Gets the text content of the RichText object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ text?: boolean; } /** * Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object. * * @remarks * [Api set: OneNoteApi 1.1] */ interface ImageLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the PageContent object that contains the Image. Throws if the Image is not a direct child of a PageContent. This object defines the position of the Image on the page. * * @remarks * [Api set: OneNoteApi 1.1] */ pageContent?: OneNote.Interfaces.PageContentLoadOptions; /** * Gets the Paragraph object that contains the Image. Throws if the Image is not a direct child of a Paragraph. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.ParagraphLoadOptions; /** * Gets or sets the description of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ description?: boolean; /** * Gets or sets the height of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ height?: boolean; /** * Gets or sets the hyperlink of the Image. * * @remarks * [Api set: OneNoteApi 1.1] */ hyperlink?: boolean; /** * Gets the ID of the Image object. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets the data obtained by OCR (Optical Character Recognition) of this Image, such as OCR text and language. * * @remarks * [Api set: OneNoteApi 1.1] */ ocrData?: boolean; /** * Gets or sets the width of the Image layout. * * @remarks * [Api set: OneNoteApi 1.1] */ width?: boolean; } /** * Represents a table in a OneNote page. * * @remarks * [Api set: OneNoteApi 1.1] */ interface TableLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the Paragraph object that contains the Table object. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraph?: OneNote.Interfaces.ParagraphLoadOptions; /** * Gets all of the table rows. * * @remarks * [Api set: OneNoteApi 1.1] */ rows?: OneNote.Interfaces.TableRowCollectionLoadOptions; /** * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. * * @remarks * [Api set: OneNoteApi 1.1] */ borderVisible?: boolean; /** * Gets the number of columns in the table. * * @remarks * [Api set: OneNoteApi 1.1] */ columnCount?: boolean; /** * Gets the ID of the table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets the number of rows in the table. * * @remarks * [Api set: OneNoteApi 1.1] */ rowCount?: boolean; } /** * Represents a row in a table. * * @remarks * [Api set: OneNoteApi 1.1] */ interface TableRowLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the cells in the row. * * @remarks * [Api set: OneNoteApi 1.1] */ cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; /** * Gets the parent table. * * @remarks * [Api set: OneNoteApi 1.1] */ parentTable?: OneNote.Interfaces.TableLoadOptions; /** * Gets the number of cells in the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ cellCount?: boolean; /** * Gets the ID of the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets the index of the row in its parent table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ rowIndex?: boolean; } /** * Contains a collection of TableRow objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface TableRowCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the cells in the row. * * @remarks * [Api set: OneNoteApi 1.1] */ cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the parent table. * * @remarks * [Api set: OneNoteApi 1.1] */ parentTable?: OneNote.Interfaces.TableLoadOptions; /** * For EACH ITEM in the collection: Gets the number of cells in the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ cellCount?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the index of the row in its parent table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ rowIndex?: boolean; } /** * Represents a cell in a OneNote table. * * @remarks * [Api set: OneNoteApi 1.1] */ interface TableCellLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the collection of Paragraph objects in the TableCell. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; /** * Gets the parent row of the cell. * * @remarks * [Api set: OneNoteApi 1.1] */ parentRow?: OneNote.Interfaces.TableRowLoadOptions; /** * Gets the index of the cell in its row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ cellIndex?: boolean; /** * Gets the ID of the cell. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * Gets the index of the cell's row in the table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ rowIndex?: boolean; /** * Gets and sets the shading color of the cell * * @remarks * [Api set: OneNoteApi 1.1] */ shadingColor?: boolean; } /** * Contains a collection of TableCell objects. * * @remarks * [Api set: OneNoteApi 1.1] */ interface TableCellCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the collection of Paragraph objects in the TableCell. * * @remarks * [Api set: OneNoteApi 1.1] */ paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets the parent row of the cell. * * @remarks * [Api set: OneNoteApi 1.1] */ parentRow?: OneNote.Interfaces.TableRowLoadOptions; /** * For EACH ITEM in the collection: Gets the index of the cell in its row. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ cellIndex?: boolean; /** * For EACH ITEM in the collection: Gets the ID of the cell. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the index of the cell's row in the table. Read-only. * * @remarks * [Api set: OneNoteApi 1.1] */ rowIndex?: boolean; /** * For EACH ITEM in the collection: Gets and sets the shading color of the cell * * @remarks * [Api set: OneNoteApi 1.1] */ shadingColor?: boolean; } } } declare namespace OneNote { class RequestContext extends OfficeCore.RequestContext { constructor(url?: string); readonly application: Application; } /** * Executes a batch script that performs actions on the OneNote object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the OneNote application. Since the Office add-in and the OneNote application run in two different processes, the request context is required to get access to the OneNote object model from the add-in. */ function run(batch: (context: OneNote.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the OneNote object model, using the request context of a previously-created API object. * @param object - A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. */ function run(object: OfficeExtension.ClientObject, batch: (context: OneNote.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the OneNote object model, using the request context of previously-created API objects. * @param object - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared request context, which means that any changes applied to these objects will be picked up by "context.sync()". * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. */ function run(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise): Promise; } //////////////////////////////////////////////////////////////// /////////////////////// End OneNote APIs /////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// /////////////////////// Begin Visio APIs /////////////////////// //////////////////////////////////////////////////////////////// declare namespace Visio { /** * Provides information about the shape that raised the ShapeMouseEnter event. * * @remarks * [Api set: 1.1] */ interface ShapeMouseEnterEventArgs { /** * Gets the name of the page which has the shape object that raised the ShapeMouseEnter event. * * @remarks * [Api set: 1.1] */ pageName: string; /** * Gets the name of the shape object that raised the ShapeMouseEnter event. * * @remarks * [Api set: 1.1] */ shapeName: string; } /** * Provides information about the shape that raised the ShapeMouseLeave event. * * @remarks * [Api set: 1.1] */ interface ShapeMouseLeaveEventArgs { /** * Gets the name of the page which has the shape object that raised the ShapeMouseLeave event. * * @remarks * [Api set: 1.1] */ pageName: string; /** * Gets the name of the shape object that raised the ShapeMouseLeave event. * * @remarks * [Api set: 1.1] */ shapeName: string; } /** * Provides information about the page that raised the PageLoadComplete event. * * @remarks * [Api set: 1.1] */ interface PageLoadCompleteEventArgs { /** * Gets the name of the page that raised the PageLoad event. * * @remarks * [Api set: 1.1] */ pageName: string; /** * Gets the success or failure of the PageLoadComplete event. * * @remarks * [Api set: 1.1] */ success: boolean; } /** * Provides information about the document that raised the DataRefreshComplete event. * * @remarks * [Api set: 1.1] */ interface DataRefreshCompleteEventArgs { /** * Gets the document object that raised the DataRefreshComplete event. * * @remarks * [Api set: 1.1] */ document: Visio.Document; /** * Gets the success or failure of the DataRefreshComplete event. * * @remarks * [Api set: 1.1] */ success: boolean; } /** * Provides information about the shape collection that raised the SelectionChanged event. * * @remarks * [Api set: 1.1] */ interface SelectionChangedEventArgs { /** * Gets the name of the page which has the ShapeCollection object that raised the SelectionChanged event. * * @remarks * [Api set: 1.1] */ pageName: string; /** * Gets the array of shape names that raised the SelectionChanged event. * * @remarks * [Api set: 1.1] */ shapeNames: string[]; } /** * Provides information about the success or failure of the DocumentLoadComplete event. * * @remarks * [Api set: 1.1] */ interface DocumentLoadCompleteEventArgs { /** * Gets the success or failure of the DocumentLoadComplete event. * * @remarks * [Api set: 1.1] */ success: boolean; } /** * Provides information about the page that raised the PageRenderComplete event. * * @remarks * [Api set: 1.1] */ interface PageRenderCompleteEventArgs { /** * Gets the name of the page that raised the PageLoad event. * * @remarks * [Api set: 1.1] */ pageName: string; /** * Gets the success/failure of the PageRender event. * * @remarks * [Api set: 1.1] */ success: boolean; } /** * Provides information about DocumentError event. * * @remarks * [Api set: 1.1] */ interface DocumentErrorEventArgs { /** * Visio Error code. * * @remarks * [Api set: 1.1] */ errorCode: number; /** * Message about error that occurred. * * @remarks * [Api set: 1.1] */ errorMessage: string; /** * Tells if the error is critical or not. If critical the session cannot continue. * * @remarks * [Api set: 1.1] */ isCritical: boolean; } /** * Provides information about the TaskPaneStateChanged event. * * @remarks * [Api set: 1.1] */ interface TaskPaneStateChangedEventArgs { /** * Current state of the task pane. * * @remarks * [Api set: 1.1] */ isVisible: boolean; /** * Type of the TaskPane. * * @remarks * [Api set: 1.1] */ paneType: Visio.TaskPaneType | "None" | "DataVisualizerProcessMappings" | "DataVisualizerOrgChartMappings"; } /** * Represents the Application. * * @remarks * [Api set: 1.1] */ class Application extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Shows or hides the iframe application borders. * * @remarks * [Api set: 1.1] */ showBorders: boolean; /** * Shows or hides the standard toolbars. * * @remarks * [Api set: 1.1] */ showToolbars: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.Application): void; /** * Sets the visibility of a specific toolbar in the application. * * @remarks * [Api set: 1.1] * * @param id The type of the Toolbar. * @param show Whether the toolbar is visible or not. */ showToolbar(id: Visio.ToolBarType, show: boolean): void; /** * Sets the visibility of a specific toolbar in the application. * * @remarks * [Api set: 1.1] * * @param id The type of the Toolbar. * @param show Whether the toolbar is visible or not. */ showToolbar(id: "CommandBar" | "PageNavigationBar" | "StatusBar", show: boolean): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.ApplicationLoadOptions): Visio.Application; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.Application; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Application; /** * 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 Visio.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.ApplicationData; /** * Set mock data */ setMockData(data: Visio.Interfaces.ApplicationData): void; } /** * Represents the Document class. * * @remarks * [Api set: 1.1] */ class Document extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents a Visio application instance that contains this document. * * @remarks * [Api set: 1.1] */ readonly application: Visio.Application; /** * Represents a collection of pages associated with the document. * * @remarks * [Api set: 1.1] */ readonly pages: Visio.PageCollection; /** * Returns the DocumentView object. * * @remarks * [Api set: 1.1] */ readonly view: Visio.DocumentView; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.Document): void; /** * Returns the Active Page of the document. * * @remarks * [Api set: 1.1] */ getActivePage(): Visio.Page; /** * Set the Active Page of the document. * * @remarks * [Api set: 1.1] * * @param PageName Name of the page */ setActivePage(PageName: string): void; /** * Shows or hides a TaskPane. This will be consumed by the DV Excel Add-In/Other third-party apps who embed the Visio drawing to show/hide the task pane. * * @remarks * [Api set: 1.1] * * @param taskPaneType Type of the 1st Party TaskPane. It can take values from enum TaskPaneType * @param initialProps Optional Parameter. This is a generic data structure which would be filled with initial data required to initialize the content of the task pane. * @param show Optional Parameter. If it is set to false, it will hide the specified task pane. */ showTaskPane(taskPaneType: Visio.TaskPaneType, initialProps?: any, show?: boolean): void; /** * Shows or hides a TaskPane. This will be consumed by the DV Excel Add-In/Other third-party apps who embed the Visio drawing to show/hide the task pane. * * @remarks * [Api set: 1.1] * * @param taskPaneType Type of the 1st Party TaskPane. It can take values from enum TaskPaneType * @param initialProps Optional Parameter. This is a generic data structure which would be filled with initial data required to initialize the content of the task pane. * @param show Optional Parameter. If it is set to false, it will hide the specified task pane. */ showTaskPane(taskPaneType: "None" | "DataVisualizerProcessMappings" | "DataVisualizerOrgChartMappings", initialProps?: any, show?: boolean): void; /** * Triggers the refresh of the data in the Diagram, for all pages. * * @remarks * [Api set: 1.1] */ startDataRefresh(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.DocumentLoadOptions): Visio.Document; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.Document; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Document; /** * Occurs when the data is refreshed in the diagram. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onDataRefreshComplete: OfficeExtension.EventHandlers; /** * Occurs when there is an expected or unexpected error occurred in the session. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onDocumentError: OfficeExtension.EventHandlers; /** * Occurs when the Document is loaded, refreshed, or changed. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onDocumentLoadComplete: OfficeExtension.EventHandlers; /** * Occurs when the page is finished loading. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onPageLoadComplete: OfficeExtension.EventHandlers; /** * Occurs when the current selection of shapes changes. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * Occurs when the user moves the mouse pointer into the bounding box of a shape. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onShapeMouseEnter: OfficeExtension.EventHandlers; /** * Occurs when the user moves the mouse out of the bounding box of a shape. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onShapeMouseLeave: OfficeExtension.EventHandlers; /** * Occurs whenever a task pane state is changed. * * @remarks * [Api set: 1.1] * * @eventproperty */ readonly onTaskPaneStateChanged: OfficeExtension.EventHandlers; /** * 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 Visio.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.DocumentData; /** * Set mock data */ setMockData(data: Visio.Interfaces.DocumentData): void; } /** * Represents the DocumentView class. * * @remarks * [Api set: 1.1] */ class DocumentView extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Disable Hyperlinks. * * @remarks * [Api set: 1.1] */ disableHyperlinks: boolean; /** * Disable Pan. * * @remarks * [Api set: 1.1] */ disablePan: boolean; /** * Disable PanZoomWindow. * * @remarks * [Api set: 1.1] */ disablePanZoomWindow: boolean; /** * Disable Zoom. * * @remarks * [Api set: 1.1] */ disableZoom: boolean; /** * Hide Diagram Boundary. * * @remarks * [Api set: 1.1] */ hideDiagramBoundary: boolean; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.DocumentViewUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.DocumentView): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.DocumentViewLoadOptions): Visio.DocumentView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.DocumentView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.DocumentView; /** * 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 Visio.DocumentView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentViewData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.DocumentViewData; /** * Set mock data */ setMockData(data: Visio.Interfaces.DocumentViewData): void; } /** * Represents the Page class. * * @remarks * [Api set: 1.1] */ class Page extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * All shapes in the Page, including subshapes. * * @remarks * [Api set: 1.1] */ readonly allShapes: Visio.ShapeCollection; /** * Returns the Comments Collection. * * @remarks * [Api set: 1.1] */ readonly comments: Visio.CommentCollection; /** * All top-level shapes in the Page. * * @remarks * [Api set: 1.1] */ readonly shapes: Visio.ShapeCollection; /** * Returns the view of the page. * * @remarks * [Api set: 1.1] */ readonly view: Visio.PageView; /** * Returns the height of the page. * * @remarks * [Api set: 1.1] */ readonly height: number; /** * Index of the Page. * * @remarks * [Api set: 1.1] */ readonly index: number; /** * Whether the page is a background page or not. * * @remarks * [Api set: 1.1] */ readonly isBackground: boolean; /** * Page name. * * @remarks * [Api set: 1.1] */ readonly name: string; /** * Returns the width of the page. * * @remarks * [Api set: 1.1] */ readonly width: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PageUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.Page): void; /** * Sets the page as Active Page of the document. * * @remarks * [Api set: 1.1] */ activate(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.PageLoadOptions): Visio.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Page; /** * 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 Visio.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.PageData; /** * Set mock data */ setMockData(data: Visio.Interfaces.PageData): void; } /** * Represents the PageView class. * * @remarks * [Api set: 1.1] */ class PageView extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. * * @remarks * [Api set: 1.1] */ zoom: number; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.PageViewUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.PageView): void; /** * Pans the Visio drawing to place the specified shape in the center of the view. * * @remarks * [Api set: 1.1] * * @param ShapeId ShapeId to be seen in the center. */ centerViewportOnShape(ShapeId: number): void; /** * Fit Page to current window. * * @remarks * [Api set: 1.1] */ fitToWindow(): void; /** * Returns the position object that specifies the position of the page in the view. * * @remarks * [Api set: 1.1] */ getPosition(): OfficeExtension.ClientResult; /** * Represents the Selection in the page. * * @remarks * [Api set: 1.1] */ getSelection(): Visio.Selection; /** * To check if the shape is in view of the page or not. * * @remarks * [Api set: 1.1] * * @param Shape Shape to be checked. */ isShapeInViewport(Shape: Visio.Shape): OfficeExtension.ClientResult; /** * Sets the position of the page in the view. * * @remarks * [Api set: 1.1] * * @param Position Position object that specifies the new position of the page in the view. */ setPosition(Position: Visio.Position): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.PageViewLoadOptions): Visio.PageView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.PageView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.PageView; /** * 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 Visio.PageView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageViewData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.PageViewData; /** * Set mock data */ setMockData(data: Visio.Interfaces.PageViewData): void; } /** * Represents a collection of Page objects that are part of the document. * * @remarks * [Api set: 1.1] */ class PageCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Page[]; /** * Gets the number of pages in the collection. * * @remarks * [Api set: 1.1] */ getCount(): OfficeExtension.ClientResult; /** * Gets a page using its key (name or Id). * * @remarks * [Api set: 1.1] * * @param key Key is the name or Id of the page to be retrieved. */ getItem(key: number | string): Visio.Page; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.PageCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.PageCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.PageCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.PageCollection; /** * 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 `Visio.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Visio.Interfaces.PageCollectionData; /** * Set mock data */ setMockData(data: Visio.Interfaces.PageCollectionData): void; } /** * Represents the Shape Collection. * * @remarks * [Api set: 1.1] */ class ShapeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Shape[]; /** * Gets the number of Shapes in the collection. * * @remarks * [Api set: 1.1] */ getCount(): OfficeExtension.ClientResult; /** * Gets a Shape using its key (name or Index). * * @remarks * [Api set: 1.1] * * @param key Key is the Name or Index of the shape to be retrieved. */ getItem(key: number | string): Visio.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.ShapeCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.ShapeCollection; /** * 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 `Visio.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Visio.Interfaces.ShapeCollectionData; /** * Set mock data */ setMockData(data: Visio.Interfaces.ShapeCollectionData): void; } /** * Represents the Shape class. * * @remarks * [Api set: 1.1] */ class Shape extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the Comments Collection. * * @remarks * [Api set: 1.1] */ readonly comments: Visio.CommentCollection; /** * Returns the Hyperlinks collection for a Shape object. * * @remarks * [Api set: 1.1] */ readonly hyperlinks: Visio.HyperlinkCollection; /** * Returns the Shape's Data Section. * * @remarks * [Api set: 1.1] */ readonly shapeDataItems: Visio.ShapeDataItemCollection; /** * Gets SubShape Collection. * * @remarks * [Api set: 1.1] */ readonly subShapes: Visio.ShapeCollection; /** * Returns the view of the shape. * * @remarks * [Api set: 1.1] */ readonly view: Visio.ShapeView; /** * Shape's identifier. * * @remarks * [Api set: 1.1] */ readonly id: number; /** * Shape's name. * * @remarks * [Api set: 1.1] */ readonly name: string; /** * Returns true, if shape is selected. User can set true to select the shape explicitly. * * @remarks * [Api set: 1.1] */ select: boolean; /** * Shape's text. * * @remarks * [Api set: 1.1] */ readonly text: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.Shape): void; /** * Returns the BoundingBox object that specifies bounding box of the shape. * * @remarks * [Api set: 1.1] */ getBounds(): OfficeExtension.ClientResult; /** * Returns the AbsoluteBoundingBox object that specifies absolute bounding box of the shape. * * @remarks * [Api set: 1.1] */ getAbsoluteBounds(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.ShapeLoadOptions): Visio.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Shape; /** * 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 Visio.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.ShapeData; /** * Set mock data */ setMockData(data: Visio.Interfaces.ShapeData): void; } /** * Represents the ShapeView class. * * @remarks * [Api set: 1.1] */ class ShapeView extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the highlight around the shape. * * @remarks * [Api set: 1.1] */ highlight: Visio.Highlight; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.ShapeViewUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.ShapeView): void; /** * Adds an overlay on top of the shape. * * @remarks * [Api set: 1.1] * * @param OverlayType An Overlay Type. Can be 'Text', 'Image' or 'Html'. * @param Content Content of Overlay. * @param OverlayHorizontalAlignment Horizontal Alignment of Overlay. Can be 'Left', 'Center', or 'Right'. * @param OverlayVerticalAlignment Vertical Alignment of Overlay. Can be 'Top', 'Middle', 'Bottom'. * @param Width Overlay Width. * @param Height Overlay Height. */ addOverlay(OverlayType: Visio.OverlayType, Content: string, OverlayHorizontalAlignment: Visio.OverlayHorizontalAlignment, OverlayVerticalAlignment: Visio.OverlayVerticalAlignment, Width: number, Height: number): OfficeExtension.ClientResult; /** * Adds an overlay on top of the shape. * * @remarks * [Api set: 1.1] * * @param OverlayType An Overlay Type. Can be 'Text', 'Image' or 'Html'. * @param Content Content of Overlay. * @param OverlayHorizontalAlignment Horizontal Alignment of Overlay. Can be 'Left', 'Center', or 'Right'. * @param OverlayVerticalAlignment Vertical Alignment of Overlay. Can be 'Top', 'Middle', 'Bottom'. * @param Width Overlay Width. * @param Height Overlay Height. */ addOverlay(OverlayType: "Text" | "Image" | "Html", Content: string, OverlayHorizontalAlignment: "Left" | "Center" | "Right", OverlayVerticalAlignment: "Top" | "Middle" | "Bottom", Width: number, Height: number): OfficeExtension.ClientResult; /** * Removes particular overlay or all overlays on the Shape. * * @remarks * [Api set: 1.1] * * @param OverlayId An Overlay Id. Removes the specific overlay id from the shape. */ removeOverlay(OverlayId: number): void; /** * The purpose of SetText API is to update the text inside a Visio Shape in run time. The updated text retains the existing formatting properties of the shape's text. * * @remarks * [Api set: 1.1] * * @param Text Text parameter is the updated text to display on the shape. */ setText(Text: string): void; /** * Shows particular overlay on the Shape. * * @remarks * [Api set: 1.1] * * @param overlayId The overlay ID in context. * @param show Whether to show the overlay. */ showOverlay(overlayId: number, show: boolean): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.ShapeViewLoadOptions): Visio.ShapeView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.ShapeView; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.ShapeView; /** * 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 Visio.ShapeView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeViewData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.ShapeViewData; /** * Set mock data */ setMockData(data: Visio.Interfaces.ShapeViewData): void; } /** * Represents the Position of the object in the view. * * @remarks * [Api set: 1.1] */ interface Position { /** * An integer that specifies the x-coordinate of the object, which is the signed value of the distance in pixels from the viewport's center to the left boundary of the page. * * @remarks * [Api set: 1.1] */ x: number; /** * An integer that specifies the y-coordinate of the object, which is the signed value of the distance in pixels from the viewport's center to the top boundary of the page. * * @remarks * [Api set: 1.1] */ y: number; } /** * Represents the BoundingBox of the shape. * * @remarks * [Api set: 1.1] */ interface BoundingBox { /** * The distance between the top and bottom edges of the bounding box of the shape, excluding any data graphics associated with the shape. * * @remarks * [Api set: 1.1] */ height: number; /** * The distance between the left and right edges of the bounding box of the shape, excluding any data graphics associated with the shape. * * @remarks * [Api set: 1.1] */ width: number; /** * An integer that specifies the x-coordinate of the bounding box. * * @remarks * [Api set: 1.1] */ x: number; /** * An integer that specifies the y-coordinate of the bounding box. * * @remarks * [Api set: 1.1] */ y: number; } /** * Represents the highlight data added to the shape. * * @remarks * [Api set: 1.1] */ interface Highlight { /** * A string that specifies the color of the highlight. It must have the form "#RRGGBB", where each letter represents a hexadecimal digit between 0 and F, and where RR is the red value between 0 and 0xFF (255), GG the green value between 0 and 0xFF (255), and BB is the blue value between 0 and 0xFF (255). * * @remarks * [Api set: 1.1] */ color: string; /** * A positive integer that specifies the width of the highlight's stroke in pixels. * * @remarks * [Api set: 1.1] */ width: number; } /** * Represents the ShapeDataItemCollection for a given Shape. * * @remarks * [Api set: 1.1] */ class ShapeDataItemCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.ShapeDataItem[]; /** * Gets the number of Shape Data Items. * * @remarks * [Api set: 1.1] */ getCount(): OfficeExtension.ClientResult; /** * Gets the ShapeDataItem using its name. * * @remarks * [Api set: 1.1] * * @param key Key is the name of the ShapeDataItem to be retrieved. */ getItem(key: string): Visio.ShapeDataItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.ShapeDataItemCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeDataItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.ShapeDataItemCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.ShapeDataItemCollection; /** * 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 `Visio.ShapeDataItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Visio.Interfaces.ShapeDataItemCollectionData; /** * Set mock data */ setMockData(data: Visio.Interfaces.ShapeDataItemCollectionData): void; } /** * Represents the ShapeDataItem. * * @remarks * [Api set: 1.1] */ class ShapeDataItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * A string that specifies the format of the shape data item. * * @remarks * [Api set: 1.1] */ readonly format: string; /** * A string that specifies the formatted value of the shape data item. * * @remarks * [Api set: 1.1] */ readonly formattedValue: string; /** * A string that specifies the label of the shape data item. * * @remarks * [Api set: 1.1] */ readonly label: string; /** * A string that specifies the value of the shape data item. * * @remarks * [Api set: 1.1] */ readonly value: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.ShapeDataItemLoadOptions): Visio.ShapeDataItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.ShapeDataItem; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.ShapeDataItem; /** * 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 Visio.ShapeDataItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.ShapeDataItemData; /** * Set mock data */ setMockData(data: Visio.Interfaces.ShapeDataItemData): void; } /** * Represents the Hyperlink Collection. * * @remarks * [Api set: 1.1] */ class HyperlinkCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Hyperlink[]; /** * Gets the number of hyperlinks. * * @remarks * [Api set: 1.1] */ getCount(): OfficeExtension.ClientResult; /** * Gets a Hyperlink using its key (name or Id). * * @remarks * [Api set: 1.1] * * @param Key Key is the name or index of the Hyperlink to be retrieved. */ getItem(Key: number | string): Visio.Hyperlink; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.HyperlinkCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.HyperlinkCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.HyperlinkCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.HyperlinkCollection; /** * 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 `Visio.HyperlinkCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Visio.Interfaces.HyperlinkCollectionData; /** * Set mock data */ setMockData(data: Visio.Interfaces.HyperlinkCollectionData): void; } /** * Represents the Hyperlink. * * @remarks * [Api set: 1.1] */ class Hyperlink extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ readonly address: string; /** * Gets the description of a hyperlink. * * @remarks * [Api set: 1.1] */ readonly description: string; /** * Gets the extra URL request information used to resolve the hyperlink's URL. * * @remarks * [Api set: 1.1] */ readonly extraInfo: string; /** * Gets the sub-address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ readonly subAddress: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.HyperlinkLoadOptions): Visio.Hyperlink; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.Hyperlink; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Hyperlink; /** * 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 Visio.Hyperlink object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.HyperlinkData; /** * Set mock data */ setMockData(data: Visio.Interfaces.HyperlinkData): void; } /** * Represents the CommentCollection for a given Shape. * * @remarks * [Api set: 1.1] */ class CommentCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Comment[]; /** * Gets the number of Comments. * * @remarks * [Api set: 1.1] */ getCount(): OfficeExtension.ClientResult; /** * Gets the Comment using its name. * * @remarks * [Api set: 1.1] * * @param key Key is the name of the Comment to be retrieved. */ getItem(key: string): Visio.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.CommentCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.CommentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.CommentCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.CommentCollection; /** * 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 `Visio.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): Visio.Interfaces.CommentCollectionData; /** * Set mock data */ setMockData(data: Visio.Interfaces.CommentCollectionData): void; } /** * Represents the Comment. * * @remarks * [Api set: 1.1] */ class Comment extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * A string that specifies the name of the author of the comment. * * @remarks * [Api set: 1.1] */ author: string; /** * A string that specifies the date when the comment was created. * * @remarks * [Api set: 1.1] */ date: string; /** * A string that contains the comment text. * * @remarks * [Api set: 1.1] */ text: string; /** * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. */ set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Visio.Comment): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: Visio.Interfaces.CommentLoadOptions): Visio.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.Comment; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Comment; /** * 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 Visio.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.CommentData; /** * Set mock data */ setMockData(data: Visio.Interfaces.CommentData): void; } /** * Represents the Selection in the page. * * @remarks * [Api set: 1.1] */ class Selection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the Shapes of the Selection. * * @remarks * [Api set: 1.1] */ readonly shapes: Visio.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): Visio.Selection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Selection; /** * 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 Visio.Selection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.SelectionData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): Visio.Interfaces.SelectionData; } /** * Represents the Horizontal Alignment of the Overlay relative to the shape. * * @remarks * [Api set: 1.1] */ enum OverlayHorizontalAlignment { /** * @remarks * [Api set: 1.1] */ left = "Left", /** * @remarks * [Api set: 1.1] */ center = "Center", /** * @remarks * [Api set: 1.1] */ right = "Right", } /** * Represents the Vertical Alignment of the Overlay relative to the shape. * * @remarks * [Api set: 1.1] */ enum OverlayVerticalAlignment { /** * @remarks * [Api set: 1.1] */ top = "Top", /** * @remarks * [Api set: 1.1] */ middle = "Middle", /** * @remarks * [Api set: 1.1] */ bottom = "Bottom", } /** * Represents the type of the overlay. * * @remarks * [Api set: 1.1] */ enum OverlayType { /** * @remarks * [Api set: 1.1] */ text = "Text", /** * @remarks * [Api set: 1.1] */ image = "Image", /** * @remarks * [Api set: 1.1] */ html = "Html", } /** * Toolbar IDs of the app. * * @remarks * [Api set: 1.1] */ enum ToolBarType { /** * The command toolbar type. * @remarks * [Api set: 1.1] */ commandBar = "CommandBar", /** * The page navigation toolbar type. * @remarks * [Api set: 1.1] */ pageNavigationBar = "PageNavigationBar", /** * The status toolbar type. * @remarks * [Api set: 1.1] */ statusBar = "StatusBar", } /** * Result of Data Visualizer Diagram operations. * * @remarks * [Api set: 1.1] */ enum DataVisualizerDiagramResultType { /** * Operation is successful. * @remarks * [Api set: 1.1] */ success = "Success", /** * Unexpected error during operation. * @remarks * [Api set: 1.1] */ unexpected = "Unexpected", /** * Validation error in operation. * @remarks * [Api set: 1.1] */ validationError = "ValidationError", /** * Conflict error in operation. * @remarks * [Api set: 1.1] */ conflictError = "ConflictError", } /** * Type of the Data Visualizer Diagram operation * * @remarks * [Api set: 1.1] */ enum DataVisualizerDiagramOperationType { /** * Unknown operation type. * @remarks * [Api set: 1.1] */ unknown = "Unknown", /** * Creation operation. * @remarks * [Api set: 1.1] */ create = "Create", /** * Update Mappings operation. * @remarks * [Api set: 1.1] */ updateMappings = "UpdateMappings", /** * Update data associated with diagram. * @remarks * [Api set: 1.1] */ updateData = "UpdateData", /** * Update both data and mappings. * @remarks * [Api set: 1.1] */ update = "Update", /** * Delete the diagram content. * @remarks * [Api set: 1.1] */ delete = "Delete", } /** * DiagramType for Data Visualizer diagrams. * * @remarks * [Api set: 1.1] */ enum DataVisualizerDiagramType { /** * @remarks * [Api set: 1.1] */ unknown = "Unknown", /** * @remarks * [Api set: 1.1] */ basicFlowchart = "BasicFlowchart", /** * @remarks * [Api set: 1.1] */ crossFunctionalFlowchart_Horizontal = "CrossFunctionalFlowchart_Horizontal", /** * @remarks * [Api set: 1.1] */ crossFunctionalFlowchart_Vertical = "CrossFunctionalFlowchart_Vertical", /** * @remarks * [Api set: 1.1] */ audit = "Audit", /** * @remarks * [Api set: 1.1] */ orgChart = "OrgChart", /** * @remarks * [Api set: 1.1] */ network = "Network", } /** * Represents the type of column values. * * @remarks * [Api set: 1.1] */ enum ColumnType { /** * @remarks * [Api set: 1.1] */ unknown = "Unknown", /** * @remarks * [Api set: 1.1] */ string = "String", /** * @remarks * [Api set: 1.1] */ number = "Number", /** * @remarks * [Api set: 1.1] */ date = "Date", /** * @remarks * [Api set: 1.1] */ currency = "Currency", } /** * Represents the type of source for the data connection. * * @remarks * [Api set: 1.1] */ enum DataSourceType { /** * Unknown Data Source. * @remarks * [Api set: 1.1] */ unknown = "Unknown", /** * Microsoft Excel workbook. * @remarks * [Api set: 1.1] */ excel = "Excel", } /** * Represents the orientation of the Cross Functional Flowchart diagram. * * @remarks * [Api set: 1.1] */ enum CrossFunctionalFlowchartOrientation { /** * Horizontal Cross Functional Flowchart. * @remarks * [Api set: 1.1] */ horizontal = "Horizontal", /** * Vertical Cross Functional Flowchart. * @remarks * [Api set: 1.1] */ vertical = "Vertical", } /** * Represents the type of layout. * * @remarks * [Api set: 1.1] */ enum LayoutVariant { /** * Invalid layout. * @remarks * [Api set: 1.1] */ unknown = "Unknown", /** * Use the Page default layout. * @remarks * [Api set: 1.1] */ pageDefault = "PageDefault", /** * Use Flowchart with TopToBottom orientation. * @remarks * [Api set: 1.1] */ flowchart_TopToBottom = "Flowchart_TopToBottom", /** * Use Flowchart with BottomToTop orientation. * @remarks * [Api set: 1.1] */ flowchart_BottomToTop = "Flowchart_BottomToTop", /** * Use Flowchart with LeftToRight orientation. * @remarks * [Api set: 1.1] */ flowchart_LeftToRight = "Flowchart_LeftToRight", /** * Use Flowchart with RightToLeft orientation. * @remarks * [Api set: 1.1] */ flowchart_RightToLeft = "Flowchart_RightToLeft", /** * Use WideTree with DownThenRight orientation. * @remarks * [Api set: 1.1] */ wideTree_DownThenRight = "WideTree_DownThenRight", /** * Use WideTree with DownThenLeft orientation. * @remarks * [Api set: 1.1] */ wideTree_DownThenLeft = "WideTree_DownThenLeft", /** * Use WideTree with RightThenDown orientation. * @remarks * [Api set: 1.1] */ wideTree_RightThenDown = "WideTree_RightThenDown", /** * Use WideTree with LeftThenDown orientation. * @remarks * [Api set: 1.1] */ wideTree_LeftThenDown = "WideTree_LeftThenDown", } /** * Represents the types of data validation error. * * @remarks * [Api set: 1.1] */ enum DataValidationErrorType { /** * No error. * @remarks * [Api set: 1.1] */ none = "None", /** * Data does not have one of the mapped column. * @remarks * [Api set: 1.1] */ columnNotMapped = "ColumnNotMapped", /** * UniqueId column has error. * @remarks * [Api set: 1.1] */ uniqueIdColumnError = "UniqueIdColumnError", /** * Swim-lane column is empty. * @remarks * [Api set: 1.1] */ swimlaneColumnError = "SwimlaneColumnError", /** * Delimiter can not have more then one character. * @remarks * [Api set: 1.1] */ delimiterError = "DelimiterError", /** * Connector column has error. * @remarks * [Api set: 1.1] */ connectorColumnError = "ConnectorColumnError", /** * Connector column is already mapped to another setting. * @remarks * [Api set: 1.1] */ connectorColumnMappedElsewhere = "ConnectorColumnMappedElsewhere", /** * Connector label column already mapped to other setting. * @remarks * [Api set: 1.1] */ connectorLabelColumnMappedElsewhere = "ConnectorLabelColumnMappedElsewhere", /** * Connector column and connector label column are already mapped to other setting. * @remarks * [Api set: 1.1] */ connectorColumnAndConnectorLabelMappedElsewhere = "ConnectorColumnAndConnectorLabelMappedElsewhere", } /** * Direction of connector in DataVisualizer diagram. * * @remarks * [Api set: 1.1] */ enum ConnectorDirection { /** * Direction will be from target to source shape. * @remarks * [Api set: 1.1] */ fromTarget = "FromTarget", /** * Direction will be from source to target shape. * @remarks * [Api set: 1.1] */ toTarget = "ToTarget", } /** * TaskPaneType represents the types of the First Party TaskPanes that are supported by Host through APIs. Used in case of Show TaskPane API, TaskPane State Changed, or similar events. * * @remarks * [Api set: 1.1] */ enum TaskPaneType { /** * No task pane. * @remarks * [Api set: 1.1] */ none = "None", /** * Data Visualizer Process Mapping pane. * @remarks * [Api set: 1.1] */ dataVisualizerProcessMappings = "DataVisualizerProcessMappings", /** * Data Visualizer Organization Mapping pane. * @remarks * [Api set: 1.1] */ dataVisualizerOrgChartMappings = "DataVisualizerOrgChartMappings", } /** * MessageType represents the type of message when event is fired from Host. * * @remarks * [Api set: 1.1] */ enum MessageType { /** * No message. * @remarks * [Api set: 1.1] */ none = 0, /** * DataVisualizer diagram operation complete Event Message. * @remarks * [Api set: 1.1] */ dataVisualizerDiagramOperationCompletedEvent = 1, } /** * EventType represents the type of the events Host supports. * * @remarks * [Api set: 1.1] */ enum EventType { /** * DataVisualizer diagram operation complete Event. * @remarks * [Api set: 1.1] */ dataVisualizerDiagramOperationCompleted = "DataVisualizerDiagramOperationCompleted", } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", invalidArgument = "InvalidArgument", itemNotFound = "ItemNotFound", notImplemented = "NotImplemented", unsupportedOperation = "UnsupportedOperation", } namespace Interfaces { /** * Provides ways to load properties of only a subset of members of a collection. */ interface CollectionLoadOptions { /** * Specify the number of items in the queried collection to be included in the result. */ $top?: number; /** * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. */ $skip?: number; } /** An interface for updating data on the Application object, for use in `application.set({ ... })`. */ interface ApplicationUpdateData { /** * Shows or hides the iframe application borders. * * @remarks * [Api set: 1.1] */ showBorders?: boolean; /** * Shows or hides the standard toolbars. * * @remarks * [Api set: 1.1] */ showToolbars?: boolean; } /** An interface for updating data on the Document object, for use in `document.set({ ... })`. */ interface DocumentUpdateData { /** * Represents a Visio application instance that contains this document. * * @remarks * [Api set: 1.1] */ application?: Visio.Interfaces.ApplicationUpdateData; /** * Returns the DocumentView object. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.DocumentViewUpdateData; } /** An interface for updating data on the DocumentView object, for use in `documentView.set({ ... })`. */ interface DocumentViewUpdateData { /** * Disable Hyperlinks. * * @remarks * [Api set: 1.1] */ disableHyperlinks?: boolean; /** * Disable Pan. * * @remarks * [Api set: 1.1] */ disablePan?: boolean; /** * Disable PanZoomWindow. * * @remarks * [Api set: 1.1] */ disablePanZoomWindow?: boolean; /** * Disable Zoom. * * @remarks * [Api set: 1.1] */ disableZoom?: boolean; /** * Hide Diagram Boundary. * * @remarks * [Api set: 1.1] */ hideDiagramBoundary?: boolean; } /** An interface for updating data on the Page object, for use in `page.set({ ... })`. */ interface PageUpdateData { /** * Returns the view of the page. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.PageViewUpdateData; } /** An interface for updating data on the PageView object, for use in `pageView.set({ ... })`. */ interface PageViewUpdateData { /** * Gets and sets the page's zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. * * @remarks * [Api set: 1.1] */ zoom?: number; } /** An interface for updating data on the PageCollection object, for use in `pageCollection.set({ ... })`. */ interface PageCollectionUpdateData { items?: Visio.Interfaces.PageData[]; } /** An interface for updating data on the ShapeCollection object, for use in `shapeCollection.set({ ... })`. */ interface ShapeCollectionUpdateData { items?: Visio.Interfaces.ShapeData[]; } /** An interface for updating data on the Shape object, for use in `shape.set({ ... })`. */ interface ShapeUpdateData { /** * Returns the view of the shape. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.ShapeViewUpdateData; /** * Returns true, if shape is selected. User can set true to select the shape explicitly. * * @remarks * [Api set: 1.1] */ select?: boolean; } /** An interface for updating data on the ShapeView object, for use in `shapeView.set({ ... })`. */ interface ShapeViewUpdateData { /** * Represents the highlight around the shape. * * @remarks * [Api set: 1.1] */ highlight?: Visio.Highlight; } /** An interface for updating data on the ShapeDataItemCollection object, for use in `shapeDataItemCollection.set({ ... })`. */ interface ShapeDataItemCollectionUpdateData { items?: Visio.Interfaces.ShapeDataItemData[]; } /** An interface for updating data on the HyperlinkCollection object, for use in `hyperlinkCollection.set({ ... })`. */ interface HyperlinkCollectionUpdateData { items?: Visio.Interfaces.HyperlinkData[]; } /** An interface for updating data on the CommentCollection object, for use in `commentCollection.set({ ... })`. */ interface CommentCollectionUpdateData { items?: Visio.Interfaces.CommentData[]; } /** An interface for updating data on the Comment object, for use in `comment.set({ ... })`. */ interface CommentUpdateData { /** * A string that specifies the name of the author of the comment. * * @remarks * [Api set: 1.1] */ author?: string; /** * A string that specifies the date when the comment was created. * * @remarks * [Api set: 1.1] */ date?: string; /** * A string that contains the comment text. * * @remarks * [Api set: 1.1] */ text?: string; } /** An interface describing the data returned by calling `application.toJSON()`. */ interface ApplicationData { /** * Shows or hides the iframe application borders. * * @remarks * [Api set: 1.1] */ showBorders?: boolean; /** * Shows or hides the standard toolbars. * * @remarks * [Api set: 1.1] */ showToolbars?: boolean; } /** An interface describing the data returned by calling `document.toJSON()`. */ interface DocumentData { /** * Represents a Visio application instance that contains this document. * * @remarks * [Api set: 1.1] */ application?: Visio.Interfaces.ApplicationData; /** * Represents a collection of pages associated with the document. * * @remarks * [Api set: 1.1] */ pages?: Visio.Interfaces.PageData[]; /** * Returns the DocumentView object. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.DocumentViewData; } /** An interface describing the data returned by calling `documentView.toJSON()`. */ interface DocumentViewData { /** * Disable Hyperlinks. * * @remarks * [Api set: 1.1] */ disableHyperlinks?: boolean; /** * Disable Pan. * * @remarks * [Api set: 1.1] */ disablePan?: boolean; /** * Disable PanZoomWindow. * * @remarks * [Api set: 1.1] */ disablePanZoomWindow?: boolean; /** * Disable Zoom. * * @remarks * [Api set: 1.1] */ disableZoom?: boolean; /** * Hide Diagram Boundary. * * @remarks * [Api set: 1.1] */ hideDiagramBoundary?: boolean; } /** An interface describing the data returned by calling `page.toJSON()`. */ interface PageData { /** * All shapes in the Page, including subshapes. * * @remarks * [Api set: 1.1] */ allShapes?: Visio.Interfaces.ShapeData[]; /** * Returns the Comments Collection. * * @remarks * [Api set: 1.1] */ comments?: Visio.Interfaces.CommentData[]; /** * All top-level shapes in the Page. * * @remarks * [Api set: 1.1] */ shapes?: Visio.Interfaces.ShapeData[]; /** * Returns the view of the page. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.PageViewData; /** * Returns the height of the page. * * @remarks * [Api set: 1.1] */ height?: number; /** * Index of the Page. * * @remarks * [Api set: 1.1] */ index?: number; /** * Whether the page is a background page or not. * * @remarks * [Api set: 1.1] */ isBackground?: boolean; /** * Page name. * * @remarks * [Api set: 1.1] */ name?: string; /** * Returns the width of the page. * * @remarks * [Api set: 1.1] */ width?: number; } /** An interface describing the data returned by calling `pageView.toJSON()`. */ interface PageViewData { /** * Gets and sets the page's zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. * * @remarks * [Api set: 1.1] */ zoom?: number; } /** An interface describing the data returned by calling `pageCollection.toJSON()`. */ interface PageCollectionData { items?: Visio.Interfaces.PageData[]; } /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ interface ShapeCollectionData { items?: Visio.Interfaces.ShapeData[]; } /** An interface describing the data returned by calling `shape.toJSON()`. */ interface ShapeData { /** * Returns the Comments Collection. * * @remarks * [Api set: 1.1] */ comments?: Visio.Interfaces.CommentData[]; /** * Returns the Hyperlinks collection for a Shape object. * * @remarks * [Api set: 1.1] */ hyperlinks?: Visio.Interfaces.HyperlinkData[]; /** * Returns the Shape's Data Section. * * @remarks * [Api set: 1.1] */ shapeDataItems?: Visio.Interfaces.ShapeDataItemData[]; /** * Gets SubShape Collection. * * @remarks * [Api set: 1.1] */ subShapes?: Visio.Interfaces.ShapeData[]; /** * Returns the view of the shape. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.ShapeViewData; /** * Shape's identifier. * * @remarks * [Api set: 1.1] */ id?: number; /** * Shape's name. * * @remarks * [Api set: 1.1] */ name?: string; /** * Returns true, if shape is selected. User can set true to select the shape explicitly. * * @remarks * [Api set: 1.1] */ select?: boolean; /** * Shape's text. * * @remarks * [Api set: 1.1] */ text?: string; } /** An interface describing the data returned by calling `shapeView.toJSON()`. */ interface ShapeViewData { /** * Represents the highlight around the shape. * * @remarks * [Api set: 1.1] */ highlight?: Visio.Highlight; } /** An interface describing the data returned by calling `shapeDataItemCollection.toJSON()`. */ interface ShapeDataItemCollectionData { items?: Visio.Interfaces.ShapeDataItemData[]; } /** An interface describing the data returned by calling `shapeDataItem.toJSON()`. */ interface ShapeDataItemData { /** * A string that specifies the format of the shape data item. * * @remarks * [Api set: 1.1] */ format?: string; /** * A string that specifies the formatted value of the shape data item. * * @remarks * [Api set: 1.1] */ formattedValue?: string; /** * A string that specifies the label of the shape data item. * * @remarks * [Api set: 1.1] */ label?: string; /** * A string that specifies the value of the shape data item. * * @remarks * [Api set: 1.1] */ value?: string; } /** An interface describing the data returned by calling `hyperlinkCollection.toJSON()`. */ interface HyperlinkCollectionData { items?: Visio.Interfaces.HyperlinkData[]; } /** An interface describing the data returned by calling `hyperlink.toJSON()`. */ interface HyperlinkData { /** * Gets the address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ address?: string; /** * Gets the description of a hyperlink. * * @remarks * [Api set: 1.1] */ description?: string; /** * Gets the extra URL request information used to resolve the hyperlink's URL. * * @remarks * [Api set: 1.1] */ extraInfo?: string; /** * Gets the sub-address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ subAddress?: string; } /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ interface CommentCollectionData { items?: Visio.Interfaces.CommentData[]; } /** An interface describing the data returned by calling `comment.toJSON()`. */ interface CommentData { /** * A string that specifies the name of the author of the comment. * * @remarks * [Api set: 1.1] */ author?: string; /** * A string that specifies the date when the comment was created. * * @remarks * [Api set: 1.1] */ date?: string; /** * A string that contains the comment text. * * @remarks * [Api set: 1.1] */ text?: string; } /** An interface describing the data returned by calling `selection.toJSON()`. */ interface SelectionData { /** * Gets the Shapes of the Selection. * * @remarks * [Api set: 1.1] */ shapes?: Visio.Interfaces.ShapeData[]; } /** * Represents the Application. * * @remarks * [Api set: 1.1] */ interface ApplicationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Shows or hides the iframe application borders. * * @remarks * [Api set: 1.1] */ showBorders?: boolean; /** * Shows or hides the standard toolbars. * * @remarks * [Api set: 1.1] */ showToolbars?: boolean; } /** * Represents the Document class. * * @remarks * [Api set: 1.1] */ interface DocumentLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents a Visio application instance that contains this document. * * @remarks * [Api set: 1.1] */ application?: Visio.Interfaces.ApplicationLoadOptions; /** * Returns the DocumentView object. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.DocumentViewLoadOptions; } /** * Represents the DocumentView class. * * @remarks * [Api set: 1.1] */ interface DocumentViewLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Disable Hyperlinks. * * @remarks * [Api set: 1.1] */ disableHyperlinks?: boolean; /** * Disable Pan. * * @remarks * [Api set: 1.1] */ disablePan?: boolean; /** * Disable PanZoomWindow. * * @remarks * [Api set: 1.1] */ disablePanZoomWindow?: boolean; /** * Disable Zoom. * * @remarks * [Api set: 1.1] */ disableZoom?: boolean; /** * Hide Diagram Boundary. * * @remarks * [Api set: 1.1] */ hideDiagramBoundary?: boolean; } /** * Represents the Page class. * * @remarks * [Api set: 1.1] */ interface PageLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the view of the page. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.PageViewLoadOptions; /** * Returns the height of the page. * * @remarks * [Api set: 1.1] */ height?: boolean; /** * Index of the Page. * * @remarks * [Api set: 1.1] */ index?: boolean; /** * Whether the page is a background page or not. * * @remarks * [Api set: 1.1] */ isBackground?: boolean; /** * Page name. * * @remarks * [Api set: 1.1] */ name?: boolean; /** * Returns the width of the page. * * @remarks * [Api set: 1.1] */ width?: boolean; } /** * Represents the PageView class. * * @remarks * [Api set: 1.1] */ interface PageViewLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets and sets the page's zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. * * @remarks * [Api set: 1.1] */ zoom?: boolean; } /** * Represents a collection of Page objects that are part of the document. * * @remarks * [Api set: 1.1] */ interface PageCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the view of the page. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.PageViewLoadOptions; /** * For EACH ITEM in the collection: Returns the height of the page. * * @remarks * [Api set: 1.1] */ height?: boolean; /** * For EACH ITEM in the collection: Index of the Page. * * @remarks * [Api set: 1.1] */ index?: boolean; /** * For EACH ITEM in the collection: Whether the page is a background page or not. * * @remarks * [Api set: 1.1] */ isBackground?: boolean; /** * For EACH ITEM in the collection: Page name. * * @remarks * [Api set: 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: Returns the width of the page. * * @remarks * [Api set: 1.1] */ width?: boolean; } /** * Represents the Shape Collection. * * @remarks * [Api set: 1.1] */ interface ShapeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the view of the shape. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.ShapeViewLoadOptions; /** * For EACH ITEM in the collection: Shape's identifier. * * @remarks * [Api set: 1.1] */ id?: boolean; /** * For EACH ITEM in the collection: Shape's name. * * @remarks * [Api set: 1.1] */ name?: boolean; /** * For EACH ITEM in the collection: Returns true, if shape is selected. User can set true to select the shape explicitly. * * @remarks * [Api set: 1.1] */ select?: boolean; /** * For EACH ITEM in the collection: Shape's text. * * @remarks * [Api set: 1.1] */ text?: boolean; } /** * Represents the Shape class. * * @remarks * [Api set: 1.1] */ interface ShapeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the view of the shape. * * @remarks * [Api set: 1.1] */ view?: Visio.Interfaces.ShapeViewLoadOptions; /** * Shape's identifier. * * @remarks * [Api set: 1.1] */ id?: boolean; /** * Shape's name. * * @remarks * [Api set: 1.1] */ name?: boolean; /** * Returns true, if shape is selected. User can set true to select the shape explicitly. * * @remarks * [Api set: 1.1] */ select?: boolean; /** * Shape's text. * * @remarks * [Api set: 1.1] */ text?: boolean; } /** * Represents the ShapeView class. * * @remarks * [Api set: 1.1] */ interface ShapeViewLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the highlight around the shape. * * @remarks * [Api set: 1.1] */ highlight?: boolean; } /** * Represents the ShapeDataItemCollection for a given Shape. * * @remarks * [Api set: 1.1] */ interface ShapeDataItemCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: A string that specifies the format of the shape data item. * * @remarks * [Api set: 1.1] */ format?: boolean; /** * For EACH ITEM in the collection: A string that specifies the formatted value of the shape data item. * * @remarks * [Api set: 1.1] */ formattedValue?: boolean; /** * For EACH ITEM in the collection: A string that specifies the label of the shape data item. * * @remarks * [Api set: 1.1] */ label?: boolean; /** * For EACH ITEM in the collection: A string that specifies the value of the shape data item. * * @remarks * [Api set: 1.1] */ value?: boolean; } /** * Represents the ShapeDataItem. * * @remarks * [Api set: 1.1] */ interface ShapeDataItemLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * A string that specifies the format of the shape data item. * * @remarks * [Api set: 1.1] */ format?: boolean; /** * A string that specifies the formatted value of the shape data item. * * @remarks * [Api set: 1.1] */ formattedValue?: boolean; /** * A string that specifies the label of the shape data item. * * @remarks * [Api set: 1.1] */ label?: boolean; /** * A string that specifies the value of the shape data item. * * @remarks * [Api set: 1.1] */ value?: boolean; } /** * Represents the Hyperlink Collection. * * @remarks * [Api set: 1.1] */ interface HyperlinkCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ address?: boolean; /** * For EACH ITEM in the collection: Gets the description of a hyperlink. * * @remarks * [Api set: 1.1] */ description?: boolean; /** * For EACH ITEM in the collection: Gets the extra URL request information used to resolve the hyperlink's URL. * * @remarks * [Api set: 1.1] */ extraInfo?: boolean; /** * For EACH ITEM in the collection: Gets the sub-address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ subAddress?: boolean; } /** * Represents the Hyperlink. * * @remarks * [Api set: 1.1] */ interface HyperlinkLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ address?: boolean; /** * Gets the description of a hyperlink. * * @remarks * [Api set: 1.1] */ description?: boolean; /** * Gets the extra URL request information used to resolve the hyperlink's URL. * * @remarks * [Api set: 1.1] */ extraInfo?: boolean; /** * Gets the sub-address of the Hyperlink object. * * @remarks * [Api set: 1.1] */ subAddress?: boolean; } /** * Represents the CommentCollection for a given Shape. * * @remarks * [Api set: 1.1] */ interface CommentCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: A string that specifies the name of the author of the comment. * * @remarks * [Api set: 1.1] */ author?: boolean; /** * For EACH ITEM in the collection: A string that specifies the date when the comment was created. * * @remarks * [Api set: 1.1] */ date?: boolean; /** * For EACH ITEM in the collection: A string that contains the comment text. * * @remarks * [Api set: 1.1] */ text?: boolean; } /** * Represents the Comment. * * @remarks * [Api set: 1.1] */ interface CommentLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * A string that specifies the name of the author of the comment. * * @remarks * [Api set: 1.1] */ author?: boolean; /** * A string that specifies the date when the comment was created. * * @remarks * [Api set: 1.1] */ date?: boolean; /** * A string that contains the comment text. * * @remarks * [Api set: 1.1] */ text?: boolean; } } } declare namespace Visio { /** * The RequestContext object facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. */ class RequestContext extends OfficeCore.RequestContext { constructor(url?: string | OfficeExtension.EmbeddedSession); readonly document: Document; } /** * Executes a batch script that performs actions on the Visio object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. */ function run(batch: (context: Visio.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Visio object model, using the request context of a previously-created API object. * @param object - A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. */ function run(object: OfficeExtension.ClientObject | OfficeExtension.EmbeddedSession, batch: (context: Visio.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Visio object model, using the request context of previously-created API objects. * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared request context, which means that any changes applied to these objects will be picked up by "context.sync()". * @param batch - A function that takes in a Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. */ function run(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Visio object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param contextObject - A previously-created Visio.RequestContext. This context will get re-used by the batch function (instead of having a new context created). This means that the batch will be able to pick up changes made to existing API objects, if those objects were derived from this same context. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the RequestContext is required to get access to the Visio object model from the add-in. */ function run(contextObject: OfficeExtension.ClientRequestContext, batch: (context: Visio.RequestContext) => Promise): Promise; } //////////////////////////////////////////////////////////////// //////////////////////// End Visio APIs //////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// //////////////////// Begin PowerPoint APIs ///////////////////// //////////////////////////////////////////////////////////////// declare namespace PowerPoint { /** * @remarks * [Api set: PowerPointApi 1.0] */ class Application extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Create a new instance of PowerPoint.Application object */ static newObject(context: OfficeExtension.ClientRequestContext): PowerPoint.Application; /** * 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 PowerPoint.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): { [key: string]: string; }; } /** * @remarks * [Api set: PowerPointApi 1.0] */ class Presentation extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the collection of `SlideMaster` objects that are in the presentation. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly slideMasters: PowerPoint.SlideMasterCollection; /** * Returns an ordered collection of slides in the presentation. * * @remarks * [Api set: PowerPointApi 1.2] */ readonly slides: PowerPoint.SlideCollection; /** * Returns a collection of tags attached to the presentation. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly tags: PowerPoint.TagCollection; /** * Gets the ID of the presentation. * * @remarks * [Api set: PowerPointApi 1.5] */ readonly id: string; readonly title: string; /** * Returns the selected shapes in the current slide of the presentation. If no shapes are selected, an empty collection is returned. * * @remarks * [Api set: PowerPointApi 1.5] */ getSelectedShapes(): PowerPoint.ShapeScopedCollection; /** * Returns the selected slides in the current view of the presentation. The first item in the collection is the active slide that is visible in the editing area. If no slides are selected, an empty collection is returned. * * @remarks * [Api set: PowerPointApi 1.5] */ getSelectedSlides(): PowerPoint.SlideScopedCollection; /** * Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation. Throws an exception if no text is selected. * * @remarks * [Api set: PowerPointApi 1.5] */ getSelectedTextRange(): PowerPoint.TextRange; /** * Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation. If no text is selected, an object with an `isNullObject` property set to `true` is returned. * * @remarks * [Api set: PowerPointApi 1.5] */ getSelectedTextRangeOrNullObject(): PowerPoint.TextRange; /** * Inserts the specified slides from a presentation into the current presentation. * * @remarks * [Api set: PowerPointApi 1.2] * * @param base64File The base64-encoded string representing the source presentation file. * @param options The options that define which slides will be inserted, where the new slides will go, and which presentation's formatting will be used. */ insertSlidesFromBase64(base64File: string, options?: PowerPoint.InsertSlideOptions): void; /** * Selects the slides in the current view of the presentation. Existing slide selection is replaced with the new selection. * * @remarks * [Api set: PowerPointApi 1.5] * * @param slideIds List of slide IDs to select in the presentation. If the list is empty, selection is cleared. */ setSelectedSlides(slideIds: string[]): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.PresentationLoadOptions): PowerPoint.Presentation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.Presentation; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.Presentation; /** * 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 PowerPoint.Presentation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.PresentationData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.PresentationData; } /** * Represents the available options when adding a new slide. * * @remarks * [Api set: PowerPointApi 1.3] */ interface AddSlideOptions { /** * Specifies the ID of a Slide Layout to be used for the new slide. If no `layoutId` is provided, but a `slideMasterId` is provided, then the ID of the first layout from the specified Slide Master will be used. If no `slideMasterId` is provided, but a `layoutId` is provided, then the specified layout needs to be available for the default Slide Master (as specified in the `slideMasterId` description). Otherwise, an error will be thrown. * * @remarks * [Api set: PowerPointApi 1.3] */ layoutId?: string; /** * Specifies the ID of a Slide Master to be used for the new slide. If no `slideMasterId` is provided, then the previous slide's Slide Master will be used. If there is no previous slide, then the presentation's first Slide Master will be used. * * @remarks * [Api set: PowerPointApi 1.3] */ slideMasterId?: string; } /** * Specifies the connector type for line shapes. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ConnectorType { /** * Straight connector type * @remarks * [Api set: PowerPointApi 1.4] */ straight = "Straight", /** * Elbow connector type * @remarks * [Api set: PowerPointApi 1.4] */ elbow = "Elbow", /** * Curve connector type * @remarks * [Api set: PowerPointApi 1.4] */ curve = "Curve", } /** * Specifies the shape type for a `GeometricShape` object. * * @remarks * [Api set: PowerPointApi 1.4] */ enum GeometricShapeType { /** * Straight Line from Top-Right Corner to Bottom-Left Corner of the Shape * @remarks * [Api set: PowerPointApi 1.4] */ lineInverse = "LineInverse", /** * Isosceles Triangle * @remarks * [Api set: PowerPointApi 1.4] */ triangle = "Triangle", /** * Right Triangle * @remarks * [Api set: PowerPointApi 1.4] */ rightTriangle = "RightTriangle", /** * Rectangle * @remarks * [Api set: PowerPointApi 1.4] */ rectangle = "Rectangle", /** * Diamond * @remarks * [Api set: PowerPointApi 1.4] */ diamond = "Diamond", /** * Parallelogram * @remarks * [Api set: PowerPointApi 1.4] */ parallelogram = "Parallelogram", /** * Trapezoid * @remarks * [Api set: PowerPointApi 1.4] */ trapezoid = "Trapezoid", /** * Trapezoid which may have Non-Equal Sides * @remarks * [Api set: PowerPointApi 1.4] */ nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", /** * Pentagon * @remarks * [Api set: PowerPointApi 1.4] */ pentagon = "Pentagon", /** * Hexagon * @remarks * [Api set: PowerPointApi 1.4] */ hexagon = "Hexagon", /** * Heptagon * @remarks * [Api set: PowerPointApi 1.4] */ heptagon = "Heptagon", /** * Octagon * @remarks * [Api set: PowerPointApi 1.4] */ octagon = "Octagon", /** * Decagon * @remarks * [Api set: PowerPointApi 1.4] */ decagon = "Decagon", /** * Dodecagon * @remarks * [Api set: PowerPointApi 1.4] */ dodecagon = "Dodecagon", /** * Star: 4 Points * @remarks * [Api set: PowerPointApi 1.4] */ star4 = "Star4", /** * Star: 5 Points * @remarks * [Api set: PowerPointApi 1.4] */ star5 = "Star5", /** * Star: 6 Points * @remarks * [Api set: PowerPointApi 1.4] */ star6 = "Star6", /** * Star: 7 Points * @remarks * [Api set: PowerPointApi 1.4] */ star7 = "Star7", /** * Star: 8 Points * @remarks * [Api set: PowerPointApi 1.4] */ star8 = "Star8", /** * Star: 10 Points * @remarks * [Api set: PowerPointApi 1.4] */ star10 = "Star10", /** * Star: 12 Points * @remarks * [Api set: PowerPointApi 1.4] */ star12 = "Star12", /** * Star: 16 Points * @remarks * [Api set: PowerPointApi 1.4] */ star16 = "Star16", /** * Star: 24 Points * @remarks * [Api set: PowerPointApi 1.4] */ star24 = "Star24", /** * Star: 32 Points * @remarks * [Api set: PowerPointApi 1.4] */ star32 = "Star32", /** * Rectangle: Rounded Corners * @remarks * [Api set: PowerPointApi 1.4] */ roundRectangle = "RoundRectangle", /** * Rectangle: Single Corner Rounded * @remarks * [Api set: PowerPointApi 1.4] */ round1Rectangle = "Round1Rectangle", /** * Rectangle: Top Corners Rounded * @remarks * [Api set: PowerPointApi 1.4] */ round2SameRectangle = "Round2SameRectangle", /** * Rectangle: Diagonal Corners Rounded * @remarks * [Api set: PowerPointApi 1.4] */ round2DiagonalRectangle = "Round2DiagonalRectangle", /** * Rectangle: Top Corners One Rounded and One Snipped * @remarks * [Api set: PowerPointApi 1.4] */ snipRoundRectangle = "SnipRoundRectangle", /** * Rectangle: Single Corner Snipped * @remarks * [Api set: PowerPointApi 1.4] */ snip1Rectangle = "Snip1Rectangle", /** * Rectangle: Top Corners Snipped * @remarks * [Api set: PowerPointApi 1.4] */ snip2SameRectangle = "Snip2SameRectangle", /** * Rectangle: Diagonal Corners Snipped * @remarks * [Api set: PowerPointApi 1.4] */ snip2DiagonalRectangle = "Snip2DiagonalRectangle", /** * Plaque * @remarks * [Api set: PowerPointApi 1.4] */ plaque = "Plaque", /** * Oval * @remarks * [Api set: PowerPointApi 1.4] */ ellipse = "Ellipse", /** * Teardrop * @remarks * [Api set: PowerPointApi 1.4] */ teardrop = "Teardrop", /** * Arrow: Pentagon * @remarks * [Api set: PowerPointApi 1.4] */ homePlate = "HomePlate", /** * Arrow: Chevron * @remarks * [Api set: PowerPointApi 1.4] */ chevron = "Chevron", /** * Partial Circle * @remarks * [Api set: PowerPointApi 1.4] */ pieWedge = "PieWedge", /** * Partial Circle with Adjustable Spanning Area * @remarks * [Api set: PowerPointApi 1.4] */ pie = "Pie", /** * Block Arc * @remarks * [Api set: PowerPointApi 1.4] */ blockArc = "BlockArc", /** * Circle: Hollow * @remarks * [Api set: PowerPointApi 1.4] */ donut = "Donut", /** * "Not Allowed" Symbol * @remarks * [Api set: PowerPointApi 1.4] */ noSmoking = "NoSmoking", /** * Arrow: Right * @remarks * [Api set: PowerPointApi 1.4] */ rightArrow = "RightArrow", /** * Arrow: Left * @remarks * [Api set: PowerPointApi 1.4] */ leftArrow = "LeftArrow", /** * Arrow: Up * @remarks * [Api set: PowerPointApi 1.4] */ upArrow = "UpArrow", /** * Arrow: Down * @remarks * [Api set: PowerPointApi 1.4] */ downArrow = "DownArrow", /** * Arrow: Striped Right * @remarks * [Api set: PowerPointApi 1.4] */ stripedRightArrow = "StripedRightArrow", /** * Arrow: Notched Right * @remarks * [Api set: PowerPointApi 1.4] */ notchedRightArrow = "NotchedRightArrow", /** * Arrow: Bent-Up * @remarks * [Api set: PowerPointApi 1.4] */ bentUpArrow = "BentUpArrow", /** * Arrow: Left-Right * @remarks * [Api set: PowerPointApi 1.4] */ leftRightArrow = "LeftRightArrow", /** * Arrow: Up-Down * @remarks * [Api set: PowerPointApi 1.4] */ upDownArrow = "UpDownArrow", /** * Arrow: Left-Up * @remarks * [Api set: PowerPointApi 1.4] */ leftUpArrow = "LeftUpArrow", /** * Arrow: Left-Right-Up * @remarks * [Api set: PowerPointApi 1.4] */ leftRightUpArrow = "LeftRightUpArrow", /** * Arrow: Quad * @remarks * [Api set: PowerPointApi 1.4] */ quadArrow = "QuadArrow", /** * Callout: Left Arrow * @remarks * [Api set: PowerPointApi 1.4] */ leftArrowCallout = "LeftArrowCallout", /** * Callout: Right Arrow * @remarks * [Api set: PowerPointApi 1.4] */ rightArrowCallout = "RightArrowCallout", /** * Callout: Up Arrow * @remarks * [Api set: PowerPointApi 1.4] */ upArrowCallout = "UpArrowCallout", /** * Callout: Down Arrow * @remarks * [Api set: PowerPointApi 1.4] */ downArrowCallout = "DownArrowCallout", /** * Callout: Left-Right Arrow * @remarks * [Api set: PowerPointApi 1.4] */ leftRightArrowCallout = "LeftRightArrowCallout", /** * Callout: Up-Down Arrow * @remarks * [Api set: PowerPointApi 1.4] */ upDownArrowCallout = "UpDownArrowCallout", /** * Callout: Quad Arrow * @remarks * [Api set: PowerPointApi 1.4] */ quadArrowCallout = "QuadArrowCallout", /** * Arrow: Bent * @remarks * [Api set: PowerPointApi 1.4] */ bentArrow = "BentArrow", /** * Arrow: U-Turn * @remarks * [Api set: PowerPointApi 1.4] */ uturnArrow = "UturnArrow", /** * Arrow: Circular * @remarks * [Api set: PowerPointApi 1.4] */ circularArrow = "CircularArrow", /** * Arrow: Circular with Opposite Arrow Direction * @remarks * [Api set: PowerPointApi 1.4] */ leftCircularArrow = "LeftCircularArrow", /** * Arrow: Circular with Two Arrows in Both Directions * @remarks * [Api set: PowerPointApi 1.4] */ leftRightCircularArrow = "LeftRightCircularArrow", /** * Arrow: Curved Right * @remarks * [Api set: PowerPointApi 1.4] */ curvedRightArrow = "CurvedRightArrow", /** * Arrow: Curved Left * @remarks * [Api set: PowerPointApi 1.4] */ curvedLeftArrow = "CurvedLeftArrow", /** * Arrow: Curved Up * @remarks * [Api set: PowerPointApi 1.4] */ curvedUpArrow = "CurvedUpArrow", /** * Arrow: Curved Down * @remarks * [Api set: PowerPointApi 1.4] */ curvedDownArrow = "CurvedDownArrow", /** * Arrow: Curved Right Arrow with Varying Width * @remarks * [Api set: PowerPointApi 1.4] */ swooshArrow = "SwooshArrow", /** * Cube * @remarks * [Api set: PowerPointApi 1.4] */ cube = "Cube", /** * Cylinder * @remarks * [Api set: PowerPointApi 1.4] */ can = "Can", /** * Lightning Bolt * @remarks * [Api set: PowerPointApi 1.4] */ lightningBolt = "LightningBolt", /** * Heart * @remarks * [Api set: PowerPointApi 1.4] */ heart = "Heart", /** * Sun * @remarks * [Api set: PowerPointApi 1.4] */ sun = "Sun", /** * Moon * @remarks * [Api set: PowerPointApi 1.4] */ moon = "Moon", /** * Smiley Face * @remarks * [Api set: PowerPointApi 1.4] */ smileyFace = "SmileyFace", /** * Explosion: 8 Points * @remarks * [Api set: PowerPointApi 1.4] */ irregularSeal1 = "IrregularSeal1", /** * Explosion: 14 Points * @remarks * [Api set: PowerPointApi 1.4] */ irregularSeal2 = "IrregularSeal2", /** * Rectangle: Folded Corner * @remarks * [Api set: PowerPointApi 1.4] */ foldedCorner = "FoldedCorner", /** * Rectangle: Beveled * @remarks * [Api set: PowerPointApi 1.4] */ bevel = "Bevel", /** * Frame * @remarks * [Api set: PowerPointApi 1.4] */ frame = "Frame", /** * Half Frame * @remarks * [Api set: PowerPointApi 1.4] */ halfFrame = "HalfFrame", /** * L-Shape * @remarks * [Api set: PowerPointApi 1.4] */ corner = "Corner", /** * Diagonal Stripe * @remarks * [Api set: PowerPointApi 1.4] */ diagonalStripe = "DiagonalStripe", /** * Chord * @remarks * [Api set: PowerPointApi 1.4] */ chord = "Chord", /** * Arc * @remarks * [Api set: PowerPointApi 1.4] */ arc = "Arc", /** * Left Bracket * @remarks * [Api set: PowerPointApi 1.4] */ leftBracket = "LeftBracket", /** * Right Bracket * @remarks * [Api set: PowerPointApi 1.4] */ rightBracket = "RightBracket", /** * Left Brace * @remarks * [Api set: PowerPointApi 1.4] */ leftBrace = "LeftBrace", /** * Right Brace * @remarks * [Api set: PowerPointApi 1.4] */ rightBrace = "RightBrace", /** * Double Bracket * @remarks * [Api set: PowerPointApi 1.4] */ bracketPair = "BracketPair", /** * Double Brace * @remarks * [Api set: PowerPointApi 1.4] */ bracePair = "BracePair", /** * Callout: Line with No Border * @remarks * [Api set: PowerPointApi 1.4] */ callout1 = "Callout1", /** * Callout: Bent Line with No Border * @remarks * [Api set: PowerPointApi 1.4] */ callout2 = "Callout2", /** * Callout: Double Bent Line with No Border * @remarks * [Api set: PowerPointApi 1.4] */ callout3 = "Callout3", /** * Callout: Line with Accent Bar * @remarks * [Api set: PowerPointApi 1.4] */ accentCallout1 = "AccentCallout1", /** * Callout: Bent Line with Accent Bar * @remarks * [Api set: PowerPointApi 1.4] */ accentCallout2 = "AccentCallout2", /** * Callout: Double Bent Line with Accent Bar * @remarks * [Api set: PowerPointApi 1.4] */ accentCallout3 = "AccentCallout3", /** * Callout: Line * @remarks * [Api set: PowerPointApi 1.4] */ borderCallout1 = "BorderCallout1", /** * Callout: Bent Line * @remarks * [Api set: PowerPointApi 1.4] */ borderCallout2 = "BorderCallout2", /** * Callout: Double Bent Line * @remarks * [Api set: PowerPointApi 1.4] */ borderCallout3 = "BorderCallout3", /** * Callout: Line with Border and Accent Bar * @remarks * [Api set: PowerPointApi 1.4] */ accentBorderCallout1 = "AccentBorderCallout1", /** * Callout: Bent Line with Border and Accent Bar * @remarks * [Api set: PowerPointApi 1.4] */ accentBorderCallout2 = "AccentBorderCallout2", /** * Callout: Double Bent Line with Border and Accent Bar * @remarks * [Api set: PowerPointApi 1.4] */ accentBorderCallout3 = "AccentBorderCallout3", /** * Speech Bubble: Rectangle * @remarks * [Api set: PowerPointApi 1.4] */ wedgeRectCallout = "WedgeRectCallout", /** * Speech Bubble: Rectangle with Corners Rounded * @remarks * [Api set: PowerPointApi 1.4] */ wedgeRRectCallout = "WedgeRRectCallout", /** * Speech Bubble: Oval * @remarks * [Api set: PowerPointApi 1.4] */ wedgeEllipseCallout = "WedgeEllipseCallout", /** * Thought Bubble: Cloud * @remarks * [Api set: PowerPointApi 1.4] */ cloudCallout = "CloudCallout", /** * Cloud * @remarks * [Api set: PowerPointApi 1.4] */ cloud = "Cloud", /** * Ribbon: Tilted Down * @remarks * [Api set: PowerPointApi 1.4] */ ribbon = "Ribbon", /** * Ribbon: Tilted Up * @remarks * [Api set: PowerPointApi 1.4] */ ribbon2 = "Ribbon2", /** * Ribbon: Curved and Tilted Down * @remarks * [Api set: PowerPointApi 1.4] */ ellipseRibbon = "EllipseRibbon", /** * Ribbon: Curved and Tilted Up * @remarks * [Api set: PowerPointApi 1.4] */ ellipseRibbon2 = "EllipseRibbon2", /** * Ribbon: Straight with Both Left and Right Arrows * @remarks * [Api set: PowerPointApi 1.4] */ leftRightRibbon = "LeftRightRibbon", /** * Scroll: Vertical * @remarks * [Api set: PowerPointApi 1.4] */ verticalScroll = "VerticalScroll", /** * Scroll: Horizontal * @remarks * [Api set: PowerPointApi 1.4] */ horizontalScroll = "HorizontalScroll", /** * Wave * @remarks * [Api set: PowerPointApi 1.4] */ wave = "Wave", /** * Double Wave * @remarks * [Api set: PowerPointApi 1.4] */ doubleWave = "DoubleWave", /** * Cross * @remarks * [Api set: PowerPointApi 1.4] */ plus = "Plus", /** * Flowchart: Process * @remarks * [Api set: PowerPointApi 1.4] */ flowChartProcess = "FlowChartProcess", /** * Flowchart: Decision * @remarks * [Api set: PowerPointApi 1.4] */ flowChartDecision = "FlowChartDecision", /** * Flowchart: Data * @remarks * [Api set: PowerPointApi 1.4] */ flowChartInputOutput = "FlowChartInputOutput", /** * Flowchart: Predefined Process * @remarks * [Api set: PowerPointApi 1.4] */ flowChartPredefinedProcess = "FlowChartPredefinedProcess", /** * Flowchart: Internal Storage * @remarks * [Api set: PowerPointApi 1.4] */ flowChartInternalStorage = "FlowChartInternalStorage", /** * Flowchart: Document * @remarks * [Api set: PowerPointApi 1.4] */ flowChartDocument = "FlowChartDocument", /** * Flowchart: Multidocument * @remarks * [Api set: PowerPointApi 1.4] */ flowChartMultidocument = "FlowChartMultidocument", /** * Flowchart: Terminator * @remarks * [Api set: PowerPointApi 1.4] */ flowChartTerminator = "FlowChartTerminator", /** * Flowchart: Preparation * @remarks * [Api set: PowerPointApi 1.4] */ flowChartPreparation = "FlowChartPreparation", /** * Flowchart: Manual Input * @remarks * [Api set: PowerPointApi 1.4] */ flowChartManualInput = "FlowChartManualInput", /** * Flowchart: Manual Operation * @remarks * [Api set: PowerPointApi 1.4] */ flowChartManualOperation = "FlowChartManualOperation", /** * Flowchart: Connector * @remarks * [Api set: PowerPointApi 1.4] */ flowChartConnector = "FlowChartConnector", /** * Flowchart: Card * @remarks * [Api set: PowerPointApi 1.4] */ flowChartPunchedCard = "FlowChartPunchedCard", /** * Flowchart: Punched Tape * @remarks * [Api set: PowerPointApi 1.4] */ flowChartPunchedTape = "FlowChartPunchedTape", /** * Flowchart: Summing Junction * @remarks * [Api set: PowerPointApi 1.4] */ flowChartSummingJunction = "FlowChartSummingJunction", /** * Flowchart: Or * @remarks * [Api set: PowerPointApi 1.4] */ flowChartOr = "FlowChartOr", /** * Flowchart: Collate * @remarks * [Api set: PowerPointApi 1.4] */ flowChartCollate = "FlowChartCollate", /** * Flowchart: Sort * @remarks * [Api set: PowerPointApi 1.4] */ flowChartSort = "FlowChartSort", /** * Flowchart: Extract * @remarks * [Api set: PowerPointApi 1.4] */ flowChartExtract = "FlowChartExtract", /** * Flowchart: Merge * @remarks * [Api set: PowerPointApi 1.4] */ flowChartMerge = "FlowChartMerge", /** * FlowChart: Offline Storage * @remarks * [Api set: PowerPointApi 1.4] */ flowChartOfflineStorage = "FlowChartOfflineStorage", /** * Flowchart: Stored Data * @remarks * [Api set: PowerPointApi 1.4] */ flowChartOnlineStorage = "FlowChartOnlineStorage", /** * Flowchart: Sequential Access Storage * @remarks * [Api set: PowerPointApi 1.4] */ flowChartMagneticTape = "FlowChartMagneticTape", /** * Flowchart: Magnetic Disk * @remarks * [Api set: PowerPointApi 1.4] */ flowChartMagneticDisk = "FlowChartMagneticDisk", /** * Flowchart: Direct Access Storage * @remarks * [Api set: PowerPointApi 1.4] */ flowChartMagneticDrum = "FlowChartMagneticDrum", /** * Flowchart: Display * @remarks * [Api set: PowerPointApi 1.4] */ flowChartDisplay = "FlowChartDisplay", /** * Flowchart: Delay * @remarks * [Api set: PowerPointApi 1.4] */ flowChartDelay = "FlowChartDelay", /** * Flowchart: Alternate Process * @remarks * [Api set: PowerPointApi 1.4] */ flowChartAlternateProcess = "FlowChartAlternateProcess", /** * Flowchart: Off-page Connector * @remarks * [Api set: PowerPointApi 1.4] */ flowChartOffpageConnector = "FlowChartOffpageConnector", /** * Action Button: Blank * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonBlank = "ActionButtonBlank", /** * Action Button: Go Home * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonHome = "ActionButtonHome", /** * Action Button: Help * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonHelp = "ActionButtonHelp", /** * Action Button: Get Information * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonInformation = "ActionButtonInformation", /** * Action Button: Go Forward or Next * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonForwardNext = "ActionButtonForwardNext", /** * Action Button: Go Back or Previous * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonBackPrevious = "ActionButtonBackPrevious", /** * Action Button: Go to End * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonEnd = "ActionButtonEnd", /** * Action Button: Go to Beginning * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonBeginning = "ActionButtonBeginning", /** * Action Button: Return * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonReturn = "ActionButtonReturn", /** * Action Button: Document * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonDocument = "ActionButtonDocument", /** * Action Button: Sound * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonSound = "ActionButtonSound", /** * Action Button: Video * @remarks * [Api set: PowerPointApi 1.4] */ actionButtonMovie = "ActionButtonMovie", /** * Gear: A Gear with Six Teeth * @remarks * [Api set: PowerPointApi 1.4] */ gear6 = "Gear6", /** * Gear: A Gear with Nine Teeth * @remarks * [Api set: PowerPointApi 1.4] */ gear9 = "Gear9", /** * Funnel * @remarks * [Api set: PowerPointApi 1.4] */ funnel = "Funnel", /** * Plus Sign * @remarks * [Api set: PowerPointApi 1.4] */ mathPlus = "MathPlus", /** * Minus Sign * @remarks * [Api set: PowerPointApi 1.4] */ mathMinus = "MathMinus", /** * Multiplication Sign * @remarks * [Api set: PowerPointApi 1.4] */ mathMultiply = "MathMultiply", /** * Division Sign * @remarks * [Api set: PowerPointApi 1.4] */ mathDivide = "MathDivide", /** * Equals * @remarks * [Api set: PowerPointApi 1.4] */ mathEqual = "MathEqual", /** * Not Equal * @remarks * [Api set: PowerPointApi 1.4] */ mathNotEqual = "MathNotEqual", /** * Four Right Triangles that Define a Rectangular Shape * @remarks * [Api set: PowerPointApi 1.4] */ cornerTabs = "CornerTabs", /** * Four Small Squares that Define a Rectangular Shape. * @remarks * [Api set: PowerPointApi 1.4] */ squareTabs = "SquareTabs", /** * Four Quarter Circles that Define a Rectangular Shape. * @remarks * [Api set: PowerPointApi 1.4] */ plaqueTabs = "PlaqueTabs", /** * A Rectangle Divided into Four Parts Along Diagonal Lines. * @remarks * [Api set: PowerPointApi 1.4] */ chartX = "ChartX", /** * A Rectangle Divided into Six Parts Along a Vertical Line and Diagonal Lines. * @remarks * [Api set: PowerPointApi 1.4] */ chartStar = "ChartStar", /** * A Rectangle Divided Vertically and Horizontally into Four Quarters. * @remarks * [Api set: PowerPointApi 1.4] */ chartPlus = "ChartPlus", } /** * Represents the available options when adding shapes. * * @remarks * [Api set: PowerPointApi 1.4] */ interface ShapeAddOptions { /** * Specifies the height, in points, of the shape. When not provided, a default value will be used. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ height?: number; /** * Specifies the distance, in points, from the left side of the shape to the left side of the slide. When not provided, a default value will be used. * * @remarks * [Api set: PowerPointApi 1.4] */ left?: number; /** * Specifies the distance, in points, from the top edge of the shape to the top edge of the slide. When not provided, a default value will be used. * * @remarks * [Api set: PowerPointApi 1.4] */ top?: number; /** * Specifies the width, in points, of the shape. When not provided, a default value will be used. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ width?: number; } /** * Specifies the dash style for a line. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ShapeLineDashStyle { /** * The dash line pattern * @remarks * [Api set: PowerPointApi 1.4] */ dash = "Dash", /** * The dash-dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ dashDot = "DashDot", /** * The dash-dot-dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ dashDotDot = "DashDotDot", /** * The long dash line pattern * @remarks * [Api set: PowerPointApi 1.4] */ longDash = "LongDash", /** * The long dash-dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ longDashDot = "LongDashDot", /** * The round dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ roundDot = "RoundDot", /** * The solid line pattern * @remarks * [Api set: PowerPointApi 1.4] */ solid = "Solid", /** * The square dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ squareDot = "SquareDot", /** * The long dash-dot-dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ longDashDotDot = "LongDashDotDot", /** * The system dash line pattern * @remarks * [Api set: PowerPointApi 1.4] */ systemDash = "SystemDash", /** * The system dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ systemDot = "SystemDot", /** * The system dash-dot line pattern * @remarks * [Api set: PowerPointApi 1.4] */ systemDashDot = "SystemDashDot", } /** * The type of underline applied to a font. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ShapeFontUnderlineStyle { /** * No underlining. * @remarks * [Api set: PowerPointApi 1.4] */ none = "None", /** * Regular single line underlining. * @remarks * [Api set: PowerPointApi 1.4] */ single = "Single", /** * Underlining of text with double lines. * @remarks * [Api set: PowerPointApi 1.4] */ double = "Double", /** * Underlining of text with a thick line. * @remarks * [Api set: PowerPointApi 1.4] */ heavy = "Heavy", /** * Underlining of text with a dotted line. * @remarks * [Api set: PowerPointApi 1.4] */ dotted = "Dotted", /** * Underlining of text with a thick, dotted line. * @remarks * [Api set: PowerPointApi 1.4] */ dottedHeavy = "DottedHeavy", /** * Underlining of text with a line containing dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dash = "Dash", /** * Underlining of text with a thick line containing dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dashHeavy = "DashHeavy", /** * Underlining of text with a line containing long dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dashLong = "DashLong", /** * Underlining of text with a thick line containing long dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dashLongHeavy = "DashLongHeavy", /** * Underlining of text with a line containing dots and dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dotDash = "DotDash", /** * Underlining of text with a thick line containing dots and dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dotDashHeavy = "DotDashHeavy", /** * Underlining of text with a line containing double dots and dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dotDotDash = "DotDotDash", /** * Underlining of text with a thick line containing double dots and dashes. * @remarks * [Api set: PowerPointApi 1.4] */ dotDotDashHeavy = "DotDotDashHeavy", /** * Underlining of text with a wavy line. * @remarks * [Api set: PowerPointApi 1.4] */ wavy = "Wavy", /** * Underlining of text with a thick, wavy line. * @remarks * [Api set: PowerPointApi 1.4] */ wavyHeavy = "WavyHeavy", /** * Underlining of text with double wavy lines. * @remarks * [Api set: PowerPointApi 1.4] */ wavyDouble = "WavyDouble", } /** * Represents the horizontal alignment of the {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ParagraphHorizontalAlignment { /** * Align text to the left margin. * @remarks * [Api set: PowerPointApi 1.4] */ left = "Left", /** * Align text in the center. * @remarks * [Api set: PowerPointApi 1.4] */ center = "Center", /** * Align text to the right margin. * @remarks * [Api set: PowerPointApi 1.4] */ right = "Right", /** * Align text so that it is justified across the whole line. * @remarks * [Api set: PowerPointApi 1.4] */ justify = "Justify", /** * Specifies the alignment or adjustment of kashida length in Arabic text. * @remarks * [Api set: PowerPointApi 1.4] */ justifyLow = "JustifyLow", /** * Distributes the text words across an entire text line. * @remarks * [Api set: PowerPointApi 1.4] */ distributed = "Distributed", /** * Distributes Thai text specially, because each character is treated as a word. * @remarks * [Api set: PowerPointApi 1.4] */ thaiDistributed = "ThaiDistributed", } /** * Represents the vertical alignment of a {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}. If one the centered options are selected, the contents of the `TextFrame` will be centered horizontally within the `Shape` as a group. To change the horizontal alignment of a text, see {@link PowerPoint.ParagraphFormat} and {@link PowerPoint.ParagraphHorizontalAlignment }. * * @remarks * [Api set: PowerPointApi 1.4] */ enum TextVerticalAlignment { /** * Specifies that the `TextFrame` should be top aligned to the `Shape`. * @remarks * [Api set: PowerPointApi 1.4] */ top = "Top", /** * Specifies that the `TextFrame` should be center aligned to the `Shape`. * @remarks * [Api set: PowerPointApi 1.4] */ middle = "Middle", /** * Specifies that the `TextFrame` should be bottom aligned to the `Shape`. * @remarks * [Api set: PowerPointApi 1.4] */ bottom = "Bottom", /** * Specifies that the `TextFrame` should be top aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. * @remarks * [Api set: PowerPointApi 1.4] */ topCentered = "TopCentered", /** * Specifies that the `TextFrame` should be center aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. * @remarks * [Api set: PowerPointApi 1.4] */ middleCentered = "MiddleCentered", /** * Specifies that the `TextFrame` should be bottom aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. * @remarks * [Api set: PowerPointApi 1.4] */ bottomCentered = "BottomCentered", } /** * Represents the collection of shapes. * * @remarks * [Api set: PowerPointApi 1.3] */ class ShapeCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: PowerPoint.Shape[]; /** * Adds a geometric shape to the slide. Returns a `Shape` object that represents the new shape. * * @remarks * [Api set: PowerPointApi 1.4] * * @param geometricShapeType Specifies the type of the geometric shape. See {@link PowerPoint.GeometricShapeType} for details. * @param options An optional parameter to specify the additional options such as the position of the shape. * @returns The newly inserted shape. */ addGeometricShape(geometricShapeType: PowerPoint.GeometricShapeType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; /** * Adds a geometric shape to the slide. Returns a `Shape` object that represents the new shape. * * @remarks * [Api set: PowerPointApi 1.4] * * @param geometricShapeType Specifies the type of the geometric shape. See {@link PowerPoint.GeometricShapeType} for details. * @param options An optional parameter to specify the additional options such as the position of the shape. * @returns The newly inserted shape. */ addGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; /** * Adds a line to the slide. Returns a `Shape` object that represents the new line. * * @remarks * [Api set: PowerPointApi 1.4] * * @param connectorType Specifies the connector type of the line. If not provided, `straight` connector type will be used. See {@link PowerPoint.ConnectorType} for details. * @param options An optional parameter to specify the additional options such as the position of the shape object that contains the line. * @returns The newly inserted shape. */ addLine(connectorType?: PowerPoint.ConnectorType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; /** * Adds a line to the slide. Returns a `Shape` object that represents the new line. * * @remarks * [Api set: PowerPointApi 1.4] * * @param connectorType Specifies the connector type of the line. If not provided, `straight` connector type will be used. See {@link PowerPoint.ConnectorType} for details. * @param options An optional parameter to specify the additional options such as the position of the shape object that contains the line. * @returns The newly inserted shape. */ addLine(connectorType?: "Straight" | "Elbow" | "Curve", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; /** * Adds a text box to the slide with the provided text as the content. Returns a `Shape` object that represents the new text box. * * @remarks * [Api set: PowerPointApi 1.4] * * @param text Specifies the text that will be shown in the created text box. * @param options An optional parameter to specify the additional options such as the position of the text box. * @returns The newly inserted shape. */ addTextBox(text: string, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; /** * Gets the number of shapes in the collection. * * @remarks * [Api set: PowerPointApi 1.3] * @returns The number of shapes in the collection. */ getCount(): OfficeExtension.ClientResult; /** * Gets a shape using its unique ID. An error is thrown if the shape does not exist. * * @remarks * [Api set: PowerPointApi 1.3] * * @param key The ID of the shape. * @returns The shape with the unique ID. If such a shape does not exist, an error is thrown. */ getItem(key: string): PowerPoint.Shape; /** * Gets a shape using its zero-based index in the collection. An error is thrown if the index is out of range. * * @remarks * [Api set: PowerPointApi 1.3] * * @param index The index of the shape in the collection. * @returns The shape at the given index. An error is thrown if index is out of range. */ getItemAt(index: number): PowerPoint.Shape; /** * Gets a shape using its unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. * * @remarks * [Api set: PowerPointApi 1.3] * * @param id The ID of the shape. * @returns The shape with the unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. */ getItemOrNullObject(id: string): PowerPoint.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.ShapeCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.ShapeCollection; /** * 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 `PowerPoint.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): PowerPoint.Interfaces.ShapeCollectionData; } /** * Represents the layout of a slide. * * @remarks * [Api set: PowerPointApi 1.3] */ class SlideLayout extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a collection of shapes in the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly shapes: PowerPoint.ShapeCollection; /** * Gets the unique ID of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly id: string; /** * Gets the name of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly name: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.SlideLayoutLoadOptions): PowerPoint.SlideLayout; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.SlideLayout; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.SlideLayout; /** * 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 PowerPoint.SlideLayout object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideLayoutData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.SlideLayoutData; } /** * Represents the collection of layouts provided by the Slide Master for slides. * * @remarks * [Api set: PowerPointApi 1.3] */ class SlideLayoutCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: PowerPoint.SlideLayout[]; /** * Gets the number of layouts in the collection. * * @remarks * [Api set: PowerPointApi 1.3] * @returns The number of layouts in the collection. */ getCount(): OfficeExtension.ClientResult; /** * Gets a layout using its unique ID. * * @remarks * [Api set: PowerPointApi 1.3] * * @param key The ID of the layout. * @returns The layout with the unique ID. If such a layout does not exist, an error is thrown. */ getItem(key: string): PowerPoint.SlideLayout; /** * Gets a layout using its zero-based index in the collection. * * @remarks * [Api set: PowerPointApi 1.3] * * @param index The index of the layout in the collection. * @returns The layout at the given index. An error is thrown if index is out of range. */ getItemAt(index: number): PowerPoint.SlideLayout; /** * Gets a layout using its unique ID. If such a layout does not exist, an object with an `isNullObject` property set to true is returned. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: PowerPointApi 1.3] * * @param id The ID of the layout. * @returns The layout with the unique ID. */ getItemOrNullObject(id: string): PowerPoint.SlideLayout; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.SlideLayoutCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideLayoutCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.SlideLayoutCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideLayoutCollection; /** * 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 `PowerPoint.SlideLayoutCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideLayoutCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): PowerPoint.Interfaces.SlideLayoutCollectionData; } /** * Represents the Slide Master of a slide. * * @remarks * [Api set: PowerPointApi 1.3] */ class SlideMaster extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the collection of layouts provided by the Slide Master for slides. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly layouts: PowerPoint.SlideLayoutCollection; /** * Returns a collection of shapes in the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly shapes: PowerPoint.ShapeCollection; /** * Gets the unique ID of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly id: string; /** * Gets the unique name of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly name: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.SlideMasterLoadOptions): PowerPoint.SlideMaster; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.SlideMaster; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.SlideMaster; /** * 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 PowerPoint.SlideMaster object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideMasterData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.SlideMasterData; } /** * Represents a single tag in the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ class Tag extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly key: string; /** * Gets the value of the tag. * * @remarks * [Api set: PowerPointApi 1.3] */ value: string; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.TagLoadOptions): PowerPoint.Tag; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.Tag; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.Tag; /** * 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 PowerPoint.Tag object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TagData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.TagData; } /** * Represents the collection of tags. * * @remarks * [Api set: PowerPointApi 1.3] */ class TagCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: PowerPoint.Tag[]; /** * Adds a new tag at the end of the collection. If the key already exists in the collection, the value of the existing tag will be replaced with the given `value`. * * @remarks * [Api set: PowerPointApi 1.3] * * @param key The unique ID of a tag, which is unique within this `TagCollection`. The key string is capitalized when saved in the document. * @param value The value of the tag. */ add(key: string, value: string): void; /** * Deletes the tag with the given key in this collection. Does nothing if the key does not exist. * * @remarks * [Api set: PowerPointApi 1.3] * * @param key The unique ID of a tag, which is unique within this `TagCollection`. This parameter is case-insensitive. */ delete(key: string): void; /** * Gets the number of tags in the collection. * * @remarks * [Api set: PowerPointApi 1.3] * @returns The number of tags in the collection. */ getCount(): OfficeExtension.ClientResult; /** * Gets a tag using its unique ID. An error is thrown if the tag does not exist. * * @remarks * [Api set: PowerPointApi 1.3] * * @param key The ID of the tag. The ID is case-sensitive and must be capitalized. * @returns The tag with the unique ID. If such a tag does not exist, an error is thrown. */ getItem(key: string): PowerPoint.Tag; /** * Gets a tag using its zero-based index in the collection. An error is thrown if the index is out of range. * * @remarks * [Api set: PowerPointApi 1.3] * * @param index The index of the tag in the collection. * @returns The tag at the given index. An error is thrown if index is out of range. */ getItemAt(index: number): PowerPoint.Tag; /** * Gets a tag using its unique ID. If such a tag does not exist, an object with an `isNullObject` property set to true is returned. * * @remarks * [Api set: PowerPointApi 1.3] * * @param key The ID of the tag. The ID is case-sensitive and must be capitalized. * @returns The tag with the unique ID. If such a tag does not exist, an object with an `isNullObject` property set to true is returned. */ getItemOrNullObject(key: string): PowerPoint.Tag; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.TagCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.TagCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.TagCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.TagCollection; /** * 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 `PowerPoint.TagCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TagCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): PowerPoint.Interfaces.TagCollectionData; } /** * Represents a single slide of a presentation. * * @remarks * [Api set: PowerPointApi 1.2] */ class Slide extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Gets the layout of the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly layout: PowerPoint.SlideLayout; /** * Returns a collection of shapes in the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly shapes: PowerPoint.ShapeCollection; /** * Gets the `SlideMaster` object that represents the slide's default content. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly slideMaster: PowerPoint.SlideMaster; /** * Returns a collection of tags in the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly tags: PowerPoint.TagCollection; /** * Gets the unique ID of the slide. * * @remarks * [Api set: PowerPointApi 1.2] */ readonly id: string; /** * Deletes the slide from the presentation. Does nothing if the slide does not exist. * * @remarks * [Api set: PowerPointApi 1.2] */ delete(): void; /** * Selects the specified shapes. Existing shape selection is replaced with the new selection. * * @remarks * [Api set: PowerPointApi 1.5] * * @param shapeIds List of shape IDs to select in the slide. If the list is empty, the selection is cleared. */ setSelectedShapes(shapeIds: string[]): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.SlideLoadOptions): PowerPoint.Slide; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.Slide; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.Slide; /** * 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 PowerPoint.Slide object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.SlideData; } /** * Specifies a shape's fill type. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ShapeFillType { /** * Specifies that the shape should have no fill. * @remarks * [Api set: PowerPointApi 1.4] */ noFill = "NoFill", /** * Specifies that the shape should have regular solid fill. * @remarks * [Api set: PowerPointApi 1.4] */ solid = "Solid", /** * Specifies that the shape should have gradient fill. * @remarks * [Api set: PowerPointApi 1.4] */ gradient = "Gradient", /** * Specifies that the shape should have pattern fill. * @remarks * [Api set: PowerPointApi 1.4] */ pattern = "Pattern", /** * Specifies that the shape should have picture or texture fill. * @remarks * [Api set: PowerPointApi 1.4] */ pictureAndTexture = "PictureAndTexture", /** * Specifies that the shape should have slide background fill. * @remarks * [Api set: PowerPointApi 1.4] */ slideBackground = "SlideBackground", } /** * Represents the fill formatting of a shape object. * * @remarks * [Api set: PowerPointApi 1.4] */ class ShapeFill extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ foregroundColor: string; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency: number; /** * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly type: PowerPoint.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "SlideBackground"; /** * Clears the fill formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ clear(): void; /** * Sets the fill formatting of the shape to a uniform color. This changes the fill type to `Solid`. * * @remarks * [Api set: PowerPointApi 1.4] * * @param color A string that specifies the fill color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). */ setSolidColor(color: string): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.ShapeFillLoadOptions): PowerPoint.ShapeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.ShapeFill; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.ShapeFill; /** * 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 PowerPoint.ShapeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.ShapeFillData; } /** * Specifies the style for a line. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ShapeLineStyle { /** * Single line. * @remarks * [Api set: PowerPointApi 1.4] */ single = "Single", /** * Thick line with a thin line on each side. * @remarks * [Api set: PowerPointApi 1.4] */ thickBetweenThin = "ThickBetweenThin", /** * Thick line next to thin line. For horizontal lines, the thick line is above the thin line. For vertical lines, the thick line is to the left of the thin line. * @remarks * [Api set: PowerPointApi 1.4] */ thickThin = "ThickThin", /** * Thick line next to thin line. For horizontal lines, the thick line is below the thin line. For vertical lines, the thick line is to the right of the thin line. * @remarks * [Api set: PowerPointApi 1.4] */ thinThick = "ThinThick", /** * Two thin lines. * @remarks * [Api set: PowerPointApi 1.4] */ thinThin = "ThinThin", } /** * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. * * @remarks * [Api set: PowerPointApi 1.4] */ class ShapeLineFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ color: string; /** * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ dashStyle: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; /** * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ style: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; /** * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency: number; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: PowerPointApi 1.4] */ visible: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: PowerPointApi 1.4] */ weight: number; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions): PowerPoint.ShapeLineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.ShapeLineFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.ShapeLineFormat; /** * 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 PowerPoint.ShapeLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeLineFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.ShapeLineFormatData; } /** * Specifies the type of a shape. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ShapeType { /** * The given shape's type is unsupported. * @remarks * [Api set: PowerPointApi 1.4] */ unsupported = "Unsupported", /** * The shape is an image * @remarks * [Api set: PowerPointApi 1.4] */ image = "Image", /** * The shape is a geometric shape such as rectangle * @remarks * [Api set: PowerPointApi 1.4] */ geometricShape = "GeometricShape", /** * The shape is a group shape which contains sub-shapes * @remarks * [Api set: PowerPointApi 1.4] */ group = "Group", /** * The shape is a line * @remarks * [Api set: PowerPointApi 1.4] */ line = "Line", /** * The shape is a table * @remarks * [Api set: PowerPointApi 1.4] */ table = "Table", } /** * Determines the type of automatic sizing allowed. * * @remarks * [Api set: PowerPointApi 1.4] */ enum ShapeAutoSize { /** * No autosizing. * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeNone = "AutoSizeNone", /** * The text is adjusted to fit the shape. * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeTextToFitShape = "AutoSizeTextToFitShape", /** * The shape is adjusted to fit the text. * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeShapeToFitText = "AutoSizeShapeToFitText", /** * A combination of automatic sizing schemes are used. * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeMixed = "AutoSizeMixed", } /** * Represents the bullet formatting properties of a text that is attached to the {@link PowerPoint.ParagraphFormat}. * * @remarks * [Api set: PowerPointApi 1.4] */ class BulletFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. * * @remarks * [Api set: PowerPointApi 1.4] */ visible: boolean; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.BulletFormatLoadOptions): PowerPoint.BulletFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.BulletFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.BulletFormat; /** * 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 PowerPoint.BulletFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.BulletFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.BulletFormatData; } /** * Represents the paragraph formatting properties of a text that is attached to the {@link PowerPoint.TextRange}. * * @remarks * [Api set: PowerPointApi 1.4] */ class ParagraphFormat extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the bullet format of the paragraph. See {@link PowerPoint.BulletFormat} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly bulletFormat: PowerPoint.BulletFormat; /** * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ horizontalAlignment: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.ParagraphFormatLoadOptions): PowerPoint.ParagraphFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.ParagraphFormat; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.ParagraphFormat; /** * 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 PowerPoint.ParagraphFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.ParagraphFormatData; } /** * Represents the font attributes, such as font name, font size, and color, for a shape's TextRange object. * * @remarks * [Api set: PowerPointApi 1.4] */ class ShapeFont extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ bold: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ color: string; /** * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ italic: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: PowerPointApi 1.4] */ name: string; /** * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ size: number; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ underline: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.ShapeFontLoadOptions): PowerPoint.ShapeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.ShapeFont; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.ShapeFont; /** * 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 PowerPoint.ShapeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeFontData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.ShapeFontData; } /** * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. * * @remarks * [Api set: PowerPointApi 1.4] */ class TextRange extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns a `ShapeFont` object that represents the font attributes for the text range. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly font: PowerPoint.ShapeFont; /** * Represents the paragraph format of the text range. See {@link PowerPoint.ParagraphFormat} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly paragraphFormat: PowerPoint.ParagraphFormat; /** * Gets or sets the length of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. * * @remarks * [Api set: PowerPointApi 1.5] */ length: number; /** * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. * * @remarks * [Api set: PowerPointApi 1.5] */ start: number; /** * Represents the plain text content of the text range. * * @remarks * [Api set: PowerPointApi 1.4] */ text: string; /** * Returns the parent {@link PowerPoint.TextFrame} object that holds this `TextRange`. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentTextFrame(): PowerPoint.TextFrame; /** * Returns a `TextRange` object for the substring in the given range. * * @remarks * [Api set: PowerPointApi 1.4] * * @param start The zero-based index of the first character to get from the text range. * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. */ getSubstring(start: number, length?: number): PowerPoint.TextRange; /** * Selects this `TextRange` in the current view. * * @remarks * [Api set: PowerPointApi 1.5] */ setSelected(): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.TextRangeLoadOptions): PowerPoint.TextRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.TextRange; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.TextRange; /** * 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 PowerPoint.TextRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TextRangeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.TextRangeData; } /** * Represents the text frame of a shape object. * * @remarks * [Api set: PowerPointApi 1.4] */ class TextFrame extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See {@link PowerPoint.TextRange} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly textRange: PowerPoint.TextRange; /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeSetting: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ bottomMargin: number; /** * Specifies if the text frame contains text. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly hasText: boolean; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ leftMargin: number; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ rightMargin: number; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ topMargin: number; /** * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ verticalAlignment: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; /** * Determines whether lines break automatically to fit text inside the shape. * * @remarks * [Api set: PowerPointApi 1.4] */ wordWrap: boolean; /** * Deletes all the text in the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ deleteText(): void; /** * Returns the parent {@link PowerPoint.Shape} object that holds this `TextFrame`. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentShape(): PowerPoint.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.TextFrameLoadOptions): PowerPoint.TextFrame; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.TextFrame; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.TextFrame; /** * 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 PowerPoint.TextFrame object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.TextFrameData; } /** * Represents a single shape in the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ class Shape extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** * Returns the fill formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly fill: PowerPoint.ShapeFill; /** * Returns the line formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly lineFormat: PowerPoint.ShapeLineFormat; /** * Returns a collection of tags in the shape. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly tags: PowerPoint.TagCollection; /** * Returns the text frame object of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly textFrame: PowerPoint.TextFrame; /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ height: number; /** * Gets the unique ID of the shape. * * @remarks * [Api set: PowerPointApi 1.3] */ readonly id: string; /** * The distance, in points, from the left side of the shape to the left side of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ left: number; /** * Specifies the name of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ name: string; /** * The distance, in points, from the top edge of the shape to the top edge of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ top: number; /** * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ readonly type: PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line" | "Table"; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ width: number; /** * Deletes the shape from the shape collection. Does nothing if the shape does not exist. * * @remarks * [Api set: PowerPointApi 1.3] */ delete(): void; /** * Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. Throws an exception if this shape does not belong to a `Slide`. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentSlide(): PowerPoint.Slide; /** * Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideLayout`. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentSlideLayout(): PowerPoint.SlideLayout; /** * Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. If this shape does not belong to a `SlideLayout`, an object with an `isNullObject` property set to `true` is returned. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentSlideLayoutOrNullObject(): PowerPoint.SlideLayout; /** * Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideMaster`. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentSlideMaster(): PowerPoint.SlideMaster; /** * Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. If this shape does not belong to a `SlideMaster`, an object with an `isNullObject` property set to `true` is returned. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentSlideMasterOrNullObject(): PowerPoint.SlideMaster; /** * Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. If this shape does not belong to a `Slide`, an object with an `isNullObject` property set to `true` is returned. * * @remarks * [Api set: PowerPointApi 1.5] */ getParentSlideOrNullObject(): PowerPoint.Slide; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.ShapeLoadOptions): PowerPoint.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: { select?: string; expand?: string; }): PowerPoint.Shape; /** * 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 PowerPoint.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. */ toJSON(): PowerPoint.Interfaces.ShapeData; } /** * Specifies the formatting options for when slides are inserted. * * @remarks * [Api set: PowerPointApi 1.2] */ enum InsertSlideFormatting { /** * Copy the source theme into the target presentation and use that theme. * @remarks * [Api set: PowerPointApi 1.2] */ keepSourceFormatting = "KeepSourceFormatting", /** * Use the existing theme in the target presentation. * @remarks * [Api set: PowerPointApi 1.2] */ useDestinationTheme = "UseDestinationTheme", } /** * Represents the available options when inserting slides. * * @remarks * [Api set: PowerPointApi 1.2] */ interface InsertSlideOptions { /** * Specifies which formatting to use during slide insertion. The default option is to use "KeepSourceFormatting". * * @remarks * [Api set: PowerPointApi 1.2] */ formatting?: PowerPoint.InsertSlideFormatting | "KeepSourceFormatting" | "UseDestinationTheme"; /** * Specifies the slides from the source presentation that will be inserted into the current presentation. These slides are represented by their IDs which can be retrieved from a `Slide` object. The order of these slides is preserved during the insertion. If any of the source slides are not found, or if the IDs are invalid, the operation throws a `SlideNotFound` exception and no slides will be inserted. All of the source slides will be inserted when `sourceSlideIds` is not provided (this is the default behavior). * * @remarks * [Api set: PowerPointApi 1.2] */ sourceSlideIds?: string[]; /** * Specifies where in the presentation the new slides will be inserted. The new slides will be inserted after the slide with the given slide ID. If `targetSlideId` is not provided, the slides will be inserted at the beginning of the presentation. If `targetSlideId` is invalid or if it is pointing to a non-existing slide, the operation throws a `SlideNotFound` exception and no slides will be inserted. * * @remarks * [Api set: PowerPointApi 1.2] */ targetSlideId?: string; } /** * Represents a collection of shapes. * * @remarks * [Api set: PowerPointApi 1.5] */ class ShapeScopedCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: PowerPoint.Shape[]; /** * Gets the number of shapes in the collection. * * @remarks * [Api set: PowerPointApi 1.5] * @returns The number of shapes in the collection. */ getCount(): OfficeExtension.ClientResult; /** * Gets a shape using its unique ID. An error is thrown if the shape does not exist. * * @remarks * [Api set: PowerPointApi 1.5] * * @param key The ID of the shape. * @returns The shape with the unique ID. If such a shape does not exist, an error is thrown. */ getItem(key: string): PowerPoint.Shape; /** * Gets a shape using its zero-based index in the collection. An error is thrown if the index is out of range. * * @remarks * [Api set: PowerPointApi 1.5] * * @param index The index of the shape in the collection. * @returns The shape at the given index. An error is thrown if index is out of range. */ getItemAt(index: number): PowerPoint.Shape; /** * Gets a shape using its unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. * * @remarks * [Api set: PowerPointApi 1.5] * * @param id The ID of the shape. * @returns The shape with the unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. */ getItemOrNullObject(id: string): PowerPoint.Shape; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.ShapeScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.ShapeScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.ShapeScopedCollection; /** * 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 `PowerPoint.ShapeScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): PowerPoint.Interfaces.ShapeScopedCollectionData; } /** * Represents the collection of slides in the presentation. * * @remarks * [Api set: PowerPointApi 1.2] */ class SlideCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: PowerPoint.Slide[]; /** * Adds a new slide at the end of the collection. * * @remarks * [Api set: PowerPointApi 1.3] * * @param options The options that define the theme of the new slide. */ add(options?: PowerPoint.AddSlideOptions): void; /** * Gets the number of slides in the collection. * * @remarks * [Api set: PowerPointApi 1.2] * @returns The number of slides in the collection. */ getCount(): OfficeExtension.ClientResult; /** * Gets a slide using its unique ID. * * @remarks * [Api set: PowerPointApi 1.2] * * @param key The ID of the slide. * @returns The slide with the unique ID. If such a slide does not exist, an error is thrown. */ getItem(key: string): PowerPoint.Slide; /** * Gets a slide using its zero-based index in the collection. Slides are stored in the same order as they are shown in the presentation. * * @remarks * [Api set: PowerPointApi 1.2] * * @param index The index of the slide in the collection. * @returns The slide at the given index. An error is thrown if index is out of range. */ getItemAt(index: number): PowerPoint.Slide; /** * Gets a slide using its unique ID. If such a slide does not exist, an object with an `isNullObject` property set to true is returned. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: PowerPointApi 1.2] * * @param id The ID of the slide. * @returns The slide with the unique ID. */ getItemOrNullObject(id: string): PowerPoint.Slide; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.SlideCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.SlideCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideCollection; /** * 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 `PowerPoint.SlideCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): PowerPoint.Interfaces.SlideCollectionData; } /** * Represents a collection of slides in the presentation. * * @remarks * [Api set: PowerPointApi 1.5] */ class SlideScopedCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: PowerPoint.Slide[]; /** * Gets the number of slides in the collection. * * @remarks * [Api set: PowerPointApi 1.5] * @returns The number of slides in the collection. */ getCount(): OfficeExtension.ClientResult; /** * Gets a slide using its unique ID. * * @remarks * [Api set: PowerPointApi 1.5] * * @param key The ID of the slide. * @returns The slide with the unique ID. If such a slide does not exist, an error is thrown. */ getItem(key: string): PowerPoint.Slide; /** * Gets a slide using its zero-based index in the collection. * * @remarks * [Api set: PowerPointApi 1.5] * * @param index The index of the slide in the collection. * @returns The slide at the given index. An error is thrown if index is out of range. */ getItemAt(index: number): PowerPoint.Slide; /** * Gets a slide using its unique ID. If such a slide does not exist, an object with an `isNullObject` property set to true is returned. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: PowerPointApi 1.5] * * @param id The ID of the slide. * @returns The slide with the unique ID. */ getItemOrNullObject(id: string): PowerPoint.Slide; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.SlideScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.SlideScopedCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideScopedCollection; /** * 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 `PowerPoint.SlideScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): PowerPoint.Interfaces.SlideScopedCollectionData; } /** * Represents the collection of Slide Masters in the presentation. * * @remarks * [Api set: PowerPointApi 1.3] */ class SlideMasterCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: PowerPoint.SlideMaster[]; /** * Gets the number of Slide Masters in the collection. * * @remarks * [Api set: PowerPointApi 1.3] * @returns The number of Slide Masters in the collection. */ getCount(): OfficeExtension.ClientResult; /** * Gets a Slide Master using its unique ID. * * @remarks * [Api set: PowerPointApi 1.3] * * @param key The ID of the Slide Master. * @returns The Slide Master with the unique ID. If such a Slide Master does not exist, an error is thrown. */ getItem(key: string): PowerPoint.SlideMaster; /** * Gets a Slide Master using its zero-based index in the collection. * * @remarks * [Api set: PowerPointApi 1.3] * * @param index The index of the Slide Master in the collection. * @returns The Slide Master at the given index. An error is thrown if index is out of range. */ getItemAt(index: number): PowerPoint.SlideMaster; /** * Gets a Slide Master using its unique ID. If such a Slide Master does not exist, an object with an `isNullObject` property set to true is returned. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}." * * @remarks * [Api set: PowerPointApi 1.3] * * @param id The ID of the Slide Master. * @returns The Slide Master with the unique ID. */ getItemOrNullObject(id: string): PowerPoint.SlideMaster; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options Provides options for which properties of the object to load. */ load(options?: PowerPoint.Interfaces.SlideMasterCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideMasterCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. */ load(propertyNames?: string | string[]): PowerPoint.SlideMasterCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `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. */ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideMasterCollection; /** * 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 `PowerPoint.SlideMasterCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideMasterCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ toJSON(): PowerPoint.Interfaces.SlideMasterCollectionData; } enum ErrorCodes { generalException = "GeneralException", } namespace Interfaces { /** * Provides ways to load properties of only a subset of members of a collection. */ interface CollectionLoadOptions { /** * Specify the number of items in the queried collection to be included in the result. */ $top?: number; /** * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. */ $skip?: number; } /** An interface for updating data on the ShapeCollection object, for use in `shapeCollection.set({ ... })`. */ interface ShapeCollectionUpdateData { items?: PowerPoint.Interfaces.ShapeData[]; } /** An interface for updating data on the SlideLayoutCollection object, for use in `slideLayoutCollection.set({ ... })`. */ interface SlideLayoutCollectionUpdateData { items?: PowerPoint.Interfaces.SlideLayoutData[]; } /** An interface for updating data on the Tag object, for use in `tag.set({ ... })`. */ interface TagUpdateData { /** * Gets the value of the tag. * * @remarks * [Api set: PowerPointApi 1.3] */ value?: string; } /** An interface for updating data on the TagCollection object, for use in `tagCollection.set({ ... })`. */ interface TagCollectionUpdateData { items?: PowerPoint.Interfaces.TagData[]; } /** An interface for updating data on the ShapeFill object, for use in `shapeFill.set({ ... })`. */ interface ShapeFillUpdateData { /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ foregroundColor?: string; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency?: number; } /** An interface for updating data on the ShapeLineFormat object, for use in `shapeLineFormat.set({ ... })`. */ interface ShapeLineFormatUpdateData { /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ color?: string; /** * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ dashStyle?: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; /** * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ style?: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; /** * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency?: number; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: PowerPointApi 1.4] */ visible?: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: PowerPointApi 1.4] */ weight?: number; } /** An interface for updating data on the BulletFormat object, for use in `bulletFormat.set({ ... })`. */ interface BulletFormatUpdateData { /** * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. * * @remarks * [Api set: PowerPointApi 1.4] */ visible?: boolean; } /** An interface for updating data on the ParagraphFormat object, for use in `paragraphFormat.set({ ... })`. */ interface ParagraphFormatUpdateData { /** * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ horizontalAlignment?: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; } /** An interface for updating data on the ShapeFont object, for use in `shapeFont.set({ ... })`. */ interface ShapeFontUpdateData { /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ color?: string; /** * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ italic?: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: string; /** * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ size?: number; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; } /** An interface for updating data on the TextRange object, for use in `textRange.set({ ... })`. */ interface TextRangeUpdateData { /** * Gets or sets the length of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. * * @remarks * [Api set: PowerPointApi 1.5] */ length?: number; /** * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. * * @remarks * [Api set: PowerPointApi 1.5] */ start?: number; /** * Represents the plain text content of the text range. * * @remarks * [Api set: PowerPointApi 1.4] */ text?: string; } /** An interface for updating data on the TextFrame object, for use in `textFrame.set({ ... })`. */ interface TextFrameUpdateData { /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeSetting?: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ bottomMargin?: number; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ leftMargin?: number; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ rightMargin?: number; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ topMargin?: number; /** * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ verticalAlignment?: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; /** * Determines whether lines break automatically to fit text inside the shape. * * @remarks * [Api set: PowerPointApi 1.4] */ wordWrap?: boolean; } /** An interface for updating data on the Shape object, for use in `shape.set({ ... })`. */ interface ShapeUpdateData { /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ height?: number; /** * The distance, in points, from the left side of the shape to the left side of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ left?: number; /** * Specifies the name of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: string; /** * The distance, in points, from the top edge of the shape to the top edge of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ top?: number; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ width?: number; } /** An interface for updating data on the ShapeScopedCollection object, for use in `shapeScopedCollection.set({ ... })`. */ interface ShapeScopedCollectionUpdateData { items?: PowerPoint.Interfaces.ShapeData[]; } /** An interface for updating data on the SlideCollection object, for use in `slideCollection.set({ ... })`. */ interface SlideCollectionUpdateData { items?: PowerPoint.Interfaces.SlideData[]; } /** An interface for updating data on the SlideScopedCollection object, for use in `slideScopedCollection.set({ ... })`. */ interface SlideScopedCollectionUpdateData { items?: PowerPoint.Interfaces.SlideData[]; } /** An interface for updating data on the SlideMasterCollection object, for use in `slideMasterCollection.set({ ... })`. */ interface SlideMasterCollectionUpdateData { items?: PowerPoint.Interfaces.SlideMasterData[]; } /** An interface describing the data returned by calling `presentation.toJSON()`. */ interface PresentationData { /** * Gets the ID of the presentation. * * @remarks * [Api set: PowerPointApi 1.5] */ id?: string; title?: string; } /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ interface ShapeCollectionData { items?: PowerPoint.Interfaces.ShapeData[]; } /** An interface describing the data returned by calling `slideLayout.toJSON()`. */ interface SlideLayoutData { /** * Gets the unique ID of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: string; /** * Gets the name of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ name?: string; } /** An interface describing the data returned by calling `slideLayoutCollection.toJSON()`. */ interface SlideLayoutCollectionData { items?: PowerPoint.Interfaces.SlideLayoutData[]; } /** An interface describing the data returned by calling `slideMaster.toJSON()`. */ interface SlideMasterData { /** * Gets the unique ID of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: string; /** * Gets the unique name of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ name?: string; } /** An interface describing the data returned by calling `tag.toJSON()`. */ interface TagData { /** * Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. * * @remarks * [Api set: PowerPointApi 1.3] */ key?: string; /** * Gets the value of the tag. * * @remarks * [Api set: PowerPointApi 1.3] */ value?: string; } /** An interface describing the data returned by calling `tagCollection.toJSON()`. */ interface TagCollectionData { items?: PowerPoint.Interfaces.TagData[]; } /** An interface describing the data returned by calling `slide.toJSON()`. */ interface SlideData { /** * Gets the unique ID of the slide. * * @remarks * [Api set: PowerPointApi 1.2] */ id?: string; } /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ interface ShapeFillData { /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ foregroundColor?: string; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency?: number; /** * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ type?: PowerPoint.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "SlideBackground"; } /** An interface describing the data returned by calling `shapeLineFormat.toJSON()`. */ interface ShapeLineFormatData { /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ color?: string; /** * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ dashStyle?: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; /** * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ style?: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; /** * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency?: number; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: PowerPointApi 1.4] */ visible?: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: PowerPointApi 1.4] */ weight?: number; } /** An interface describing the data returned by calling `bulletFormat.toJSON()`. */ interface BulletFormatData { /** * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. * * @remarks * [Api set: PowerPointApi 1.4] */ visible?: boolean; } /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ interface ParagraphFormatData { /** * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ horizontalAlignment?: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; } /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ interface ShapeFontData { /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ color?: string; /** * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ italic?: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: string; /** * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ size?: number; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; } /** An interface describing the data returned by calling `textRange.toJSON()`. */ interface TextRangeData { /** * Gets or sets the length of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. * * @remarks * [Api set: PowerPointApi 1.5] */ length?: number; /** * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. * * @remarks * [Api set: PowerPointApi 1.5] */ start?: number; /** * Represents the plain text content of the text range. * * @remarks * [Api set: PowerPointApi 1.4] */ text?: string; } /** An interface describing the data returned by calling `textFrame.toJSON()`. */ interface TextFrameData { /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeSetting?: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ bottomMargin?: number; /** * Specifies if the text frame contains text. * * @remarks * [Api set: PowerPointApi 1.4] */ hasText?: boolean; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ leftMargin?: number; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ rightMargin?: number; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ topMargin?: number; /** * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ verticalAlignment?: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; /** * Determines whether lines break automatically to fit text inside the shape. * * @remarks * [Api set: PowerPointApi 1.4] */ wordWrap?: boolean; } /** An interface describing the data returned by calling `shape.toJSON()`. */ interface ShapeData { /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ height?: number; /** * Gets the unique ID of the shape. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: string; /** * The distance, in points, from the left side of the shape to the left side of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ left?: number; /** * Specifies the name of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: string; /** * The distance, in points, from the top edge of the shape to the top edge of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ top?: number; /** * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ type?: PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line" | "Table"; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ width?: number; } /** An interface describing the data returned by calling `shapeScopedCollection.toJSON()`. */ interface ShapeScopedCollectionData { items?: PowerPoint.Interfaces.ShapeData[]; } /** An interface describing the data returned by calling `slideCollection.toJSON()`. */ interface SlideCollectionData { items?: PowerPoint.Interfaces.SlideData[]; } /** An interface describing the data returned by calling `slideScopedCollection.toJSON()`. */ interface SlideScopedCollectionData { items?: PowerPoint.Interfaces.SlideData[]; } /** An interface describing the data returned by calling `slideMasterCollection.toJSON()`. */ interface SlideMasterCollectionData { items?: PowerPoint.Interfaces.SlideMasterData[]; } /** * @remarks * [Api set: PowerPointApi 1.0] */ interface PresentationLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the ID of the presentation. * * @remarks * [Api set: PowerPointApi 1.5] */ id?: boolean; title?: boolean; } /** * Represents the collection of shapes. * * @remarks * [Api set: PowerPointApi 1.3] */ interface ShapeCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the fill formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; /** * For EACH ITEM in the collection: Returns the line formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the text frame object of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; /** * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ height?: boolean; /** * For EACH ITEM in the collection: Gets the unique ID of the shape. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ left?: boolean; /** * For EACH ITEM in the collection: Specifies the name of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ top?: boolean; /** * For EACH ITEM in the collection: Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ type?: boolean; /** * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ width?: boolean; } /** * Represents the layout of a slide. * * @remarks * [Api set: PowerPointApi 1.3] */ interface SlideLayoutLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the unique ID of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: boolean; /** * Gets the name of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ name?: boolean; } /** * Represents the collection of layouts provided by the Slide Master for slides. * * @remarks * [Api set: PowerPointApi 1.3] */ interface SlideLayoutCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the unique ID of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the name of the slide layout. * * @remarks * [Api set: PowerPointApi 1.3] */ name?: boolean; } /** * Represents the Slide Master of a slide. * * @remarks * [Api set: PowerPointApi 1.3] */ interface SlideMasterLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the unique ID of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: boolean; /** * Gets the unique name of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ name?: boolean; } /** * Represents a single tag in the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ interface TagLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. * * @remarks * [Api set: PowerPointApi 1.3] */ key?: boolean; /** * Gets the value of the tag. * * @remarks * [Api set: PowerPointApi 1.3] */ value?: boolean; } /** * Represents the collection of tags. * * @remarks * [Api set: PowerPointApi 1.3] */ interface TagCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. * * @remarks * [Api set: PowerPointApi 1.3] */ key?: boolean; /** * For EACH ITEM in the collection: Gets the value of the tag. * * @remarks * [Api set: PowerPointApi 1.3] */ value?: boolean; } /** * Represents a single slide of a presentation. * * @remarks * [Api set: PowerPointApi 1.2] */ interface SlideLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Gets the layout of the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; /** * Gets the `SlideMaster` object that represents the slide's default content. * * @remarks * [Api set: PowerPointApi 1.3] */ slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; /** * Gets the unique ID of the slide. * * @remarks * [Api set: PowerPointApi 1.2] */ id?: boolean; } /** * Represents the fill formatting of a shape object. * * @remarks * [Api set: PowerPointApi 1.4] */ interface ShapeFillLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ foregroundColor?: boolean; /** * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency?: boolean; /** * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ type?: boolean; } /** * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. * * @remarks * [Api set: PowerPointApi 1.4] */ interface ShapeLineFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). * * @remarks * [Api set: PowerPointApi 1.4] */ color?: boolean; /** * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ dashStyle?: boolean; /** * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. * * @remarks * [Api set: PowerPointApi 1.4] */ style?: boolean; /** * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. * * @remarks * [Api set: PowerPointApi 1.4] */ transparency?: boolean; /** * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. * * @remarks * [Api set: PowerPointApi 1.4] */ visible?: boolean; /** * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. * * @remarks * [Api set: PowerPointApi 1.4] */ weight?: boolean; } /** * Represents the bullet formatting properties of a text that is attached to the {@link PowerPoint.ParagraphFormat}. * * @remarks * [Api set: PowerPointApi 1.4] */ interface BulletFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. * * @remarks * [Api set: PowerPointApi 1.4] */ visible?: boolean; } /** * Represents the paragraph formatting properties of a text that is attached to the {@link PowerPoint.TextRange}. * * @remarks * [Api set: PowerPointApi 1.4] */ interface ParagraphFormatLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the bullet format of the paragraph. See {@link PowerPoint.BulletFormat} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ bulletFormat?: PowerPoint.Interfaces.BulletFormatLoadOptions; /** * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ horizontalAlignment?: boolean; } /** * Represents the font attributes, such as font name, font size, and color, for a shape's TextRange object. * * @remarks * [Api set: PowerPointApi 1.4] */ interface ShapeFontLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ bold?: boolean; /** * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ color?: boolean; /** * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ italic?: boolean; /** * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: boolean; /** * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ size?: boolean; /** * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ underline?: boolean; } /** * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. * * @remarks * [Api set: PowerPointApi 1.4] */ interface TextRangeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns a `ShapeFont` object that represents the font attributes for the text range. * * @remarks * [Api set: PowerPointApi 1.4] */ font?: PowerPoint.Interfaces.ShapeFontLoadOptions; /** * Represents the paragraph format of the text range. See {@link PowerPoint.ParagraphFormat} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ paragraphFormat?: PowerPoint.Interfaces.ParagraphFormatLoadOptions; /** * Gets or sets the length of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. * * @remarks * [Api set: PowerPointApi 1.5] */ length?: boolean; /** * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. * * @remarks * [Api set: PowerPointApi 1.5] */ start?: boolean; /** * Represents the plain text content of the text range. * * @remarks * [Api set: PowerPointApi 1.4] */ text?: boolean; } /** * Represents the text frame of a shape object. * * @remarks * [Api set: PowerPointApi 1.4] */ interface TextFrameLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See {@link PowerPoint.TextRange} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ textRange?: PowerPoint.Interfaces.TextRangeLoadOptions; /** * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. * * @remarks * [Api set: PowerPointApi 1.4] */ autoSizeSetting?: boolean; /** * Represents the bottom margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ bottomMargin?: boolean; /** * Specifies if the text frame contains text. * * @remarks * [Api set: PowerPointApi 1.4] */ hasText?: boolean; /** * Represents the left margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ leftMargin?: boolean; /** * Represents the right margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ rightMargin?: boolean; /** * Represents the top margin, in points, of the text frame. * * @remarks * [Api set: PowerPointApi 1.4] */ topMargin?: boolean; /** * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ verticalAlignment?: boolean; /** * Determines whether lines break automatically to fit text inside the shape. * * @remarks * [Api set: PowerPointApi 1.4] */ wordWrap?: boolean; } /** * Represents a single shape in the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ interface ShapeLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * Returns the fill formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; /** * Returns the line formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; /** * Returns the text frame object of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ height?: boolean; /** * Gets the unique ID of the shape. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: boolean; /** * The distance, in points, from the left side of the shape to the left side of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ left?: boolean; /** * Specifies the name of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: boolean; /** * The distance, in points, from the top edge of the shape to the top edge of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ top?: boolean; /** * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ type?: boolean; /** * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ width?: boolean; } /** * Represents a collection of shapes. * * @remarks * [Api set: PowerPointApi 1.3] */ interface ShapeScopedCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Returns the fill formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; /** * For EACH ITEM in the collection: Returns the line formatting of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; /** * For EACH ITEM in the collection: Returns the text frame object of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; /** * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ height?: boolean; /** * For EACH ITEM in the collection: Gets the unique ID of the shape. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ left?: boolean; /** * For EACH ITEM in the collection: Specifies the name of this shape. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the slide. * * @remarks * [Api set: PowerPointApi 1.4] */ top?: boolean; /** * For EACH ITEM in the collection: Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ type?: boolean; /** * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * * @remarks * [Api set: PowerPointApi 1.4] */ width?: boolean; } /** * Represents the collection of slides in the presentation. * * @remarks * [Api set: PowerPointApi 1.2] */ interface SlideCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the layout of the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; /** * For EACH ITEM in the collection: Gets the `SlideMaster` object that represents the slide's default content. * * @remarks * [Api set: PowerPointApi 1.3] */ slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; /** * For EACH ITEM in the collection: Gets the unique ID of the slide. * * @remarks * [Api set: PowerPointApi 1.2] */ id?: boolean; } /** * Represents a collection of slides in the presentation. * * @remarks * [Api set: PowerPointApi 1.2] */ interface SlideScopedCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the layout of the slide. * * @remarks * [Api set: PowerPointApi 1.3] */ layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; /** * For EACH ITEM in the collection: Gets the `SlideMaster` object that represents the slide's default content. * * @remarks * [Api set: PowerPointApi 1.3] */ slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; /** * For EACH ITEM in the collection: Gets the unique ID of the slide. * * @remarks * [Api set: PowerPointApi 1.2] */ id?: boolean; } /** * Represents the collection of Slide Masters in the presentation. * * @remarks * [Api set: PowerPointApi 1.3] */ interface SlideMasterCollectionLoadOptions { /** Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). */ $all?: boolean; /** * For EACH ITEM in the collection: Gets the unique ID of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ id?: boolean; /** * For EACH ITEM in the collection: Gets the unique name of the Slide Master. * * @remarks * [Api set: PowerPointApi 1.3] */ name?: boolean; } } } declare namespace PowerPoint { /** * The RequestContext object facilitates requests to the PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the request context is required to get access to the PowerPoint object model from the add-in. */ class RequestContext extends OfficeCore.RequestContext { constructor(url?: string); readonly presentation: Presentation; readonly application: Application; } /** * Executes a batch script that performs actions on the PowerPoint object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. */ function run(batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; /** * Executes a batch script that performs actions on the PowerPoint object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param object - A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. */ function run(object: OfficeExtension.ClientObject, batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; /** * Executes a batch script that performs actions on the PowerPoint object model, using the RequestContext of previously-created API objects. * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. */ function run(objects: OfficeExtension.ClientObject[], batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; } declare namespace PowerPoint { /** * Creates and opens a new presentation. Optionally, the presentation can be pre-populated with a base64-encoded .pptx file. * * [Api set: PowerPointApi 1.1] * * @param base64File Optional. The base64-encoded .pptx file. The default value is null. */ function createPresentation(base64File?: string): Promise; } //////////////////////////////////////////////////////////////// ///////////////////// End PowerPoint APIs ////////////////////// ////////////////////////////////////////////////////////////////