From 32375d7c44e6c850b670a20443bb14592c4c9cd9 Mon Sep 17 00:00:00 2001 From: Ika Date: Sat, 12 May 2018 03:11:33 +0800 Subject: [PATCH 01/15] fix(prettier): printer.embed is optional (#25697) * fix(prettier): printer.embed is optional * fix: FastPath#getName() could be number * fix: add missing FastPath#stack * fix: printDocToString return type --- types/prettier/index.d.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/types/prettier/index.d.ts b/types/prettier/index.d.ts index 0daaa14cca..dbc358bfc9 100644 --- a/types/prettier/index.d.ts +++ b/types/prettier/index.d.ts @@ -9,7 +9,8 @@ export type Doc = doc.builders.Doc; // https://github.com/prettier/prettier/blob/master/src/common/fast-path.js export interface FastPath { - getName(): string | null; + stack: any[]; + getName(): null | number | string; getValue(): any; getNode(count?: number): any; getParentNode(count?: number): any; @@ -131,12 +132,12 @@ export interface Printer { options: ParserOptions, print: (path: FastPath) => Doc, ): Doc; - embed( + embed?: ( path: FastPath, print: (path: FastPath) => Doc, textToDoc: (text: string, options: Options) => Doc, options: ParserOptions, - ): Doc | null; + ) => Doc | null; insertPragma?: (text: string) => string; /** * @returns `null` if you want to remove this node @@ -405,7 +406,11 @@ export namespace doc { function printDocToDebug(doc: Doc): string; } namespace printer { - function printDocToString(doc: Doc, options: Options): string; + function printDocToString(doc: Doc, options: Options): { + formatted: string; + cursorNodeStart?: number; + cursorNodeText?: string; + }; interface Options { /** * Specify the line length that the printer will wrap on. From 2718a5e3eecff2f1d67197ac8ee444b8cf400350 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Fri, 11 May 2018 12:16:27 -0700 Subject: [PATCH 02/15] [jss] Export named type for the options argument to createStyleSheet (#25692) --- types/jss/index.d.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index 0b40c82f8f..27c8d779a6 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -112,19 +112,20 @@ export declare class SheetsRegistry { remove(sheet: StyleSheet): void; toString(options?: ToCssOptions): string; } +export type CreateStyleSheetOptions = Partial<{ + media: string; + meta: string; + link: boolean; + element: HTMLStyleElement; + index: number; + generateClassName: GenerateClassName; + classNamePrefix: string; +}>; declare class JSS { constructor(options?: Partial); createStyleSheet( styles: Partial>, - options?: Partial<{ - media: string; - meta: string; - link: boolean; - element: HTMLStyleElement; - index: number; - generateClassName: GenerateClassName; - classNamePrefix: string; - }>, + options?: CreateStyleSheetOptions, ): StyleSheet; removeStyleSheet(sheet: StyleSheet): this; setup(options?: Partial): this; From d222093d1d20db41b0a3cbd1678800137492172e Mon Sep 17 00:00:00 2001 From: Michael Zlatkovsky Date: Fri, 11 May 2018 12:17:44 -0700 Subject: [PATCH 03/15] Massive office.js update: ExcelApi 1.7, additions to Word and OneNote codegen (#25689) * Update to ExcelApi 1.7 and with latest Word d.ts codegen * Remove other IPromise dependencies, making everything be just regular Promises * Annotate with TS 2.4 requirement in the header * Use "namespace" instead of "module" * add "Office.Preview.startCustomFunctions()" * Apply auto-formatting * Fix 1 typo and clean up trailing statements --- types/office-js/index.d.ts | 26295 +++++++++++++++++++++++---- types/office-js/office-js-tests.ts | 59 +- 2 files changed, 23111 insertions(+), 3243 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 629ccacb21..d0eaf593c5 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -2,6 +2,7 @@ // Project: http://dev.office.com // Definitions by: OfficeDev , Lance Austin , Michael Zlatkovsky , Kim Brandl , Ricky Kirkham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 /* office-js @@ -14,19 +15,24 @@ Copyright (c) Microsoft Corporation //////////////////////////////////////////////////////////////// declare namespace Office { + export var Preview: { + startCustomFunctions(): Promise; + } + + export var Promise: PromiseConstructor; export var context: Context; /** * This method is called after the Office API was loaded. * @param reason Indicates how the app was initialized */ export function initialize(reason: InitializationReason): void; - /** + /** * 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 host 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 host application, it will call the callback and resolve the promise with "null" for both the host and platform. * @param callback - An optional callback method, that will receive the host 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 host and platform info, once initialization is completed. */ - export function onReady(callback?: (info: { host: HostType, platform: PlatformType} ) => any): Promise<{ host: HostType, platform: PlatformType }>; + export function onReady(callback?: (info: { host: HostType, platform: PlatformType }) => any): Promise<{ host: HostType, platform: PlatformType }>; /** * Indicates if the large namespace for objects will be used or not. * @param useShortNamespace Indicates if 'true' that the short namespace will be used @@ -1573,7 +1579,7 @@ declare namespace Office { //////////////////////////////////////////////////////////////// declare namespace Office { - export module MailboxEnums { + namespace MailboxEnums { export enum AttachmentType { /** * The attachment is a file @@ -2597,6 +2603,23 @@ declare namespace OfficeExtension { top?: number; skip?: number; } + export interface UpdateOptions { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean + } + + /** Contains debug information about the request context. */ + export interface RequestContextDebugInfo { + /** + * The statements to be executed in the host. + * + * 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 host Office application. The "Excel.run" and "Word.run" methods provide a request context. */ class ClientRequestContext { constructor(url?: string); @@ -2610,21 +2633,24 @@ declare namespace OfficeExtension { /** Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ 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. - */ + /** + * 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): IPromise; + sync(passThroughValue?: T): Promise; + + /** Debug information */ + readonly debugInfo: RequestContextDebugInfo; } export interface EmbeddedOptions { @@ -2638,10 +2664,9 @@ declare namespace OfficeExtension { class EmbeddedSession { constructor(url: string, options?: EmbeddedOptions); - public init(): IPromise; + public init(): Promise; } } - declare namespace OfficeExtension { /** 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 { @@ -2649,7 +2674,21 @@ declare namespace OfficeExtension { value: T; } } + declare namespace OfficeExtension { + /** Configuration */ + export 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; + }; + export interface DebugInfo { /** Error code string, such as "InvalidArgument". */ code: string; @@ -2659,7 +2698,28 @@ declare namespace OfficeExtension { innerError?: DebugInfo | string; /** The object type and property or method name (or similar information), if available. */ - errorLocation?: string + 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. + */ + statements?: 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. */ @@ -2697,177 +2757,10 @@ declare namespace OfficeExtension { } } declare namespace OfficeExtension { - /** An IPromise object that represents a deferred interaction with the host Office application. */ - interface IPromise { - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => IPromise, onRejected?: (error: any) => IPromise): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => IPromise, onRejected?: (error: any) => U): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => IPromise, onRejected?: (error: any) => void): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => IPromise): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => U): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => void): IPromise; - - - /** - * Catches failures or exceptions from actions within the promise, or from an unhandled exception earlier in the call stack. - * @param onRejected function to be called if or when the promise rejects. - */ - catch(onRejected?: (error: any) => IPromise): IPromise; - - /** - * Catches failures or exceptions from actions within the promise, or from an unhandled exception earlier in the call stack. - * @param onRejected function to be called if or when the promise rejects. - */ - catch(onRejected?: (error: any) => U): IPromise; - - /** - * Catches failures or exceptions from actions within the promise, or from an unhandled exception earlier in the call stack. - * @param onRejected function to be called if or when the promise rejects. - */ - catch(onRejected?: (error: any) => void): IPromise; - } - /** An Promise object that represents a deferred interaction with the host Office application. The publically-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 "native" Promise implementation is available, OfficeExtension.Promise will switch to use the native Promise instead. */ - export class Promise implements IPromise - { - /** - * Creates a new promise based on a function that accepts resolve and reject handlers. - */ - constructor(func: (resolve: (value?: R | IPromise) => void, reject: (error?: any) => void) => void); + export const Promise: PromiseConstructor; - /** - * Creates a promise that resolves when all of the child promises resolve. - */ - static all(promises: OfficeExtension.IPromise[]): IPromise; - - /** - * Creates a promise that is resolved. - */ - static resolve(value: U): IPromise; - - /** - * Creates a promise that is rejected. - */ - static reject(error: any): IPromise; - - /* This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => IPromise, onRejected?: (error: any) => IPromise): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => IPromise, onRejected?: (error: any) => U): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => IPromise, onRejected?: (error: any) => void): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => IPromise): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => U): IPromise; - - /** - * This method will be called once the previous promise has been resolved. - * Both the onFulfilled on onRejected callbacks are optional. - * If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. - - * @returns A new promise for the value or error that was returned from onFulfilled/onRejected. - */ - then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => void): IPromise; - - - /** - * Catches failures or exceptions from actions within the promise, or from an unhandled exception earlier in the call stack. - * @param onRejected function to be called if or when the promise rejects. - */ - catch(onRejected?: (error: any) => IPromise): IPromise; - - /** - * Catches failures or exceptions from actions within the promise, or from an unhandled exception earlier in the call stack. - * @param onRejected function to be called if or when the promise rejects. - */ - catch(onRejected?: (error: any) => U): IPromise; - - /** - * Catches failures or exceptions from actions within the promise, or from an unhandled exception earlier in the call stack. - * @param onRejected function to be called if or when the promise rejects. - */ - catch(onRejected?: (error: any) => void): IPromise; - } + export type IPromise = Promise; } declare namespace OfficeExtension { @@ -2887,25 +2780,27 @@ declare namespace OfficeExtension { declare namespace OfficeExtension { export class EventHandlers { constructor(context: ClientRequestContext, parentObject: ClientObject, name: string, eventInfo: EventInfo); - add(handler: (args: T) => IPromise): EventHandlerResult; - remove(handler: (args: T) => IPromise): void; + add(handler: (args: T) => Promise): EventHandlerResult; + remove(handler: (args: T) => Promise): void; } export class EventHandlerResult { - constructor(context: ClientRequestContext, handlers: EventHandlers, handler: (args: T) => IPromise); + constructor(context: ClientRequestContext, handlers: EventHandlers, handler: (args: T) => Promise); + /** The request context associated with the object */ + context: ClientRequestContext; remove(): void; } export interface EventInfo { - registerFunc: (callback: (args: any) => void) => IPromise; - unregisterFunc: (callback: (args: any) => void) => IPromise; - eventArgsTransformFunc: (args: any) => IPromise; + registerFunc: (callback: (args: any) => void) => Promise; + unregisterFunc: (callback: (args: any) => void) => Promise; + eventArgsTransformFunc: (args: any) => Promise; } } declare namespace OfficeExtension { - /** - * Request URL and headers - */ + /** + * Request URL and headers + */ interface RequestUrlAndHeaderInfo { /** Request URL */ url: string; @@ -2930,74 +2825,9 @@ declare namespace OfficeExtension { //////////////////////////////////////////////////////////////// -declare namespace OfficeCore { - /** - * [Api set: Experiment 1.1 (PREVIEW)] - */ - class FlightingService extends OfficeExtension.ClientObject { - getFeature(featureName: string, type: string, defaultValue: number | boolean | string, possibleValues?: Array | Array | Array | Array): OfficeCore.ABType; - getFeatureGate(featureName: string, scope?: string): OfficeCore.ABType; - resetOverride(featureName: string): void; - setOverride(featureName: string, type: string, value: number | boolean | string): void; - /** - * Create a new instance of OfficeCore.FlightingService object - */ - static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.FlightingService; - toJSON(): {}; - } - /** - * - * Provides information about the scoped value. - * - * [Api set: Experiment 1.1 (PREVIEW)] - */ - interface ScopedValue { - /** - * - * Gets the scope. - * - * [Api set: Experiment 1.1 (PREVIEW)] - */ - scope: string; - /** - * - * Gets the value. - * - * [Api set: Experiment 1.1 (PREVIEW)] - */ - value: string | number | boolean; - } - /** - * [Api set: Experiment 1.1 (PREVIEW)] - */ - class ABType extends OfficeExtension.ClientObject { - readonly value: string | number | boolean; - /** - * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. - */ - load(option?: string | string[] | OfficeExtension.LoadOption): OfficeCore.ABType; - toJSON(): { - "value": string | number | boolean; - }; - } - /** - * [Api set: Experiment 1.1 (PREVIEW)] - */ - namespace FeatureType { - var boolean: string; - var integer: string; - var string: string; - } - namespace ExperimentErrorCodes { - var generalException: string; - } - module Interfaces { - } -} declare namespace OfficeCore { class RequestContext extends OfficeExtension.ClientRequestContext { constructor(url?: string | OfficeExtension.RequestUrlAndHeaderInfo | any); - readonly flightingService: FlightingService; } } @@ -3187,7 +3017,7 @@ declare namespace Excel { /** * Close the session. */ - close(): OfficeExtension.IPromise; + close(): Promise; } /** * 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. @@ -3196,44 +3026,51 @@ declare namespace Excel { constructor(url?: string | Session); readonly workbook: Workbook; readonly application: Application; + readonly runtime: Runtime; } /** * 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(batch: (context: Excel.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Excel object model, using a new remote RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param requestInfo - The URL of the remote workbook and the request headers to be sent. * @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(requestInfo: OfficeExtension.RequestUrlAndHeaderInfo | Session, batch: (context: Excel.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(requestInfo: OfficeExtension.RequestUrlAndHeaderInfo | Session, 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 contextObject - 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(contextObject: OfficeExtension.ClientRequestContext, 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + 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 remote 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 requestInfo - The URL of the remote workbook and the request headers to be sent. * @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(requestInfo: OfficeExtension.RequestUrlAndHeaderInfo | Session, object: OfficeExtension.ClientObject, batch: (context: Excel.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(requestInfo: OfficeExtension.RequestUrlAndHeaderInfo | Session, 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + 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 remote RequestContext of previously-created API objects. * @param requestInfo - The URL of the remote workbook and the request headers to be sent. * @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(requestInfo: OfficeExtension.RequestUrlAndHeaderInfo | Session, objects: OfficeExtension.ClientObject[], batch: (context: Excel.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(requestInfo: OfficeExtension.RequestUrlAndHeaderInfo | Session, objects: OfficeExtension.ClientObject[], batch: (context: Excel.RequestContext) => Promise): Promise; /** * * Provides information about the binding that raised the SelectionChanged event. @@ -3322,6 +3159,312 @@ declare namespace Excel { */ settings: Excel.SettingCollection; } + /** + * + * Provides information about the worksheet that raised the Changed event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetChangedEventArgs { + /** + * + * Gets the range address that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Gets the change type that represents how the Changed event is triggered. See Excel.DataChangeType for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetChanged"; + /** + * + * Gets the id of the worksheet in which the data changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * + * Gets the range that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + 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 BETA (PREVIEW ONLY)] + */ + getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; + } + /** + * + * Provides information about the table that raised the Changed event. + * + * [Api set: ExcelApi 1.7] + */ + interface TableChangedEventArgs { + /** + * + * Gets the address that represents the changed area of a table on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Gets the change type that represents how the Changed event is triggered. See Excel.DataChangeType for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the id of the table in which the data changed. + * + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "TableChanged"; + /** + * + * Gets the id of the worksheet in which the data changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * + * Gets the range that represents the changed area of a table on a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + 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 BETA (PREVIEW ONLY)] + */ + getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; + } + /** + * + * Provides information about the worksheet that raised the Activated event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetActivatedEventArgs { + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetActivated"; + /** + * + * Gets the id of the worksheet that is activated. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the Deactivated event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeactivatedEventArgs { + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeactivated"; + /** + * + * Gets the id of the worksheet that is deactivated. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetSelectionChangedEventArgs { + /** + * + * Gets the range address that represents the selected area of a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetSelectionChanged"; + /** + * + * Gets the id of the worksheet in which the selection changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the table that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.7] + */ + interface TableSelectionChangedEventArgs { + /** + * + * Gets the range address that represents the selected area of the table on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Indicates if the selection is inside a table, address will be useless if IsInsideTable is false. + * + * [Api set: ExcelApi 1.7] + */ + isInsideTable: boolean; + /** + * + * Gets the id of the table in which the selection changed. + * + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "TableSelectionChanged"; + /** + * + * Gets the id of the worksheet in which the selection changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the Added event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetAddedEventArgs { + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetAdded"; + /** + * + * Gets the id of the worksheet that is added to the workbook. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the Deleted event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeletedEventArgs { + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeleted"; + /** + * + * Gets the id of the worksheet that is deleted from the workbook. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Represents the Excel Runtime class. + * + * [Api set: ExcelApi 1.5] + */ + class Runtime extends OfficeExtension.ClientObject { + toJSON(): { + [key: string]: string; + }; + } /** * * Represents the Excel application that manages the workbook. @@ -3331,11 +3474,15 @@ declare namespace Excel { class Application extends OfficeExtension.ClientObject { /** * - * Returns the calculation mode used in the workbook. See Excel.CalculationMode for details. Read-only. + * Returns the calculation mode used in the workbook. See Excel.CalculationMode for details. * - * [Api set: ExcelApi 1.1] + * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ - readonly calculationMode: string; + calculationMode: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: Application): void; /** * * Recalculate all currently opened workbooks in Excel. @@ -3344,21 +3491,33 @@ declare namespace Excel { * * @param calculationType Specifies the calculation type to use. See Excel.CalculationType for details. */ - calculate(calculationType: string): void; + calculate(calculationType: Excel.CalculationType): void; + /** + * + * Recalculate all currently opened workbooks in Excel. + * + * [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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ suspendApiCalculationUntilNextSync(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Application; - toJSON(): { - "calculationMode": string; - }; + load(option?: Excel.Interfaces.ApplicationLoadOptions): Excel.Application; + load(option?: string | string[]): Excel.Application; + load(option?: { + select?: string; + expand?: string; + }): Excel.Application; + toJSON(): Excel.Interfaces.ApplicationData; } /** * @@ -3369,67 +3528,113 @@ declare namespace Excel { class Workbook extends OfficeExtension.ClientObject { /** * - * Represents Excel application instance that contains this workbook. Read-only. + * Represents the Excel application instance that contains this workbook. * * [Api set: ExcelApi 1.1] */ readonly application: Excel.Application; /** * - * Represents a collection of bindings that are part of the workbook. Read-only. + * Represents a collection of bindings that are part of the workbook. * * [Api set: ExcelApi 1.1] */ readonly bindings: Excel.BindingCollection; /** * - * Represents the collection of custom XML parts contained by this workbook. Read-only. + * Represents the collection of custom XML parts contained by this workbook. * * [Api set: ExcelApi 1.5] */ readonly customXmlParts: Excel.CustomXmlPartCollection; /** * - * Represents Excel application instance that contains this workbook. Read-only. + * Represents all data connections in the workbook. + * + * [Api set: ExcelApi 1.7] + */ + readonly dataConnections: Excel.DataConnectionCollection; + /** + * + * Represents a collection of worksheet functions that can be used for computation. * * [Api set: ExcelApi 1.2] */ readonly functions: Excel.Functions; /** * - * Represents a collection of workbook scoped named items (named ranges and constants). Read-only. + * Represents a collection of workbook scoped named items (named ranges and constants). * * [Api set: ExcelApi 1.1] */ readonly names: Excel.NamedItemCollection; /** * - * Represents a collection of PivotTables associated with the workbook. Read-only. + * Represents a collection of PivotTables associated with the workbook. * * [Api set: ExcelApi 1.3] */ readonly pivotTables: Excel.PivotTableCollection; /** * - * Represents a collection of Settings associated with the workbook. Read-only. + * Gets the workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + readonly properties: Excel.DocumentProperties; + /** + * + * Returns workbook protection object for a workbook. + * + * [Api set: ExcelApi 1.7] + */ + readonly protection: Excel.WorkbookProtection; + /** + * + * Represents a collection of Settings associated with the workbook. * * [Api set: ExcelApi 1.4] */ readonly settings: Excel.SettingCollection; /** * - * Represents a collection of tables associated with the workbook. Read-only. + * Represents a collection of styles associated with the workbook. + * + * [Api set: ExcelApi 1.7] + */ + readonly styles: Excel.StyleCollection; + /** + * + * Represents a collection of tables associated with the workbook. * * [Api set: ExcelApi 1.1] */ readonly tables: Excel.TableCollection; /** * - * Represents a collection of worksheets associated with the workbook. Read-only. + * Represents a collection of worksheets associated with the workbook. * * [Api set: ExcelApi 1.1] */ readonly worksheets: Excel.WorksheetCollection; + /** + * + * Gets the workbook name. + * + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: Workbook): void; + /** + * + * Gets the currently active cell from the workbook. + * + * [Api set: ExcelApi 1.7] + */ + getActiveCell(): Excel.Range; /** * * Gets the currently selected range from the workbook. @@ -3440,7 +3645,12 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Workbook; + load(option?: Excel.Interfaces.WorkbookLoadOptions): Excel.Workbook; + load(option?: string | string[]): Excel.Workbook; + load(option?: { + select?: string; + expand?: string; + }): Excel.Workbook; /** * * Occurs when the selection in the document is changed. @@ -3448,7 +3658,36 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ readonly onSelectionChanged: OfficeExtension.EventHandlers; - toJSON(): {}; + toJSON(): Excel.Interfaces.WorkbookData; + } + /** + * + * Represents the protection of a workbook object. + * + * [Api set: ExcelApi 1.7] + */ + class WorkbookProtection extends OfficeExtension.ClientObject { + /** + * + * Protects a workbook. Fails if the workbook has been protected. + * + * [Api set: ExcelApi 1.7] + * + * @param password workbook protection password. + */ + protect(password?: string): void; + /** + * + * Unprotects a workbook. + * + * [Api set: ExcelApi 1.7] + * + * @param password workbook protection password. + */ + unprotect(password?: string): void; + toJSON(): { + [key: string]: string; + }; } /** * @@ -3459,21 +3698,28 @@ declare namespace Excel { class Worksheet extends OfficeExtension.ClientObject { /** * - * Returns collection of charts that are part of the worksheet. Read-only. + * Returns collection of charts that are part of the worksheet. * * [Api set: ExcelApi 1.1] */ readonly charts: Excel.ChartCollection; /** * - * Collection of names scoped to the current worksheet. Read-only. + * Gets an object that can be used to manipulate frozen panes on the worksheet. + * + * [Api set: ExcelApi 1.7] + */ + readonly freezePanes: Excel.WorksheetFreezePanes; + /** + * + * Collection of names scoped to the current worksheet. * * [Api set: ExcelApi 1.4] */ readonly names: Excel.NamedItemCollection; /** * - * Collection of PivotTables that are part of the worksheet. Read-only. + * Collection of PivotTables that are part of the worksheet. * * [Api set: ExcelApi 1.3] */ @@ -3487,7 +3733,7 @@ declare namespace Excel { readonly protection: Excel.WorksheetProtection; /** * - * Collection of tables that are part of the worksheet. Read-only. + * Collection of tables that are part of the worksheet. * * [Api set: ExcelApi 1.1] */ @@ -3513,20 +3759,39 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ position: number; + /** + * + * Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly standardHeight: number; + /** + * + * Returns or sets 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. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth: number; + /** + * + * Gets or sets the worksheet tab color. + 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 "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor: string; /** * * The Visibility of the worksheet. * * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] */ - visibility: string; + visibility: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.WorksheetUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Worksheet): void; /** @@ -3540,9 +3805,23 @@ declare namespace Excel { * * Calculates all cells on a worksheet. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ calculate(markAllDirty: boolean): void; + /** + * + * Copy a worksheet and place it at the specified position. Return the copied worksheet. + * + * [Api set: ExcelApi 1.7] + */ + copy(positionType?: Excel.WorksheetPositionType, relativeTo?: Excel.Worksheet): Excel.Worksheet; + /** + * + * Copy a worksheet and place it at the specified position. Return the copied worksheet. + * + * [Api set: ExcelApi 1.7] + */ + copy(positionType?: "None" | "Before" | "After" | "Beginning" | "End", relativeTo?: Excel.Worksheet): Excel.Worksheet; /** * * Deletes the worksheet from the workbook. @@ -3605,6 +3884,18 @@ declare namespace Excel { * @param address The address or the name of the range. 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. + * + * [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; /** * * 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). @@ -3626,14 +3917,41 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Worksheet; - toJSON(): { - "id": string; - "name": string; - "position": number; - "protection": WorksheetProtection; - "visibility": string; - }; + load(option?: Excel.Interfaces.WorksheetLoadOptions): Excel.Worksheet; + load(option?: string | string[]): Excel.Worksheet; + load(option?: { + select?: string; + expand?: string; + }): Excel.Worksheet; + /** + * + * Occurs when the worksheet is activated. + * + * [Api set: ExcelApi 1.7] + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when data changed on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the worksheet is deactivated. + * + * [Api set: ExcelApi 1.7] + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when the selection changed on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.WorksheetData; } /** * @@ -3643,7 +3961,7 @@ declare namespace Excel { */ class WorksheetCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + 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. @@ -3704,8 +4022,38 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.WorksheetCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.WorksheetCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCollection; + load(option?: string | string[]): Excel.WorksheetCollection; + load(option?: OfficeExtension.LoadOption): Excel.WorksheetCollection; + /** + * + * Occurs when any worksheet in the workbook is activated. + * + * [Api set: ExcelApi 1.7] + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when a new worksheet is added to the workbook. + * + * [Api set: ExcelApi 1.7] + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * + * Occurs when any worksheet in the workbook is deactivated. + * + * [Api set: ExcelApi 1.7] + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when a worksheet is deleted from the workbook. + * + * [Api set: ExcelApi 1.7] + */ + readonly onDeleted: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.WorksheetCollectionData; } /** * @@ -3716,7 +4064,7 @@ declare namespace Excel { class WorksheetProtection extends OfficeExtension.ClientObject { /** * - * Sheet protection options. Read-Only. + * Sheet protection options. * * [Api set: ExcelApi 1.2] */ @@ -3730,28 +4078,33 @@ declare namespace Excel { readonly protected: boolean; /** * - * Protects a worksheet. Fails if the worksheet has been protected. + * Protects a worksheet. Fails if the worksheet has already been protected. * - * [Api set: ExcelApi 1.2] + * [Api set: ExcelApi 1.2 for options; 1.7 for password] * * @param options sheet protection options. + * @param password sheet protection password. */ - protect(options?: Excel.WorksheetProtectionOptions): void; + protect(options?: Excel.WorksheetProtectionOptions, password?: string): void; /** * * Unprotects a worksheet. * - * [Api set: ExcelApi 1.2] + * [Api set: ExcelApi 1.7 for password] + * + * @param password sheet protection password. */ - unprotect(): void; + 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.WorksheetProtection; - toJSON(): { - "options": WorksheetProtectionOptions; - "protected": boolean; - }; + load(option?: Excel.Interfaces.WorksheetProtectionLoadOptions): Excel.WorksheetProtection; + load(option?: string | string[]): Excel.WorksheetProtection; + load(option?: { + select?: string; + expand?: string; + }): Excel.WorksheetProtection; + toJSON(): Excel.Interfaces.WorksheetProtectionData; } /** * @@ -3781,6 +4134,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ allowDeleteRows?: boolean; + /** + * + * Represents the worksheet protection option of allowing editing objects. + * + * [Api set: ExcelApi 1.7] + */ + allowEditObjects?: boolean; + /** + * + * Represents the worksheet protection option of allowing editing scenarios. + * + * [Api set: ExcelApi 1.7] + */ + allowEditScenarios?: boolean; /** * * Represents the worksheet protection option of allowing formatting cells. @@ -3837,6 +4204,73 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ allowSort?: boolean; + /** + * + * Represents the worksheet protection option of selection mode. + * + * [Api set: ExcelApi 1.7] + */ + selectionMode?: Excel.ProtectionSelectionMode | "Normal" | "Unlocked" | "None"; + } + /** + * [Api set: ExcelApi 1.7] + */ + class WorksheetFreezePanes extends OfficeExtension.ClientObject { + /** + * + * 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. + * + * [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: Excel.Range | string): void; + /** + * + * Freeze the first column(s) of the worksheet in place. + * + * [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(s) of the worksheet in place. + * + * [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 is corresponds to cells that are frozen in the top- and left-most pane. + * + * [Api set: ExcelApi 1.7] + */ + getLocation(): Excel.Range; + /** + * + * Gets a range that describes the frozen cells in the active worksheet view. + The frozen range is corresponds to cells that are frozen in the top- and left-most pane. + If there is no frozen pane, returns a null object. + * + * [Api set: ExcelApi 1.7] + */ + getLocationOrNullObject(): Excel.Range; + /** + * + * Removes all frozen panes in the worksheet. + * + * [Api set: ExcelApi 1.7] + */ + unfreeze(): void; + toJSON(): { + [key: string]: string; + }; } /** * @@ -3847,9 +4281,9 @@ declare namespace Excel { class Range extends OfficeExtension.ClientObject { /** * - * Collection of ConditionalFormats that intersect the range. Read-only. + * Collection of ConditionalFormats that intersect the range. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly conditionalFormats: Excel.ConditionalFormatCollection; /** @@ -3868,7 +4302,7 @@ declare namespace Excel { readonly sort: Excel.RangeSort; /** * - * The worksheet containing the current range. Read-only. + * The worksheet containing the current range. * * [Api set: ExcelApi 1.1] */ @@ -3918,24 +4352,27 @@ declare namespace Excel { /** * * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - formulas: Array>; + 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. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - formulasLocal: Array>; + formulasLocal: any[][]; /** * * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.2] */ - formulasR1C1: Array>; + formulasR1C1: any[][]; /** * * Represents if all cells of the current range are hidden. @@ -3945,11 +4382,41 @@ declare namespace Excel { readonly hidden: boolean; /** * - * Represents Excel's number format code for the given cell. + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink: Excel.RangeHyperlink; + /** + * + * Represents if the current range is an entire column. + * + * [Api set: ExcelApi 1.7] + */ + readonly isEntireColumn: boolean; + /** + * + * Represents if the current range is an entire row. + * + * [Api set: ExcelApi 1.7] + */ + readonly isEntireRow: boolean; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - numberFormat: Array>; + numberFormat: any[][]; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: any[][]; /** * * Returns the total number of rows in the range. Read-only. @@ -3971,41 +4438,46 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly rowIndex: number; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] + */ + style: string; /** * * 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. Read-only. * * [Api set: ExcelApi 1.1] */ - readonly text: Array>; + readonly text: string[][]; /** * * Represents the type of data of each cell. Read-only. * * [Api set: ExcelApi 1.1] */ - readonly valueTypes: Array>; + readonly valueTypes: Excel.RangeValueType[][]; /** * * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - values: Array>; + values: any[][]; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.RangeUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Range): void; /** * * Calculates a range of cells on a worksheet. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ calculate(): void; /** @@ -4016,7 +4488,16 @@ declare namespace Excel { * * @param applyTo Determines the type of clear action. See Excel.ClearApplyTo for details. */ - clear(applyTo?: string): void; + clear(applyTo?: Excel.ClearApplyTo): void; + /** + * + * Clear range values, format, fill, border, etc. + * + * [Api set: ExcelApi 1.1] + * + * @param applyTo Determines the type of clear action. See Excel.ClearApplyTo for details. + */ + clear(applyTo?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"): void; /** * * Deletes the cells associated with the range. @@ -4025,7 +4506,26 @@ declare namespace Excel { * * @param shift Specifies which way to shift the cells. See Excel.DeleteShiftDirection for details. */ - delete(shift: string): void; + delete(shift: Excel.DeleteShiftDirection): void; + /** + * + * Deletes the cells associated with the range. + * + * [Api set: ExcelApi 1.1] + * + * @param shift Specifies which way to shift the cells. See Excel.DeleteShiftDirection for details. + */ + delete(shift: "Up" | "Left"): 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. + * + * [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:E16". @@ -4086,6 +4586,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ getEntireRow(): Excel.Range; + /** + * + * Renders the range as a base64-encoded png image. + * + * [Api set: ExcelApi 1.7] + */ + getImage(): OfficeExtension.ClientResult; /** * * Gets the range object that represents the rectangular intersection of the given ranges. @@ -4172,6 +4679,13 @@ declare namespace Excel { * @param count 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; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] + */ + getSurroundingRegion(): Excel.Range; /** * * 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. @@ -4205,7 +4719,16 @@ declare namespace Excel { * * @param shift Specifies which way to shift the cells. See Excel.InsertShiftDirection for details. */ - insert(shift: string): Excel.Range; + 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. + * + * [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. @@ -4218,10 +4741,18 @@ declare namespace Excel { /** * * Selects the specified range in the Excel UI. + If multiple selection is not supported on the platform and the range has multiple areas, the "InvalidReference" error will be returned. * * [Api set: ExcelApi 1.1] */ select(): void; + /** + * + * Displays the card for an active cell if it has rich value content. + * + * [Api set: ExcelApi 1.7] + */ + showCard(): void; /** * * Unmerge the range cells into separate cells. @@ -4232,7 +4763,12 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Range; + load(option?: Excel.Interfaces.RangeLoadOptions): Excel.Range; + load(option?: string | string[]): Excel.Range; + load(option?: { + 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 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. */ @@ -4241,26 +4777,7 @@ declare namespace Excel { * 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(): Excel.Range; - toJSON(): { - "address": string; - "addressLocal": string; - "cellCount": number; - "columnCount": number; - "columnHidden": boolean; - "columnIndex": number; - "format": RangeFormat; - "formulas": any[][]; - "formulasLocal": any[][]; - "formulasR1C1": any[][]; - "hidden": boolean; - "numberFormat": any[][]; - "rowCount": number; - "rowHidden": boolean; - "rowIndex": number; - "text": any[][]; - "values": any[][]; - "valueTypes": string[][]; - }; + toJSON(): Excel.Interfaces.RangeData; } /** * @@ -4271,6 +4788,42 @@ declare namespace Excel { interface RangeReference { address: string; } + /** + * + * Represents the necessary strings to get/set a hyperlink (XHL) object. + * + * [Api set: ExcelApi 1.7] + */ + interface RangeHyperlink { + /** + * + * Represents the url target for the hyperlink. + * + * [Api set: ExcelApi 1.7] + */ + address?: string; + /** + * + * Represents the document reference target for the hyperlink. + * + * [Api set: ExcelApi 1.7] + */ + documentReference?: string; + /** + * + * Represents the string displayed when hovering over the hyperlink. + * + * [Api set: ExcelApi 1.7] + */ + screenTip?: string; + /** + * + * Represents the string that is displayed in the top left most cell in the range. + * + * [Api set: ExcelApi 1.7] + */ + textToDisplay?: string; + } /** * * RangeView represents a set of visible cells of the parent range. @@ -4280,7 +4833,7 @@ declare namespace Excel { class RangeView extends OfficeExtension.ClientObject { /** * - * Represents a collection of range views associated with the range. Read-only. + * Represents a collection of range views associated with the range. * * [Api set: ExcelApi 1.3] */ @@ -4291,7 +4844,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.3] */ - readonly cellAddresses: Array>; + readonly cellAddresses: any[][]; /** * * Returns the number of visible columns. Read-only. @@ -4305,21 +4858,21 @@ declare namespace Excel { * * [Api set: ExcelApi 1.3] */ - formulas: Array>; + 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. * * [Api set: ExcelApi 1.3] */ - formulasLocal: Array>; + formulasLocal: any[][]; /** * * Represents the formula in R1C1-style notation. * * [Api set: ExcelApi 1.3] */ - formulasR1C1: Array>; + formulasR1C1: any[][]; /** * * Returns a value that represents the index of the RangeView. Read-only. @@ -4333,7 +4886,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.3] */ - numberFormat: Array>; + numberFormat: any[][]; /** * * Returns the number of visible rows. Read-only. @@ -4347,28 +4900,23 @@ declare namespace Excel { * * [Api set: ExcelApi 1.3] */ - readonly text: Array>; + readonly text: string[][]; /** * * Represents the type of data of each cell. Read-only. * * [Api set: ExcelApi 1.3] */ - readonly valueTypes: Array>; + 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. Cell that contain an error will return the error string. * * [Api set: ExcelApi 1.3] */ - values: Array>; + values: any[][]; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.RangeViewUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: RangeView): void; /** @@ -4381,20 +4929,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeView; - toJSON(): { - "cellAddresses": any[][]; - "columnCount": number; - "formulas": any[][]; - "formulasLocal": any[][]; - "formulasR1C1": any[][]; - "index": number; - "numberFormat": any[][]; - "rowCount": number; - "text": any[][]; - "values": any[][]; - "valueTypes": string[][]; - }; + load(option?: Excel.Interfaces.RangeViewLoadOptions): Excel.RangeView; + load(option?: string | string[]): Excel.RangeView; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeView; + toJSON(): Excel.Interfaces.RangeViewData; } /** * @@ -4404,7 +4945,7 @@ declare namespace Excel { */ class RangeViewCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.RangeView[]; /** * * Gets the number of RangeView objects in the collection. @@ -4424,8 +4965,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeViewCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.RangeViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeViewCollection; + load(option?: string | string[]): Excel.RangeViewCollection; + load(option?: OfficeExtension.LoadOption): Excel.RangeViewCollection; + toJSON(): Excel.Interfaces.RangeViewCollectionData; } /** * @@ -4435,7 +4978,7 @@ declare namespace Excel { */ class SettingCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.Setting[]; /** * * Sets or adds the specified setting to the workbook. @@ -4445,7 +4988,7 @@ declare namespace Excel { * @param key The Key of the new setting. * @param value The Value for the new setting. */ - add(key: string, value: string | number | boolean | Array | any): Excel.Setting; + add(key: string, value: string | number | boolean | Date | Array | any): Excel.Setting; /** * * Gets the number of Settings in the collection. @@ -4474,7 +5017,9 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.SettingCollection; + load(option?: Excel.Interfaces.SettingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SettingCollection; + load(option?: string | string[]): Excel.SettingCollection; + load(option?: OfficeExtension.LoadOption): Excel.SettingCollection; /** * * Occurs when the Settings in the document are changed. @@ -4482,7 +5027,7 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ readonly onSettingsChanged: OfficeExtension.EventHandlers; - toJSON(): {}; + toJSON(): Excel.Interfaces.SettingCollectionData; } /** * @@ -4509,12 +5054,7 @@ declare namespace Excel { */ value: any; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.SettingUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Setting): void; /** @@ -4527,11 +5067,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Setting; - toJSON(): { - "key": string; - "value": any; - }; + load(option?: Excel.Interfaces.SettingLoadOptions): Excel.Setting; + load(option?: string | string[]): Excel.Setting; + load(option?: { + select?: string; + expand?: string; + }): Excel.Setting; + toJSON(): Excel.Interfaces.SettingData; } /** * @@ -4541,7 +5083,7 @@ declare namespace Excel { */ class NamedItemCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.NamedItem[]; /** * * Adds a new name to the collection of the given scope. @@ -4594,8 +5136,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.NamedItemCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.NamedItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedItemCollection; + load(option?: string | string[]): Excel.NamedItemCollection; + load(option?: OfficeExtension.LoadOption): Excel.NamedItemCollection; + toJSON(): Excel.Interfaces.NamedItemCollectionData; } /** * @@ -4604,6 +5148,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class NamedItem extends OfficeExtension.ClientObject { + /** + * + * Returns an object containing values and types of the named item. + * + * [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 items is scoped to the workbook instead. @@ -4625,6 +5176,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ comment: string; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula: any; /** * * The name of the object. Read-only. @@ -4638,14 +5196,14 @@ declare namespace Excel { * * [Api set: ExcelApi 1.4] */ - readonly scope: string; + readonly scope: Excel.NamedItemScope | "Worksheet" | "Workbook"; /** * * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. * - * [Api set: ExcelApi 1.1] + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ - readonly type: string; + readonly type: Excel.NamedItemType | "String" | "Integer" | "Double" | "Boolean" | "Range" | "Error" | "Array"; /** * * Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. @@ -4661,12 +5219,7 @@ declare namespace Excel { */ visible: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.NamedItemUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: NamedItem): void; /** @@ -4693,15 +5246,45 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.NamedItem; - toJSON(): { - "comment": string; - "name": string; - "scope": string; - "type": string; - "value": any; - "visible": boolean; - }; + load(option?: Excel.Interfaces.NamedItemLoadOptions): Excel.NamedItem; + load(option?: string | string[]): Excel.NamedItem; + load(option?: { + select?: string; + expand?: string; + }): Excel.NamedItem; + toJSON(): Excel.Interfaces.NamedItemData; + } + /** + * + * Represents an object containing values and types of a named item. + * + * [Api set: ExcelApi 1.7] + */ + class NamedItemArrayValues extends OfficeExtension.ClientObject { + /** + * + * Represents the types for each item in the named item array + * + * [Api set: ExcelApi 1.7] + */ + readonly types: Excel.RangeValueType[][]; + /** + * + * Represents the values of each item in the named item array. + * + * [Api set: ExcelApi 1.7] + */ + readonly values: any[][]; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Excel.Interfaces.NamedItemArrayValuesLoadOptions): Excel.NamedItemArrayValues; + load(option?: string | string[]): Excel.NamedItemArrayValues; + load(option?: { + select?: string; + expand?: string; + }): Excel.NamedItemArrayValues; + toJSON(): Excel.Interfaces.NamedItemArrayValuesData; } /** * @@ -4723,7 +5306,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - readonly type: string; + readonly type: Excel.BindingType | "Range" | "Table" | "Text"; /** * * Deletes the binding. @@ -4755,7 +5338,12 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Binding; + load(option?: Excel.Interfaces.BindingLoadOptions): Excel.Binding; + load(option?: string | string[]): Excel.Binding; + load(option?: { + select?: string; + expand?: string; + }): Excel.Binding; /** * * Occurs when data or formatting within the binding is changed. @@ -4770,10 +5358,7 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ readonly onSelectionChanged: OfficeExtension.EventHandlers; - toJSON(): { - "id": string; - "type": string; - }; + toJSON(): Excel.Interfaces.BindingData; } /** * @@ -4783,7 +5368,7 @@ declare namespace Excel { */ class BindingCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.Binding[]; /** * * Returns the number of bindings in the collection. Read-only. @@ -4801,10 +5386,22 @@ declare namespace Excel { * @param bindingType Type of binding. See Excel.BindingType. * @param id Name of binding. */ - add(range: Excel.Range | string, bindingType: string, id: string): Excel.Binding; + add(range: Excel.Range | string, bindingType: Excel.BindingType, id: string): Excel.Binding; + /** + * + * Add a new binding to a particular Range. + * + * [Api set: ExcelApi 1.3] + * + * @param range Range to bind the binding to. May be an Excel 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 binding. + */ + add(range: Excel.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. * * [Api set: ExcelApi 1.3] * @@ -4812,17 +5409,41 @@ declare namespace Excel { * @param bindingType Type of binding. See Excel.BindingType. * @param id Name of binding. */ - addFromNamedItem(name: string, bindingType: string, id: string): Excel.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. + * + * [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 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. * * [Api set: ExcelApi 1.3] * * @param bindingType Type of binding. See Excel.BindingType. * @param id Name of binding. */ - addFromSelection(bindingType: string, id: string): Excel.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. + * + * [Api set: ExcelApi 1.3] + * + * @param bindingType Type of binding. See Excel.BindingType. + * @param id Name of binding. + */ + addFromSelection(bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; /** * * Gets the number of bindings in the collection. @@ -4860,10 +5481,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.BindingCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.BindingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.BindingCollection; + load(option?: string | string[]): Excel.BindingCollection; + load(option?: OfficeExtension.LoadOption): Excel.BindingCollection; + toJSON(): Excel.Interfaces.BindingCollectionData; } /** * @@ -4873,7 +5494,7 @@ declare namespace Excel { */ class TableCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.Table[]; /** * * Returns the number of tables in the workbook. Read-only. @@ -4906,7 +5527,7 @@ declare namespace Excel { * * @param key Name or ID of the table to be retrieved. */ - getItem(key: number | string): Excel.Table; + getItem(key: string): Excel.Table; /** * * Gets a table based on its position in the collection. @@ -4924,14 +5545,21 @@ declare namespace Excel { * * @param key Name or ID of the table to be retrieved. */ - getItemOrNullObject(key: number | string): Excel.Table; + 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.TableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableCollection; + load(option?: string | string[]): Excel.TableCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableCollection; + /** + * + * Occurs when data changed on any table in a workbook, or a worksheet. + * + * [Api set: ExcelApi 1.7] + */ + readonly onChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.TableCollectionData; } /** * @@ -4942,14 +5570,14 @@ declare namespace Excel { class Table extends OfficeExtension.ClientObject { /** * - * Represents a collection of all the columns in the table. Read-only. + * Represents a collection of all the columns in the table. * * [Api set: ExcelApi 1.1] */ readonly columns: Excel.TableColumnCollection; /** * - * Represents a collection of all the rows in the table. Read-only. + * Represents a collection of all the rows in the table. * * [Api set: ExcelApi 1.1] */ @@ -4963,7 +5591,7 @@ declare namespace Excel { readonly sort: Excel.TableSort; /** * - * The worksheet containing the current table. Read-only. + * The worksheet containing the current table. * * [Api set: ExcelApi 1.2] */ @@ -4988,7 +5616,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - readonly id: number; + readonly id: string; /** * * Name of the table. @@ -5039,12 +5667,7 @@ declare namespace Excel { */ style: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TableUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Table): void; /** @@ -5106,19 +5729,27 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Table; - toJSON(): { - "highlightFirstColumn": boolean; - "highlightLastColumn": boolean; - "id": number; - "name": string; - "showBandedColumns": boolean; - "showBandedRows": boolean; - "showFilterButton": boolean; - "showHeaders": boolean; - "showTotals": boolean; - "style": string; - }; + load(option?: Excel.Interfaces.TableLoadOptions): Excel.Table; + load(option?: string | string[]): Excel.Table; + load(option?: { + select?: string; + expand?: string; + }): Excel.Table; + /** + * + * Occurs when data changed on a specific table. + * + * [Api set: ExcelApi 1.7] + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the selection changed on a specific table. + * + * [Api set: ExcelApi 1.7] + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.TableData; } /** * @@ -5128,7 +5759,7 @@ declare namespace Excel { */ class TableColumnCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.TableColumn[]; /** * * Returns the number of columns in the table. Read-only. @@ -5184,10 +5815,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableColumnCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.TableColumnCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableColumnCollection; + load(option?: string | string[]): Excel.TableColumnCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableColumnCollection; + toJSON(): Excel.Interfaces.TableColumnCollectionData; } /** * @@ -5230,14 +5861,9 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - values: Array>; + values: any[][]; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TableColumnUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: TableColumn): void; /** @@ -5278,13 +5904,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableColumn; - toJSON(): { - "id": number; - "index": number; - "name": string; - "values": any[][]; - }; + load(option?: Excel.Interfaces.TableColumnLoadOptions): Excel.TableColumn; + load(option?: string | string[]): Excel.TableColumn; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableColumn; + toJSON(): Excel.Interfaces.TableColumnData; } /** * @@ -5299,7 +5925,7 @@ declare namespace Excel { */ class TableRowCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.TableRow[]; /** * * Returns the number of rows in the table. Read-only. @@ -5346,10 +5972,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableRowCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.TableRowCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableRowCollection; + load(option?: string | string[]): Excel.TableRowCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableRowCollection; + toJSON(): Excel.Interfaces.TableRowCollectionData; } /** * @@ -5376,14 +6002,9 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - values: Array>; + values: any[][]; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TableRowUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: TableRow): void; /** @@ -5403,11 +6024,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableRow; - toJSON(): { - "index": number; - "values": any[][]; - }; + load(option?: Excel.Interfaces.TableRowLoadOptions): Excel.TableRow; + load(option?: string | string[]): Excel.TableRow; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableRow; + toJSON(): Excel.Interfaces.TableRowData; } /** * @@ -5418,21 +6041,21 @@ declare namespace Excel { class RangeFormat extends OfficeExtension.ClientObject { /** * - * Collection of border objects that apply to the overall range. Read-only. + * Collection of border objects that apply to the overall range. * * [Api set: ExcelApi 1.1] */ readonly borders: Excel.RangeBorderCollection; /** * - * Returns the fill object defined on the overall range. Read-only. + * Returns the fill object defined on the overall range. * * [Api set: ExcelApi 1.1] */ readonly fill: Excel.RangeFill; /** * - * Returns the font object defined on the overall range. Read-only. + * Returns the font object defined on the overall range. * * [Api set: ExcelApi 1.1] */ @@ -5457,21 +6080,50 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - horizontalAlignment: string; + horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * - * Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned. + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. * * [Api set: ExcelApi 1.2] */ rowHeight: number; + /** + * + * Gets or sets 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. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight: boolean; + /** + * + * Indicates whether the columnwidth 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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth: boolean; /** * * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. * * [Api set: ExcelApi 1.1] */ - verticalAlignment: string; + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting @@ -5480,12 +6132,7 @@ declare namespace Excel { */ wrapText: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.RangeFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: RangeFormat): void; /** @@ -5505,17 +6152,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeFormat; - toJSON(): { - "columnWidth": number; - "fill": RangeFill; - "font": RangeFont; - "horizontalAlignment": string; - "protection": FormatProtection; - "rowHeight": number; - "verticalAlignment": string; - "wrapText": boolean; - }; + load(option?: Excel.Interfaces.RangeFormatLoadOptions): Excel.RangeFormat; + load(option?: string | string[]): Excel.RangeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFormat; + toJSON(): Excel.Interfaces.RangeFormatData; } /** * @@ -5539,22 +6182,19 @@ declare namespace Excel { */ locked: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.FormatProtectionUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: FormatProtection): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.FormatProtection; - toJSON(): { - "formulaHidden": boolean; - "locked": boolean; - }; + load(option?: Excel.Interfaces.FormatProtectionLoadOptions): Excel.FormatProtection; + load(option?: string | string[]): Excel.FormatProtection; + load(option?: { + select?: string; + expand?: string; + }): Excel.FormatProtection; + toJSON(): Excel.Interfaces.FormatProtectionData; } /** * @@ -5571,12 +6211,7 @@ declare namespace Excel { */ color: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.RangeFillUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: RangeFill): void; /** @@ -5589,10 +6224,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeFill; - toJSON(): { - "color": string; - }; + load(option?: Excel.Interfaces.RangeFillLoadOptions): Excel.RangeFill; + load(option?: string | string[]): Excel.RangeFill; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFill; + toJSON(): Excel.Interfaces.RangeFillData; } /** * @@ -5614,40 +6252,35 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - readonly sideIndex: string; + 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. * * [Api set: ExcelApi 1.1] */ - style: string; + style: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; /** * * Specifies the weight of the border around a range. See Excel.BorderWeight for details. * * [Api set: ExcelApi 1.1] */ - weight: string; + weight: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.RangeBorderUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: RangeBorder): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeBorder; - toJSON(): { - "color": string; - "sideIndex": string; - "style": string; - "weight": string; - }; + load(option?: Excel.Interfaces.RangeBorderLoadOptions): Excel.RangeBorder; + load(option?: string | string[]): Excel.RangeBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeBorder; + toJSON(): Excel.Interfaces.RangeBorderData; } /** * @@ -5657,7 +6290,7 @@ declare namespace Excel { */ class RangeBorderCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.RangeBorder[]; /** * * Number of border objects in the collection. Read-only. @@ -5673,7 +6306,16 @@ declare namespace Excel { * * @param index Index value of the border object to be retrieved. See Excel.BorderIndex for details. */ - getItem(index: string): Excel.RangeBorder; + getItem(index: Excel.BorderIndex): Excel.RangeBorder; + /** + * + * Gets a border object using its name + * + * [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 @@ -5686,10 +6328,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeBorderCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.RangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeBorderCollection; + load(option?: string | string[]): Excel.RangeBorderCollection; + load(option?: OfficeExtension.LoadOption): Excel.RangeBorderCollection; + toJSON(): Excel.Interfaces.RangeBorderCollectionData; } /** * @@ -5739,28 +6381,21 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - underline: string; + underline: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.RangeFontUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: RangeFont): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeFont; - toJSON(): { - "bold": boolean; - "color": string; - "italic": boolean; - "name": string; - "size": number; - "underline": string; - }; + load(option?: Excel.Interfaces.RangeFontLoadOptions): Excel.RangeFont; + load(option?: string | string[]): Excel.RangeFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFont; + toJSON(): Excel.Interfaces.RangeFontData; } /** * @@ -5770,7 +6405,7 @@ declare namespace Excel { */ class ChartCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.Chart[]; /** * * Returns the number of charts in the worksheet. Read-only. @@ -5785,10 +6420,21 @@ declare namespace Excel { * [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 sourceData The range corresponding to the source data. * @param seriesBy Specifies the way columns or rows are used as data series on the chart. See Excel.ChartSeriesBy for details. */ - add(type: string, sourceData: Excel.Range, seriesBy?: string): Excel.Chart; + add(type: Excel.ChartType, sourceData: Excel.Range | string, seriesBy?: Excel.ChartSeriesBy): Excel.Chart; + /** + * + * Creates a new chart. + * + * [Api set: ExcelApi 1.1] + * + * @param type Represents the type of a chart. See Excel.ChartType for details. + * @param sourceData The range corresponding to the source data. + * @param seriesBy 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", sourceData: Excel.Range | string, seriesBy?: "Auto" | "Columns" | "Rows"): Excel.Chart; /** * * Returns the number of charts in the worksheet. @@ -5827,10 +6473,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.ChartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartCollection; + load(option?: string | string[]): Excel.ChartCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartCollection; + toJSON(): Excel.Interfaces.ChartCollectionData; } /** * @@ -5841,14 +6487,14 @@ declare namespace Excel { class Chart extends OfficeExtension.ClientObject { /** * - * Represents chart axes. Read-only. + * Represents chart axes. * * [Api set: ExcelApi 1.1] */ readonly axes: Excel.ChartAxes; /** * - * Represents the datalabels on the chart. Read-only. + * Represents the datalabels on the chart. * * [Api set: ExcelApi 1.1] */ @@ -5862,32 +6508,39 @@ declare namespace Excel { readonly format: Excel.ChartAreaFormat; /** * - * Represents the legend for the chart. Read-only. + * Represents the legend for the chart. * * [Api set: ExcelApi 1.1] */ readonly legend: Excel.ChartLegend; /** * - * Represents either a single series or collection of series in the chart. Read-only. + * Represents either a single series or collection of series in the chart. * * [Api set: ExcelApi 1.1] */ readonly series: Excel.ChartSeriesCollection; /** * - * Represents the title of the specified chart, including the text, visibility, position and formating of the title. Read-only. + * Represents the title of the specified chart, including the text, visibility, position and formating of the title. * * [Api set: ExcelApi 1.1] */ readonly title: Excel.ChartTitle; /** * - * The worksheet containing the current chart. Read-only. + * The worksheet containing the current chart. * * [Api set: ExcelApi 1.2] */ readonly worksheet: Excel.Worksheet; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [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"; /** * * Represents the height, in points, of the chart object. @@ -5895,6 +6548,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ height: number; + /** + * + * The unique id of chart. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly id: string; /** * * The distance, in points, from the left side of the chart to the worksheet origin. @@ -5909,6 +6569,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ name: string; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons: boolean; /** * * Represents 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). @@ -5924,12 +6591,7 @@ declare namespace Excel { */ width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Chart): void; /** @@ -5950,17 +6612,39 @@ declare namespace Excel { * @param width (Optional) The desired width of the resulting image. * @param fittingMode (Optional) The method used to scale the chart to the specified to the specified dimensions (if both height and width are set)." */ - getImage(width?: number, height?: number, fittingMode?: string): OfficeExtension.ClientResult; + 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. + * + * [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 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. * * [Api set: ExcelApi 1.1] * - * @param sourceData The Range object corresponding to the source data. + * @param sourceData The range 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, Columns. See Excel.ChartSeriesBy for details. */ - setData(sourceData: Excel.Range, seriesBy?: string): void; + setData(sourceData: Excel.Range | string, seriesBy?: Excel.ChartSeriesBy): void; + /** + * + * Resets the source data for the chart. + * + * [Api set: ExcelApi 1.1] + * + * @param sourceData The range 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, Columns. See Excel.ChartSeriesBy for details. + */ + setData(sourceData: Excel.Range | string, seriesBy?: "Auto" | "Columns" | "Rows"): void; /** * * Positions the chart relative to cells on the worksheet. @@ -5974,19 +6658,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Chart; - toJSON(): { - "axes": ChartAxes; - "dataLabels": ChartDataLabels; - "format": ChartAreaFormat; - "height": number; - "left": number; - "legend": ChartLegend; - "name": string; - "title": ChartTitle; - "top": number; - "width": number; - }; + load(option?: Excel.Interfaces.ChartLoadOptions): Excel.Chart; + load(option?: string | string[]): Excel.Chart; + load(option?: { + select?: string; + expand?: string; + }): Excel.Chart; + toJSON(): Excel.Interfaces.ChartData; } /** * @@ -5997,35 +6675,39 @@ declare namespace Excel { class ChartAreaFormat extends OfficeExtension.ClientObject { /** * - * Represents the fill format of an object, which includes background formatting information. Read-only. + * Represents the border format of chart area, which includes color, linestyle and weight. + * + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of an object, which includes background formatting information. * * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * - * Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + * Represents the font attributes (font name, font size, color, etc.) for the current object. * * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartAreaFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartAreaFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAreaFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartAreaFormatLoadOptions): Excel.ChartAreaFormat; + load(option?: string | string[]): Excel.ChartAreaFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAreaFormat; + toJSON(): Excel.Interfaces.ChartAreaFormatData; } /** * @@ -6035,7 +6717,7 @@ declare namespace Excel { */ class ChartSeriesCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.ChartSeries[]; /** * * Returns the number of series in the collection. Read-only. @@ -6043,6 +6725,16 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly count: number; + /** + * + * Add a new series to the collection. The new added series is not visible until set values/x axis values/bubble sizes for it (depending on chart type). + * + * [Api set: ExcelApi 1.7] + * + * @param name Name of the series. + * @param index 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. @@ -6052,7 +6744,7 @@ declare namespace Excel { getCount(): OfficeExtension.ClientResult; /** * - * Retrieves a series based on its position in the collection + * Retrieves a series based on its position in the collection. * * [Api set: ExcelApi 1.1] * @@ -6062,10 +6754,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartSeriesCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.ChartSeriesCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartSeriesCollection; + load(option?: string | string[]): Excel.ChartSeriesCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartSeriesCollection; + toJSON(): Excel.Interfaces.ChartSeriesCollectionData; } /** * @@ -6076,18 +6768,90 @@ declare namespace Excel { class ChartSeries extends OfficeExtension.ClientObject { /** * - * Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + * Represents the formatting of a chart series, which includes fill and line formatting. * * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartSeriesFormat; /** * - * Represents a collection of all points in the series. Read-only. + * Represents a collection of all points in the series. * * [Api set: ExcelApi 1.1] */ readonly points: Excel.ChartPointsCollection; + /** + * + * Represents a collection of trendlines in the series. + * + * [Api set: ExcelApi 1.7] + */ + readonly trendlines: Excel.ChartTrendlineCollection; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [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"; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize: number; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered: 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. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth: number; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; /** * * Represents the name of a series in a chart. @@ -6095,23 +6859,75 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ name: string; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder: number; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable for line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartSeriesUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartSeries): void; + /** + * + * Deletes the chart series. + * + * [Api set: ExcelApi 1.7] + */ + delete(): void; + /** + * + * Set bubble sizes for a chart series. Only works for bubble charts. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setBubbleSizes(sourceData: Excel.Range): void; + /** + * + * Set values for a chart series. For scatter chart, it means Y axis values. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setValues(sourceData: Excel.Range): void; + /** + * + * Set values of X axis for a chart series. Only works for scatter charts. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setXAxisValues(sourceData: Excel.Range): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartSeries; - toJSON(): { - "format": ChartSeriesFormat; - "name": string; - }; + load(option?: Excel.Interfaces.ChartSeriesLoadOptions): Excel.ChartSeries; + load(option?: string | string[]): Excel.ChartSeries; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartSeries; + toJSON(): Excel.Interfaces.ChartSeriesData; } /** * @@ -6122,35 +6938,32 @@ declare namespace Excel { class ChartSeriesFormat extends OfficeExtension.ClientObject { /** * - * Represents the fill format of a chart series, which includes background formating information. Read-only. + * Represents the fill format of a chart series, which includes background formating information. * * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * - * Represents line formatting. Read-only. + * Represents line formatting. * * [Api set: ExcelApi 1.1] */ readonly line: Excel.ChartLineFormat; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartSeriesFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartSeriesFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartSeriesFormat; - toJSON(): { - "fill": ChartFill; - "line": ChartLineFormat; - }; + load(option?: Excel.Interfaces.ChartSeriesFormatLoadOptions): Excel.ChartSeriesFormat; + load(option?: string | string[]): Excel.ChartSeriesFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartSeriesFormat; + toJSON(): Excel.Interfaces.ChartSeriesFormatData; } /** * @@ -6160,7 +6973,7 @@ declare namespace Excel { */ class ChartPointsCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.ChartPoint[]; /** * * Returns the number of chart points in the series. Read-only. @@ -6187,10 +7000,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartPointsCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.ChartPointsCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartPointsCollection; + load(option?: string | string[]): Excel.ChartPointsCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartPointsCollection; + toJSON(): Excel.Interfaces.ChartPointsCollectionData; } /** * @@ -6199,6 +7012,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartPoint extends OfficeExtension.ClientObject { + /** + * + * Returns the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + readonly dataLabel: Excel.ChartDataLabel; /** * * Encapsulates the format properties chart point. Read-only. @@ -6206,6 +7026,41 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartPointFormat; + /** + * + * Represents whether a data point has datalabel. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [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. Read-only. @@ -6213,14 +7068,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly value: any; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartPoint): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartPoint; - toJSON(): { - "format": ChartPointFormat; - "value": any; - }; + load(option?: Excel.Interfaces.ChartPointLoadOptions): Excel.ChartPoint; + load(option?: string | string[]): Excel.ChartPoint; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPoint; + toJSON(): Excel.Interfaces.ChartPointData; } /** * @@ -6231,18 +7092,32 @@ declare namespace Excel { class ChartPointFormat extends OfficeExtension.ClientObject { /** * - * Represents the fill format of a chart, which includes background formating information. Read-only. + * Represents the border format of a chart data point, which includes color, style and weight information. + * + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of a chart, which includes background formating information. * * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartPointFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartPointFormat; - toJSON(): { - "fill": ChartFill; - }; + load(option?: Excel.Interfaces.ChartPointFormatLoadOptions): Excel.ChartPointFormat; + load(option?: string | string[]): Excel.ChartPointFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPointFormat; + toJSON(): Excel.Interfaces.ChartPointFormatData; } /** * @@ -6253,43 +7128,59 @@ declare namespace Excel { class ChartAxes extends OfficeExtension.ClientObject { /** * - * Represents the category axis in a chart. Read-only. + * Represents the category axis in a chart. * * [Api set: ExcelApi 1.1] */ readonly categoryAxis: Excel.ChartAxis; /** * - * Represents the series axis of a 3-dimensional chart. Read-only. + * Represents the series axis of a 3-dimensional chart. * * [Api set: ExcelApi 1.1] */ readonly seriesAxis: Excel.ChartAxis; /** * - * Represents the value axis in an axis. Read-only. + * Represents the value axis in an axis. * * [Api set: ExcelApi 1.1] */ readonly valueAxis: Excel.ChartAxis; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartAxesUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartAxes): void; + /** + * + * Returns the specific axis identified by type and group. + * + * [Api set: ExcelApi 1.7] + * + * @param type Specifies the axis type. See Excel.ChartAxis for details. + * @param group Specifies the axis group. See Excel.ChartAxis for details. + */ + getItem(type: Excel.ChartAxisType, group?: Excel.ChartAxisGroup): Excel.ChartAxis; + /** + * + * Returns the specific axis identified by type and group. + * + * [Api set: ExcelApi 1.7] + * + * @param type Specifies the axis type. See Excel.ChartAxis for details. + * @param group Specifies the axis group. See Excel.ChartAxis 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxes; - toJSON(): { - "categoryAxis": ChartAxis; - "seriesAxis": ChartAxis; - "valueAxis": ChartAxis; - }; + load(option?: Excel.Interfaces.ChartAxesLoadOptions): Excel.ChartAxes; + load(option?: string | string[]): Excel.ChartAxes; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxes; + toJSON(): Excel.Interfaces.ChartAxesData; } /** * @@ -6300,32 +7191,102 @@ declare namespace Excel { class ChartAxis extends OfficeExtension.ClientObject { /** * - * Represents the formatting of a chart object, which includes line and font formatting. Read-only. + * Represents the formatting of a chart object, which includes line and font formatting. * * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartAxisFormat; /** * - * Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + * Returns a gridlines object that represents the major gridlines for the specified axis. * * [Api set: ExcelApi 1.1] */ readonly majorGridlines: Excel.ChartGridlines; /** * - * Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + * Returns a Gridlines object that represents the minor gridlines for the specified axis. * * [Api set: ExcelApi 1.1] */ readonly minorGridlines: Excel.ChartGridlines; /** * - * Represents the axis title. Read-only. + * Represents the axis title. * * [Api set: ExcelApi 1.1] */ readonly title: Excel.ChartAxisTitle; + /** + * + * Represents the group for the specified axis. See Excel.ChartAxisGroup for details. + * + * [Api set: ExcelApi 1.7] + */ + readonly axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * + * Represents the custom axis display unit value. Read Only. To set this property, please use the SetCustomDisplayUnit(double) method. + * + * [Api set: ExcelApi 1.7] + */ + readonly customDisplayUnit: number; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * + * Represents the height, in points, of the chart axis. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * + * Represents the distance, in points, from the left edge of the axis to the left of chart area. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + readonly left: number; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase: number; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. @@ -6347,6 +7308,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ minimum: any; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. @@ -6354,29 +7329,108 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ minorUnit: any; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel: boolean; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * + * Represents 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. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing: any; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing: number; + /** + * + * Represents the distance, in points, from the top edge of the axis to the top of chart area. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + readonly top: number; + /** + * + * Represents the axis type. See Excel.ChartAxisType for details. + * + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** + * + * Represents the width, in points, of the chart axis. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + readonly width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartAxisUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartAxis): void; + /** + * + * Sets all the category names for the specified axis. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setCategoryNames(sourceData: Excel.Range): void; + /** + * + * Sets the axis display unit to a custom value. + * + * [Api set: ExcelApi 1.7] + * + * @param value Custom value of the display unit + */ + setCustomDisplayUnit(value: number): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxis; - toJSON(): { - "format": ChartAxisFormat; - "majorGridlines": ChartGridlines; - "majorUnit": any; - "maximum": any; - "minimum": any; - "minorGridlines": ChartGridlines; - "minorUnit": any; - "title": ChartAxisTitle; - }; + load(option?: Excel.Interfaces.ChartAxisLoadOptions): Excel.ChartAxis; + load(option?: string | string[]): Excel.ChartAxis; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxis; + toJSON(): Excel.Interfaces.ChartAxisData; } /** * @@ -6387,35 +7441,32 @@ declare namespace Excel { class ChartAxisFormat extends OfficeExtension.ClientObject { /** * - * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. * * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** * - * Represents chart line formatting. Read-only. + * Represents chart line formatting. * * [Api set: ExcelApi 1.1] */ readonly line: Excel.ChartLineFormat; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartAxisFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartAxisFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxisFormat; - toJSON(): { - "font": ChartFont; - "line": ChartLineFormat; - }; + load(option?: Excel.Interfaces.ChartAxisFormatLoadOptions): Excel.ChartAxisFormat; + load(option?: string | string[]): Excel.ChartAxisFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisFormat; + toJSON(): Excel.Interfaces.ChartAxisFormatData; } /** * @@ -6426,7 +7477,7 @@ declare namespace Excel { class ChartAxisTitle extends OfficeExtension.ClientObject { /** * - * Represents the formatting of chart axis title. Read-only. + * Represents the formatting of chart axis title. * * [Api set: ExcelApi 1.1] */ @@ -6446,23 +7497,19 @@ declare namespace Excel { */ visible: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartAxisTitleUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartAxisTitle): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxisTitle; - toJSON(): { - "format": ChartAxisTitleFormat; - "text": string; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartAxisTitleLoadOptions): Excel.ChartAxisTitle; + load(option?: string | string[]): Excel.ChartAxisTitle; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisTitle; + toJSON(): Excel.Interfaces.ChartAxisTitleData; } /** * @@ -6473,27 +7520,25 @@ declare namespace Excel { class ChartAxisTitleFormat extends OfficeExtension.ClientObject { /** * - * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. * * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartAxisTitleFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartAxisTitleFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxisTitleFormat; - toJSON(): { - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions): Excel.ChartAxisTitleFormat; + load(option?: string | string[]): Excel.ChartAxisTitleFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisTitleFormat; + toJSON(): Excel.Interfaces.ChartAxisTitleFormatData; } /** * @@ -6504,7 +7549,7 @@ declare namespace Excel { class ChartDataLabels extends OfficeExtension.ClientObject { /** * - * Represents the format of chart data labels, which includes fill and font formatting. Read-only. + * Represents the format of chart data labels, which includes fill and font formatting. * * [Api set: ExcelApi 1.1] */ @@ -6515,7 +7560,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - position: string; + 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. @@ -6566,29 +7611,97 @@ declare namespace Excel { */ showValue: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartDataLabelsUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartDataLabels): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartDataLabels; - toJSON(): { - "format": ChartDataLabelFormat; - "position": string; - "separator": string; - "showBubbleSize": boolean; - "showCategoryName": boolean; - "showLegendKey": boolean; - "showPercentage": boolean; - "showSeriesName": boolean; - "showValue": boolean; - }; + load(option?: Excel.Interfaces.ChartDataLabelsLoadOptions): Excel.ChartDataLabels; + load(option?: string | string[]): Excel.ChartDataLabels; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabels; + toJSON(): Excel.Interfaces.ChartDataLabelsData; + } + /** + * + * Represents the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + class ChartDataLabel extends OfficeExtension.ClientObject { + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + separator: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue: boolean; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartDataLabel): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Excel.Interfaces.ChartDataLabelLoadOptions): Excel.ChartDataLabel; + load(option?: string | string[]): Excel.ChartDataLabel; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabel; + toJSON(): Excel.Interfaces.ChartDataLabelData; } /** * @@ -6599,35 +7712,32 @@ declare namespace Excel { class ChartDataLabelFormat extends OfficeExtension.ClientObject { /** * - * Represents the fill format of the current chart data label. Read-only. + * Represents the fill format of the current chart data label. * * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * - * Represents the font attributes (font name, font size, color, etc.) for a chart data label. Read-only. + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. * * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartDataLabelFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartDataLabelFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartDataLabelFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartDataLabelFormatLoadOptions): Excel.ChartDataLabelFormat; + load(option?: string | string[]): Excel.ChartDataLabelFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabelFormat; + toJSON(): Excel.Interfaces.ChartDataLabelFormatData; } /** * @@ -6638,7 +7748,7 @@ declare namespace Excel { class ChartGridlines extends OfficeExtension.ClientObject { /** * - * Represents the formatting of chart gridlines. Read-only. + * Represents the formatting of chart gridlines. * * [Api set: ExcelApi 1.1] */ @@ -6651,22 +7761,19 @@ declare namespace Excel { */ visible: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartGridlinesUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartGridlines): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartGridlines; - toJSON(): { - "format": ChartGridlinesFormat; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartGridlinesLoadOptions): Excel.ChartGridlines; + load(option?: string | string[]): Excel.ChartGridlines; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartGridlines; + toJSON(): Excel.Interfaces.ChartGridlinesData; } /** * @@ -6677,27 +7784,25 @@ declare namespace Excel { class ChartGridlinesFormat extends OfficeExtension.ClientObject { /** * - * Represents chart line formatting. Read-only. + * Represents chart line formatting. * * [Api set: ExcelApi 1.1] */ readonly line: Excel.ChartLineFormat; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartGridlinesFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartGridlinesFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartGridlinesFormat; - toJSON(): { - "line": ChartLineFormat; - }; + load(option?: Excel.Interfaces.ChartGridlinesFormatLoadOptions): Excel.ChartGridlinesFormat; + load(option?: string | string[]): Excel.ChartGridlinesFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartGridlinesFormat; + toJSON(): Excel.Interfaces.ChartGridlinesFormatData; } /** * @@ -6708,11 +7813,32 @@ declare namespace Excel { class ChartLegend extends OfficeExtension.ClientObject { /** * - * Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. + * Represents the formatting of a chart legend, which includes fill and font formatting. * * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartLegendFormat; + /** + * + * Represents a collection of legendEntries in the legend. + * + * [Api set: ExcelApi 1.7] + */ + readonly legendEntries: Excel.ChartLegendEntryCollection; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height: number; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left: number; /** * * Boolean value for whether the chart legend should overlap with the main body of the chart. @@ -6726,7 +7852,21 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - position: string; + position: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top: number; /** * * A boolean value the represents the visibility of a ChartLegend object. @@ -6734,25 +7874,89 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ visible: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartLegendUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartLegend): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartLegend; - toJSON(): { - "format": ChartLegendFormat; - "overlay": boolean; - "position": string; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartLegendLoadOptions): Excel.ChartLegend; + load(option?: string | string[]): Excel.ChartLegend; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegend; + toJSON(): Excel.Interfaces.ChartLegendData; + } + /** + * + * Represents the legendEntry in legendEntryCollection. + * + * [Api set: ExcelApi 1.7] + */ + class ChartLegendEntry extends OfficeExtension.ClientObject { + /** + * + * Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartLegendEntry): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Excel.Interfaces.ChartLegendEntryLoadOptions): Excel.ChartLegendEntry; + load(option?: string | string[]): Excel.ChartLegendEntry; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegendEntry; + toJSON(): Excel.Interfaces.ChartLegendEntryData; + } + /** + * + * Represents a collection of legendEntries. + * + * [Api set: ExcelApi 1.7] + */ + class ChartLegendEntryCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ChartLegendEntry[]; + /** + * + * Returns the number of legendEntry in the collection. + * + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a legendEntry at the given index. + * + * [Api set: ExcelApi 1.7] + * + * @param index Index of the legendEntry 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. + */ + load(option?: Excel.Interfaces.ChartLegendEntryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartLegendEntryCollection; + load(option?: string | string[]): Excel.ChartLegendEntryCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartLegendEntryCollection; + toJSON(): Excel.Interfaces.ChartLegendEntryCollectionData; } /** * @@ -6763,35 +7967,32 @@ declare namespace Excel { class ChartLegendFormat extends OfficeExtension.ClientObject { /** * - * Represents the fill format of an object, which includes background formating information. Read-only. + * Represents the fill format of an object, which includes background formating information. * * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * - * Represents the font attributes such as font name, font size, color, etc. of a chart legend. Read-only. + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. * * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartLegendFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartLegendFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartLegendFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartLegendFormatLoadOptions): Excel.ChartLegendFormat; + load(option?: string | string[]): Excel.ChartLegendFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegendFormat; + toJSON(): Excel.Interfaces.ChartLegendFormatData; } /** * @@ -6802,11 +8003,32 @@ declare namespace Excel { class ChartTitle extends OfficeExtension.ClientObject { /** * - * Represents the formatting of a chart title, which includes fill and font formatting. Read-only. + * Represents the formatting of a chart title, which includes fill and font formatting. * * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartTitleFormat; + /** + * + * Returns the height, in points, of the chart title. Read-only. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + left: number; /** * * Boolean value representing if the chart title will overlay the chart or not. @@ -6814,6 +8036,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ overlay: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; /** * * Represents the title text of a chart. @@ -6821,6 +8057,27 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ text: string; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation: number; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + top: number; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * * A boolean value the represents the visibility of a chart title object. @@ -6828,25 +8085,75 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ visible: boolean; + /** + * + * Returns the width, in points, of the chart title. Read-only. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + readonly width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartTitleUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartTitle): void; + /** + * + * Get the substring of a chart title. Line break '\n' also counts one charater. + * + * [Api set: ExcelApi 1.7] + * + * @param start Start position of substring to be retrieved. Position start with 0. + * @param length Length of 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. + * + * [Api set: ExcelApi 1.7] + * + * @param formula a string that present 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartTitle; - toJSON(): { - "format": ChartTitleFormat; - "overlay": boolean; - "text": string; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartTitleLoadOptions): Excel.ChartTitle; + load(option?: string | string[]): Excel.ChartTitle; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTitle; + toJSON(): Excel.Interfaces.ChartTitleData; + } + /** + * + * Represents the substring in chart related objects that contains text, like ChartTitle object, ChartAxisTitle object, etc. + * + * [Api set: ExcelApi 1.7] + */ + class ChartFormatString extends OfficeExtension.ClientObject { + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart characters object. + * + * [Api set: ExcelApi 1.7] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartFormatString): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Excel.Interfaces.ChartFormatStringLoadOptions): Excel.ChartFormatString; + load(option?: string | string[]): Excel.ChartFormatString; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartFormatString; + toJSON(): Excel.Interfaces.ChartFormatStringData; } /** * @@ -6857,35 +8164,39 @@ declare namespace Excel { class ChartTitleFormat extends OfficeExtension.ClientObject { /** * - * Represents the fill format of an object, which includes background formating information. Read-only. + * Represents the border format of chart title, which includes color, linestyle and weight. + * + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of an object, which includes background formating information. * * [Api set: ExcelApi 1.1] */ readonly fill: Excel.ChartFill; /** * - * Represents the font attributes (font name, font size, color, etc.) for an object. Read-only. + * Represents the font attributes (font name, font size, color, etc.) for an object. * * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartTitleFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartTitleFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartTitleFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartTitleFormatLoadOptions): Excel.ChartTitleFormat; + load(option?: string | string[]): Excel.ChartTitleFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTitleFormat; + toJSON(): Excel.Interfaces.ChartTitleFormatData; } /** * @@ -6914,7 +8225,52 @@ declare namespace Excel { * @param color HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). */ setSolidColor(color: string): void; - toJSON(): {}; + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Represents the border formatting of a chart element. + * + * [Api set: ExcelApi 1.7] + */ + class ChartBorder extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of borders in the chart. + * + * [Api set: ExcelApi 1.7] + */ + color: string; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + weight: number; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartBorder): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Excel.Interfaces.ChartBorderLoadOptions): Excel.ChartBorder; + load(option?: string | string[]): Excel.ChartBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartBorder; + toJSON(): Excel.Interfaces.ChartBorderData; } /** * @@ -6930,13 +8286,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ color: string; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + weight: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartLineFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartLineFormat): void; /** @@ -6949,10 +8314,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartLineFormat; - toJSON(): { - "color": string; - }; + load(option?: Excel.Interfaces.ChartLineFormatLoadOptions): Excel.ChartLineFormat; + load(option?: string | string[]): Excel.ChartLineFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLineFormat; + toJSON(): Excel.Interfaces.ChartLineFormatData; } /** * @@ -7002,28 +8370,172 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - underline: string; + underline: Excel.ChartUnderlineStyle | "None" | "Single"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ChartFontUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ChartFont): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartFont; - toJSON(): { - "bold": boolean; - "color": string; - "italic": boolean; - "name": string; - "size": number; - "underline": string; - }; + load(option?: Excel.Interfaces.ChartFontLoadOptions): Excel.ChartFont; + load(option?: string | string[]): Excel.ChartFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartFont; + toJSON(): Excel.Interfaces.ChartFontData; + } + /** + * + * This object represents the attributes for a chart trendline object. + * + * [Api set: ExcelApi 1.7] + */ + class ChartTrendline extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + readonly format: Excel.ChartTrendlineFormat; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] + */ + intercept: any; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod: number; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name: string; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder: number; + /** + * + * Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type: Excel.ChartTrendlineType | "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartTrendline): void; + /** + * + * Delete the trendline object. + * + * [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. + */ + load(option?: Excel.Interfaces.ChartTrendlineLoadOptions): Excel.ChartTrendline; + load(option?: string | string[]): Excel.ChartTrendline; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTrendline; + toJSON(): Excel.Interfaces.ChartTrendlineData; + } + /** + * + * Represents a collection of Chart Trendlines. + * + * [Api set: ExcelApi 1.7] + */ + class ChartTrendlineCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ChartTrendline[]; + /** + * + * Adds a new trendline to trendline collection. + * + * [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. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Get trendline object by index, which is the insertion order in items array. + * + * [Api set: ExcelApi 1.7] + * + * @param index Represents the insertion order in 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. + */ + load(option?: Excel.Interfaces.ChartTrendlineCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartTrendlineCollection; + load(option?: string | string[]): Excel.ChartTrendlineCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartTrendlineCollection; + toJSON(): Excel.Interfaces.ChartTrendlineCollectionData; + } + /** + * + * Represents the format properties for chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + class ChartTrendlineFormat extends OfficeExtension.ClientObject { + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.7] + */ + readonly line: Excel.ChartLineFormat; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: ChartTrendlineFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Excel.Interfaces.ChartTrendlineFormatLoadOptions): Excel.ChartTrendlineFormat; + load(option?: string | string[]): Excel.ChartTrendlineFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTrendlineFormat; + toJSON(): Excel.Interfaces.ChartTrendlineFormatData; } /** * @@ -7044,8 +8556,23 @@ declare namespace Excel { * @param orientation Whether the operation is sorting rows or columns. * @param method The ordering method used for Chinese characters. */ - apply(fields: Array, matchCase?: boolean, hasHeaders?: boolean, orientation?: string, method?: string): void; - toJSON(): {}; + apply(fields: Excel.SortField[], matchCase?: boolean, hasHeaders?: boolean, orientation?: Excel.SortOrientation, method?: Excel.SortMethod): void; + /** + * + * Perform a sort operation. + * + * [Api set: ExcelApi 1.2] + * + * @param fields The list of conditions to sort on. + * @param matchCase Whether to have the casing impact string ordering. + * @param hasHeaders Whether the range has a header. + * @param orientation Whether the operation is sorting rows or columns. + * @param method The ordering method used for Chinese characters. + */ + apply(fields: Excel.SortField[], matchCase?: boolean, hasHeaders?: boolean, orientation?: "Rows" | "Columns", method?: "PinYin" | "StrokeCount"): void; + toJSON(): { + [key: string]: string; + }; } /** * @@ -7060,7 +8587,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - readonly fields: Array; + readonly fields: Excel.SortField[]; /** * * Represents whether the casing impacted the last sort of the table. @@ -7074,7 +8601,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - readonly method: string; + readonly method: Excel.SortMethod | "PinYin" | "StrokeCount"; /** * * Perform a sort operation. @@ -7085,7 +8612,18 @@ declare namespace Excel { * @param matchCase Whether to have the casing impact string ordering. * @param method The ordering method used for Chinese characters. */ - apply(fields: Array, matchCase?: boolean, method?: string): void; + apply(fields: Excel.SortField[], matchCase?: boolean, method?: Excel.SortMethod): void; + /** + * + * Perform a sort operation. + * + * [Api set: ExcelApi 1.2] + * + * @param fields The list of conditions to sort on. + * @param matchCase Whether to have the casing impact string ordering. + * @param method 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. @@ -7103,12 +8641,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableSort; - toJSON(): { - "fields": SortField[]; - "matchCase": boolean; - "method": string; - }; + load(option?: Excel.Interfaces.TableSortLoadOptions): Excel.TableSort; + load(option?: string | string[]): Excel.TableSort; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableSort; + toJSON(): Excel.Interfaces.TableSortData; } /** * @@ -7137,7 +8676,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - dataOption?: string; + dataOption?: Excel.SortDataOption | "Normal" | "TextAsNumber"; /** * * Represents the icon that is the target of the condition if the sorting is on the cell's icon. @@ -7158,7 +8697,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - sortOn?: string; + sortOn?: Excel.SortOn | "Value" | "CellColor" | "FontColor" | "Icon"; } /** * @@ -7220,7 +8759,18 @@ declare namespace Excel { * @param criteria2 The second criteria string. * @param oper The operator that describes how the two criteria are joined. */ - applyCustomFilter(criteria1: string, criteria2?: string, oper?: string): void; + applyCustomFilter(criteria1: string, criteria2?: string, oper?: Excel.FilterOperator): void; + /** + * + * Apply a "Icon" filter to the column for the given criteria strings. + * + * [Api set: ExcelApi 1.2] + * + * @param criteria1 The first criteria string. + * @param criteria2 The second criteria string. + * @param oper 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. @@ -7229,7 +8779,16 @@ declare namespace Excel { * * @param criteria The dynamic criteria to apply. */ - applyDynamicFilter(criteria: string): void; + applyDynamicFilter(criteria: Excel.DynamicFilterCriteria): void; + /** + * + * Apply a "Dynamic" filter to the column. + * + * [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. @@ -7285,10 +8844,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Filter; - toJSON(): { - "criteria": FilterCriteria; - }; + load(option?: Excel.Interfaces.FilterLoadOptions): Excel.Filter; + load(option?: string | string[]): Excel.Filter; + load(option?: { + select?: string; + expand?: string; + }): Excel.Filter; + toJSON(): Excel.Interfaces.FilterData; } /** * @@ -7327,14 +8889,14 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - dynamicCriteria?: string; + 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. * * [Api set: ExcelApi 1.2] */ - filterOn: string; + filterOn: Excel.FilterOn | "BottomItems" | "BottomPercent" | "CellColor" | "Dynamic" | "FontColor" | "Values" | "TopItems" | "TopPercent" | "Icon" | "Custom"; /** * * The icon used to filter cells. Used with "icon" filtering. @@ -7348,7 +8910,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - operator?: string; + operator?: Excel.FilterOperator | "And" | "Or"; /** * * The set of values to be used as part of "values" filtering. @@ -7377,7 +8939,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - specificity: string; + specificity: Excel.FilterDatetimeSpecificity | "Year" | "Month" | "Day" | "Hour" | "Minute" | "Second"; } /** * @@ -7399,7 +8961,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - set: string; + set: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; } /** * @@ -7411,7 +8973,7 @@ declare namespace Excel { */ class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.CustomXmlPart[]; /** * * Gets the number of CustomXML parts in this collection. @@ -7457,8 +9019,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomXmlPartScopedCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartScopedCollection; + load(option?: string | string[]): Excel.CustomXmlPartScopedCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartScopedCollection; + toJSON(): Excel.Interfaces.CustomXmlPartScopedCollectionData; } /** * @@ -7468,7 +9032,7 @@ declare namespace Excel { */ class CustomXmlPartCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.CustomXmlPart[]; /** * * Adds a new custom XML part to the workbook. @@ -7516,8 +9080,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomXmlPartCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.CustomXmlPartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartCollection; + load(option?: string | string[]): Excel.CustomXmlPartCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartCollection; + toJSON(): Excel.Interfaces.CustomXmlPartCollectionData; } /** * @@ -7566,11 +9132,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomXmlPart; - toJSON(): { - "id": string; - "namespaceUri": string; - }; + load(option?: Excel.Interfaces.CustomXmlPartLoadOptions): Excel.CustomXmlPart; + load(option?: string | string[]): Excel.CustomXmlPart; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomXmlPart; + toJSON(): Excel.Interfaces.CustomXmlPartData; } /** * @@ -7580,7 +9148,7 @@ declare namespace Excel { */ class PivotTableCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.PivotTable[]; /** * * Gets the number of pivot tables in the collection. @@ -7616,8 +9184,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.PivotTableCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.PivotTableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableCollection; + load(option?: string | string[]): Excel.PivotTableCollection; + load(option?: OfficeExtension.LoadOption): Excel.PivotTableCollection; + toJSON(): Excel.Interfaces.PivotTableCollectionData; } /** * @@ -7628,7 +9198,7 @@ declare namespace Excel { class PivotTable extends OfficeExtension.ClientObject { /** * - * The worksheet containing the current PivotTable. Read-only. + * The worksheet containing the current PivotTable. * * [Api set: ExcelApi 1.3] */ @@ -7648,12 +9218,7 @@ declare namespace Excel { */ name: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.PivotTableUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: PivotTable): void; /** @@ -7666,49 +9231,285 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.PivotTable; - toJSON(): { - "id": string; - "name": string; - }; + load(option?: Excel.Interfaces.PivotTableLoadOptions): Excel.PivotTable; + load(option?: string | string[]): Excel.PivotTable; + load(option?: { + select?: string; + expand?: string; + }): Excel.PivotTable; + toJSON(): Excel.Interfaces.PivotTableData; + } + /** + * + * Represents workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + class DocumentProperties extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of custom properties of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly custom: Excel.CustomPropertyCollection; + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author: string; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category: string; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments: string; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company: string; + /** + * + * Gets the creation date of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly creationDate: Date; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords: string; + /** + * + * Gets the last author of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly lastAuthor: string; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager: string; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber: number; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject: string; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: DocumentProperties): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Excel.Interfaces.DocumentPropertiesLoadOptions): Excel.DocumentProperties; + load(option?: string | string[]): Excel.DocumentProperties; + load(option?: { + select?: string; + expand?: string; + }): Excel.DocumentProperties; + toJSON(): Excel.Interfaces.DocumentPropertiesData; + } + /** + * + * Represents a custom property. + * + * [Api set: ExcelApi 1.7] + */ + class CustomProperty extends OfficeExtension.ClientObject { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly key: string; + /** + * + * Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * + * Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value: any; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: CustomProperty): void; + /** + * + * Deletes the custom property. + * + * [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. + */ + load(option?: Excel.Interfaces.CustomPropertyLoadOptions): Excel.CustomProperty; + load(option?: string | string[]): Excel.CustomProperty; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomProperty; + toJSON(): Excel.Interfaces.CustomPropertyData; + } + /** + * + * Contains the collection of customProperty objects. + * + * [Api set: ExcelApi 1.7] + */ + class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.CustomProperty[]; + /** + * + * Creates a new or sets an existing custom property. + * + * [Api set: ExcelApi 1.7] + * + * @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): Excel.CustomProperty; + /** + * + * Deletes all custom properties in this collection. + * + * [Api set: ExcelApi 1.7] + */ + deleteAll(): void; + /** + * + * Gets the count of custom properties. + * + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom property object by its key, which is case-insensitive. Throws if the custom property does not exist. + * + * [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. Returns a null object if the custom property does not exist. + * + * [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. + */ + load(option?: Excel.Interfaces.CustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomPropertyCollection; + load(option?: string | string[]): Excel.CustomPropertyCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomPropertyCollection; + toJSON(): Excel.Interfaces.CustomPropertyCollectionData; } /** * * Represents a collection of all the conditional formats that are overlap the range. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalFormatCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.ConditionalFormat[]; /** * * Adds a new conditional format to the collection at the first/top priority. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param type The type of conditional format being added. See Excel.ConditionalFormatType for details. */ - add(type: string): Excel.ConditionalFormat; + add(type: Excel.ConditionalFormatType): Excel.ConditionalFormat; + /** + * + * Adds a new conditional format to the collection at the first/top priority. + * + * [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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ clearAll(): void; /** * * Returns the number of conditional formats in the workbook. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a conditional format for the given ID. + * + * [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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param index Index of the conditional formats to be retrieved. */ @@ -7716,14 +9517,16 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalFormatCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.ConditionalFormatCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalFormatCollection; + load(option?: string | string[]): Excel.ConditionalFormatCollection; + load(option?: OfficeExtension.LoadOption): Excel.ConditionalFormatCollection; + toJSON(): Excel.Interfaces.ConditionalFormatCollectionData; } /** * * An object encapsulating a conditional format's range, format, rule, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalFormat extends OfficeExtension.ClientObject { /** @@ -7731,7 +9534,7 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly cellValue: Excel.CellValueConditionalFormat; /** @@ -7739,77 +9542,77 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly cellValueOrNullObject: Excel.CellValueConditionalFormat; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly colorScale: Excel.ColorScaleConditionalFormat; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly colorScaleOrNullObject: Excel.ColorScaleConditionalFormat; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly custom: Excel.CustomConditionalFormat; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly customOrNullObject: Excel.CustomConditionalFormat; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly dataBar: Excel.DataBarConditionalFormat; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly dataBarOrNullObject: Excel.DataBarConditionalFormat; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly iconSet: Excel.IconSetConditionalFormat; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly iconSetOrNullObject: Excel.IconSetConditionalFormat; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly preset: Excel.PresetCriteriaConditionalFormat; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly presetOrNullObject: Excel.PresetCriteriaConditionalFormat; /** @@ -7817,7 +9620,7 @@ declare namespace Excel { * 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". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly textComparison: Excel.TextConditionalFormat; /** @@ -7825,7 +9628,7 @@ declare namespace Excel { * 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". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly textComparisonOrNullObject: Excel.TextConditionalFormat; /** @@ -7833,7 +9636,7 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly topBottom: Excel.TopBottomConditionalFormat; /** @@ -7841,17 +9644,25 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly topBottomOrNullObject: Excel.TopBottomConditionalFormat; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [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 than 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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ priority: number; /** @@ -7859,91 +9670,71 @@ declare namespace Excel { * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ stopIfTrue: boolean; /** * * A type of conditional format. Only one can be set at a time. Read-Only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - readonly type: string; + readonly type: Excel.ConditionalFormatType | "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalFormat): void; /** * * Deletes this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ delete(): void; /** * * Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ getRange(): Excel.Range; /** * * Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ getRangeOrNullObject(): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalFormat; - toJSON(): { - "cellValue": CellValueConditionalFormat; - "cellValueOrNullObject": CellValueConditionalFormat; - "colorScale": ColorScaleConditionalFormat; - "colorScaleOrNullObject": ColorScaleConditionalFormat; - "custom": CustomConditionalFormat; - "customOrNullObject": CustomConditionalFormat; - "dataBar": DataBarConditionalFormat; - "dataBarOrNullObject": DataBarConditionalFormat; - "iconSet": IconSetConditionalFormat; - "iconSetOrNullObject": IconSetConditionalFormat; - "preset": PresetCriteriaConditionalFormat; - "presetOrNullObject": PresetCriteriaConditionalFormat; - "priority": number; - "stopIfTrue": boolean; - "textComparison": TextConditionalFormat; - "textComparisonOrNullObject": TextConditionalFormat; - "topBottom": TopBottomConditionalFormat; - "topBottomOrNullObject": TopBottomConditionalFormat; - "type": string; - }; + load(option?: Excel.Interfaces.ConditionalFormatLoadOptions): Excel.ConditionalFormat; + load(option?: string | string[]): Excel.ConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalFormat; + toJSON(): Excel.Interfaces.ConditionalFormatData; } /** * * Represents an Excel Conditional Data Bar Type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class DataBarConditionalFormat extends OfficeExtension.ClientObject { /** * * Representation of all values to the left of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly negativeFormat: Excel.ConditionalDataBarNegativeFormat; /** * * Representation of all values to the right of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly positiveFormat: Excel.ConditionalDataBarPositiveFormat; /** @@ -7951,73 +9742,64 @@ declare namespace Excel { * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ axisColor: string; /** * * Representation of how the axis is determined for an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - axisFormat: string; + axisFormat: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; /** * * Represents the direction that the data bar graphic should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - barDirection: string; + barDirection: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; /** * * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ lowerBoundRule: Excel.ConditionalDataBarRule; /** * * If true, hides the values from the cells where the data bar is applied. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ upperBoundRule: Excel.ConditionalDataBarRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.DataBarConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: DataBarConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.DataBarConditionalFormat; - toJSON(): { - "axisColor": string; - "axisFormat": string; - "barDirection": string; - "lowerBoundRule": ConditionalDataBarRule; - "negativeFormat": ConditionalDataBarNegativeFormat; - "positiveFormat": ConditionalDataBarPositiveFormat; - "showDataBarOnly": boolean; - "upperBoundRule": ConditionalDataBarRule; - }; + load(option?: Excel.Interfaces.DataBarConditionalFormatLoadOptions): Excel.DataBarConditionalFormat; + load(option?: string | string[]): Excel.DataBarConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.DataBarConditionalFormat; + toJSON(): Excel.Interfaces.DataBarConditionalFormatData; } /** * * Represents a conditional format DataBar Format for the positive side of the data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalDataBarPositiveFormat extends OfficeExtension.ClientObject { /** @@ -8025,47 +9807,43 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor: string; /** * * Boolean representation of whether or not the DataBar has a gradient. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ gradientFill: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalDataBarPositiveFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalDataBarPositiveFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalDataBarPositiveFormat; - toJSON(): { - "borderColor": string; - "fillColor": string; - "gradientFill": boolean; - }; + load(option?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions): Excel.ConditionalDataBarPositiveFormat; + load(option?: string | string[]): Excel.ConditionalDataBarPositiveFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalDataBarPositiveFormat; + toJSON(): Excel.Interfaces.ConditionalDataBarPositiveFormatData; } /** * * Represents a conditional format DataBar Format for the negative side of the data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalDataBarNegativeFormat extends OfficeExtension.ClientObject { /** @@ -8073,314 +9851,294 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor: string; /** * * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor: boolean; /** * * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveFillColor: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalDataBarNegativeFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalDataBarNegativeFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalDataBarNegativeFormat; - toJSON(): { - "borderColor": string; - "fillColor": string; - "matchPositiveBorderColor": boolean; - "matchPositiveFillColor": boolean; - }; + load(option?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions): Excel.ConditionalDataBarNegativeFormat; + load(option?: string | string[]): Excel.ConditionalDataBarNegativeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalDataBarNegativeFormat; + toJSON(): Excel.Interfaces.ConditionalDataBarNegativeFormatData; } /** * * Represents a rule-type for a Data Bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalDataBarRule { /** * * The formula, if required, to evaluate the databar rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula?: string; /** * * The type of rule for the databar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - type: string; + type: Excel.ConditionalFormatRuleType | "Invalid" | "Automatic" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; } /** * * Represents a custom conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class CustomConditionalFormat extends OfficeExtension.ClientObject { /** * - * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly rule: Excel.ConditionalFormatRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.CustomConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: CustomConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalFormatRule; - }; + load(option?: Excel.Interfaces.CustomConditionalFormatLoadOptions): Excel.CustomConditionalFormat; + load(option?: string | string[]): Excel.CustomConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomConditionalFormat; + toJSON(): Excel.Interfaces.CustomConditionalFormatData; } /** * * Represents a rule, for all traditional rule/format pairings. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalFormatRule extends OfficeExtension.ClientObject { /** * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula: string; /** * * The formula, if required, to evaluate the conditional format rule on in the user's language. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaLocal: string; /** * * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaR1C1: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalFormatRuleUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalFormatRule): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalFormatRule; - toJSON(): { - "formula": string; - "formulaLocal": string; - "formulaR1C1": string; - }; + load(option?: Excel.Interfaces.ConditionalFormatRuleLoadOptions): Excel.ConditionalFormatRule; + load(option?: string | string[]): Excel.ConditionalFormatRule; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalFormatRule; + toJSON(): Excel.Interfaces.ConditionalFormatRuleData; } /** * * Represents an IconSet criteria for conditional formatting. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class IconSetConditionalFormat extends OfficeExtension.ClientObject { /** * * An array of Criteria and IconSets 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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - criteria: Array; + criteria: Excel.ConditionalIconCriterion[]; /** * * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ reverseIconOrder: boolean; /** * * If true, hides the values and only shows icons. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ showIconOnly: boolean; /** * * If set, displays the IconSet option for the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - style: string; + 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 on the object at the same time, based on JSON input. */ - set(properties: Interfaces.IconSetConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: IconSetConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.IconSetConditionalFormat; - toJSON(): { - "criteria": ConditionalIconCriterion[]; - "reverseIconOrder": boolean; - "showIconOnly": boolean; - "style": string; - }; + load(option?: Excel.Interfaces.IconSetConditionalFormatLoadOptions): Excel.IconSetConditionalFormat; + load(option?: string | string[]): Excel.IconSetConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.IconSetConditionalFormat; + toJSON(): Excel.Interfaces.IconSetConditionalFormatData; } /** * * Represents an Icon Criterion which contains a type, value, an Operator, and an optional custom icon, if not using an iconset. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalIconCriterion { /** * * The custom icon for the current criterion if different from the default IconSet, else null will be returned. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ customIcon?: Excel.Icon; /** * * A number or a formula depending on the type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula: string; /** * * GreaterThan or GreaterThanOrEqual for each of the rule type for the Icon conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - operator: string; + operator: Excel.ConditionalIconCriterionOperator | "Invalid" | "GreaterThan" | "GreaterThanOrEqual"; /** * * What the icon conditional formula should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - type: string; + type: Excel.ConditionalFormatIconRuleType | "Invalid" | "Number" | "Percent" | "Formula" | "Percentile"; } /** * * Represents an IconSet criteria for conditional formatting. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ColorScaleConditionalFormat extends OfficeExtension.ClientObject { /** * * The criteria of the color scale. Midpoint is optional when using a two point color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly threeColorScale: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ColorScaleConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ColorScaleConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ColorScaleConditionalFormat; - toJSON(): { - "criteria": ConditionalColorScaleCriteria; - "threeColorScale": boolean; - }; + load(option?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions): Excel.ColorScaleConditionalFormat; + load(option?: string | string[]): Excel.ColorScaleConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ColorScaleConditionalFormat; + toJSON(): Excel.Interfaces.ColorScaleConditionalFormatData; } /** * * Represents the criteria of the color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalColorScaleCriteria { /** * * The maximum point Color Scale Criterion. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ maximum: Excel.ConditionalColorScaleCriterion; /** * * The midpoint Color Scale Criterion if the color scale is a 3-color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ midpoint?: Excel.ConditionalColorScaleCriterion; /** * * The minimum point Color Scale Criterion. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ minimum: Excel.ConditionalColorScaleCriterion; } @@ -8388,204 +10146,195 @@ declare namespace Excel { * * Represents a Color Scale Criterion which contains a type, value and a color. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalColorScaleCriterion { /** * * HTML color code representation of the color scale color. E.g. #FF0000 represents Red. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color?: string; /** * * A number, a formula, or null (if Type is LowestValue). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula?: string; /** * * What the icon conditional formula should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - type: string; + type: Excel.ConditionalFormatColorCriterionType | "Invalid" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; } /** * * Represents a Top/Bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class TopBottomConditionalFormat extends OfficeExtension.ClientObject { /** * - * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * The criteria of the Top/Bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalTopBottomRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TopBottomConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: TopBottomConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TopBottomConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalTopBottomRule; - }; + load(option?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions): Excel.TopBottomConditionalFormat; + load(option?: string | string[]): Excel.TopBottomConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.TopBottomConditionalFormat; + toJSON(): Excel.Interfaces.TopBottomConditionalFormatData; } /** * * Represents the rule of the top/bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalTopBottomRule { /** * * The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rank: number; /** * * Format values based on the top or bottom rank. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - type: string; + type: Excel.ConditionalTopBottomCriterionType | "Invalid" | "TopItems" | "TopPercent" | "BottomItems" | "BottomPercent"; } /** * * Represents the the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class PresetCriteriaConditionalFormat extends OfficeExtension.ClientObject { /** * - * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalPresetCriteriaRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.PresetCriteriaConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: PresetCriteriaConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.PresetCriteriaConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalPresetCriteriaRule; - }; + load(option?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions): Excel.PresetCriteriaConditionalFormat; + load(option?: string | string[]): Excel.PresetCriteriaConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.PresetCriteriaConditionalFormat; + toJSON(): Excel.Interfaces.PresetCriteriaConditionalFormatData; } /** * * Represents the Preset Criteria Conditional Format Rule * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalPresetCriteriaRule { /** * * The criterion of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - criterion: string; + 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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class TextConditionalFormat extends OfficeExtension.ClientObject { /** * - * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalTextComparisonRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TextConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: TextConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TextConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalTextComparisonRule; - }; + load(option?: Excel.Interfaces.TextConditionalFormatLoadOptions): Excel.TextConditionalFormat; + load(option?: string | string[]): Excel.TextConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.TextConditionalFormat; + toJSON(): Excel.Interfaces.TextConditionalFormatData; } /** * * Represents a Cell Value Conditional Format Rule * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalTextComparisonRule { /** * * The operator of the text conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - operator: string; + operator: Excel.ConditionalTextOperator | "Invalid" | "Contains" | "NotContains" | "BeginsWith" | "EndsWith"; /** * * The Text value of conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ text: string; } @@ -8593,335 +10342,327 @@ declare namespace Excel { * * Represents a cell value conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class CellValueConditionalFormat extends OfficeExtension.ClientObject { /** * - * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalCellValueRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.CellValueConditionalFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: CellValueConditionalFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CellValueConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalCellValueRule; - }; + load(option?: Excel.Interfaces.CellValueConditionalFormatLoadOptions): Excel.CellValueConditionalFormat; + load(option?: string | string[]): Excel.CellValueConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.CellValueConditionalFormat; + toJSON(): Excel.Interfaces.CellValueConditionalFormatData; } /** * * Represents a Cell Value Conditional Format Rule * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalCellValueRule { /** * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula1: string; /** * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula2?: string; /** * * The operator of the text conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - operator: string; + 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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeFormat extends OfficeExtension.ClientObject { /** * - * Collection of border objects that apply to the overall conditional format range. Read-only. + * Collection of border objects that apply to the overall conditional format range. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly borders: Excel.ConditionalRangeBorderCollection; /** * - * Returns the fill object defined on the overall conditional format range. Read-only. + * Returns the fill object defined on the overall conditional format range. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly fill: Excel.ConditionalRangeFill; /** * - * Returns the font object defined on the overall conditional format range. Read-only. + * Returns the font object defined on the overall conditional format range. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly font: Excel.ConditionalRangeFont; /** * * Represents Excel's number format code for the given range. Cleared if null is passed in. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ numberFormat: any; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalRangeFormatUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalRangeFormat): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeFormat; - toJSON(): { - "numberFormat": any; - }; + load(option?: Excel.Interfaces.ConditionalRangeFormatLoadOptions): Excel.ConditionalRangeFormat; + load(option?: string | string[]): Excel.ConditionalRangeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFormat; + toJSON(): Excel.Interfaces.ConditionalRangeFormatData; } /** * * This object represents the font attributes (font style,, color, etc.) for an object. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeFont extends OfficeExtension.ClientObject { /** * * Represents the bold status of font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ bold: boolean; /** * * HTML color code representation of the text color. E.g. #FF0000 represents Red. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color: string; /** * * Represents the italic status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ italic: boolean; /** * * Represents the strikethrough status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ strikethrough: boolean; /** * * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - underline: string; + underline: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalRangeFontUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalRangeFont): void; /** * * Resets the font formats. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeFont; - toJSON(): { - "bold": boolean; - "color": string; - "italic": boolean; - "strikethrough": boolean; - "underline": string; - }; + load(option?: Excel.Interfaces.ConditionalRangeFontLoadOptions): Excel.ConditionalRangeFont; + load(option?: string | string[]): Excel.ConditionalRangeFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFont; + toJSON(): Excel.Interfaces.ConditionalRangeFontData; } /** * * Represents the background of a conditional range object. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeFill extends OfficeExtension.ClientObject { /** * * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalRangeFillUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalRangeFill): void; /** * * Resets the fill. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeFill; - toJSON(): { - "color": string; - }; + load(option?: Excel.Interfaces.ConditionalRangeFillLoadOptions): Excel.ConditionalRangeFill; + load(option?: string | string[]): Excel.ConditionalRangeFill; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFill; + toJSON(): Excel.Interfaces.ConditionalRangeFillData; } /** * * Represents the border of an object. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorder extends OfficeExtension.ClientObject { /** * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color: string; /** * * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - readonly sideIndex: string; + 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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - style: string; + style: Excel.ConditionalRangeBorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ConditionalRangeBorderUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ConditionalRangeBorder): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeBorder; - toJSON(): { - "color": string; - "sideIndex": string; - "style": string; - }; + load(option?: Excel.Interfaces.ConditionalRangeBorderLoadOptions): Excel.ConditionalRangeBorder; + load(option?: string | string[]): Excel.ConditionalRangeBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeBorder; + toJSON(): Excel.Interfaces.ConditionalRangeBorderData; } /** * * Represents the border objects that make up range border. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorderCollection extends OfficeExtension.ClientObject { /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly bottom: Excel.ConditionalRangeBorder; /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly left: Excel.ConditionalRangeBorder; /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly right: Excel.ConditionalRangeBorder; /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly top: Excel.ConditionalRangeBorder; /** Gets the loaded child items in this collection. */ - readonly items: Array; + readonly items: Excel.ConditionalRangeBorder[]; /** * * Number of border objects in the collection. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly count: number; /** * * Gets a border object using its name * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param index Index value of the border object to be retrieved. See Excel.ConditionalRangeBorderIndex for details. */ - getItem(index: string): Excel.ConditionalRangeBorder; + getItem(index: Excel.ConditionalRangeBorderIndex): Excel.ConditionalRangeBorder; + /** + * + * Gets a border object using its name + * + * [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 * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param index Index value of the object to be retrieved. Zero-indexed. */ @@ -8929,122 +10670,488 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeBorderCollection; + load(option?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalRangeBorderCollection; + load(option?: string | string[]): Excel.ConditionalRangeBorderCollection; + load(option?: OfficeExtension.LoadOption): Excel.ConditionalRangeBorderCollection; + toJSON(): Excel.Interfaces.ConditionalRangeBorderCollectionData; + } + /** + * + * An object encapsulating a style's format and other properties. + * + * [Api set: ExcelApi 1.7] + */ + class Style extends OfficeExtension.ClientObject { + /** + * + * A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + readonly borders: Excel.RangeBorderCollection; + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + readonly fill: Excel.RangeFill; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + readonly font: Excel.RangeFont; + /** + * + * Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + readonly builtIn: boolean; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel: number; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked: boolean; + /** + * + * The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat: string; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: string; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit: boolean; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText: boolean; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: Style): void; + /** + * + * Deletes this style. + * + * [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. + */ + load(option?: Excel.Interfaces.StyleLoadOptions): Excel.Style; + load(option?: string | string[]): Excel.Style; + load(option?: { + select?: string; + expand?: string; + }): Excel.Style; + toJSON(): Excel.Interfaces.StyleData; + } + /** + * + * Represents a collection of all the styles. + * + * [Api set: ExcelApi 1.7] + */ + class StyleCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Style[]; + /** + * + * Adds a new style to the collection. + * + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be added. + */ + add(name: string): void; + /** + * + * Gets a style by name. + * + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be retrieved. + */ + getItem(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. + */ + load(option?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; + load(option?: string | string[]): Excel.StyleCollection; + load(option?: OfficeExtension.LoadOption): Excel.StyleCollection; + toJSON(): Excel.Interfaces.StyleCollectionData; + } + /** + * + * Represents a collection of all the Data Connections that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.7] + */ + class DataConnectionCollection extends OfficeExtension.ClientObject { + /** + * + * Refreshes all the Data Connections in the collection. + * + * [Api set: ExcelApi 1.7] + */ + refreshAll(): void; toJSON(): { - "count": number; + [key: string]: string; }; } /** - * [Api set: ExcelApi 1.1] + * [Api set: ExcelApi 1.7] */ - namespace BindingType { - var range: string; - var table: string; - var text: string; - } - /** - * [Api set: ExcelApi 1.1] - */ - namespace BorderIndex { - var edgeTop: string; - var edgeBottom: string; - var edgeLeft: string; - var edgeRight: string; - var insideVertical: string; - var insideHorizontal: string; - var diagonalDown: string; - var diagonalUp: string; - } - /** - * [Api set: ExcelApi 1.1] - */ - namespace BorderLineStyle { - var none: string; - var continuous: string; - var dash: string; - var dashDot: string; - var dashDotDot: string; - var dot: string; - var double: string; - var slantDashDot: string; - } - /** - * [Api set: ExcelApi 1.1] - */ - namespace BorderWeight { - var hairline: string; - var thin: string; - var medium: string; - var thick: string; - } - /** - * [Api set: ExcelApi 1.1] - */ - namespace CalculationMode { - var automatic: string; - var automaticExceptTables: string; - var manual: string; - } - /** - * [Api set: ExcelApi 1.1] - */ - namespace CalculationType { + enum ChartAxisType { + invalid = "Invalid", /** * - * Recalculates all cells that Excel has marked as dirty, that is, dependents of volatile or changed data, and cells programmatically marked as dirty. + * Axis displays categories. * */ - var recalculate: string; + category = "Category", /** * - * This will mark all cells as dirty and then recalculate them. + * Axis displays values. * */ - var full: string; + value = "Value", /** * - * This will rebuild the full dependency chain, mark all cells as dirty and then recalculate them. + * Axis displays data series. * */ - var fullRebuild: string; + series = "Series", } /** - * [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks.] + * [Api set: ExcelApi 1.7] */ - namespace ClearApplyTo { - var all: string; - var formats: string; - var contents: string; - var hyperlinks: string; + enum ChartAxisGroup { + primary = "Primary", + secondary = "Secondary", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisScaleType { + linear = "Linear", + logarithmic = "Logarithmic", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisPosition { + automatic = "Automatic", + maximum = "Maximum", + minimum = "Minimum", + custom = "Custom", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickMark { + none = "None", + cross = "Cross", + inside = "Inside", + outside = "Outside", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickLabelPosition { + nextToAxis = "NextToAxis", + high = "High", + low = "Low", + none = "None", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisDisplayUnit { + /** + * + * Default option. This will reset display unit to the axis, and set unit label invisible. + * + */ + none = "None", + /** + * + * This will set the axis in units of hundreds. + * + */ + hundreds = "Hundreds", + /** + * + * This will set the axis in units of thousands. + * + */ + thousands = "Thousands", + /** + * + * This will set the axis in units of tens of thousands. + * + */ + tenThousands = "TenThousands", + /** + * + * This will set the axis in units of hundreds of thousands. + * + */ + hundredThousands = "HundredThousands", + /** + * + * This will set the axis in units of millions. + * + */ + millions = "Millions", + /** + * + * This will set the axis in units of tens of millions. + * + */ + tenMillions = "TenMillions", + /** + * + * This will set the axis in units of hundreds of millions. + * + */ + hundredMillions = "HundredMillions", + /** + * + * This will set the axis in units of billions. + * + */ + billions = "Billions", + /** + * + * This will set the axis in units of trillions. + * + */ + trillions = "Trillions", + /** + * + * This will set the axis in units of custom value. + * + */ + custom = "Custom", + } + /** + * + * Specifies the unit of time for chart axes and data series. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTimeUnit { + days = "Days", + months = "Months", + years = "Years", + } + /** + * + * Specifies the type of the category axis. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisCategoryType { + /** + * + * Excel controls the axis type. + * + */ + automatic = "Automatic", + /** + * + * Axis groups data by an arbitrary set of categories. + * + */ + textAxis = "TextAxis", + /** + * + * Axis groups data on a time scale. + * + */ + dateAxis = "DateAxis", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartLineStyle { + none = "None", + continuous = "Continuous", + dash = "Dash", + dashDot = "DashDot", + dashDotDot = "DashDotDot", + dot = "Dot", + grey25 = "Grey25", + grey50 = "Grey50", + grey75 = "Grey75", + automatic = "Automatic", + roundDot = "RoundDot", } /** * [Api set: ExcelApi 1.1] */ - namespace ChartDataLabelPosition { - var invalid: string; - var none: string; - var center: string; - var insideEnd: string; - var insideBase: string; - var outsideEnd: string; - var left: string; - var right: string; - var top: string; - var bottom: string; - var bestFit: string; - var callout: string; + enum ChartDataLabelPosition { + invalid = "Invalid", + none = "None", + center = "Center", + insideEnd = "InsideEnd", + insideBase = "InsideBase", + outsideEnd = "OutsideEnd", + left = "Left", + right = "Right", + top = "Top", + bottom = "Bottom", + bestFit = "BestFit", + callout = "Callout", + } + /** + * + * Represents the position of chart title. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartTitlePosition { + automatic = "Automatic", + top = "Top", + bottom = "Bottom", + left = "Left", + right = "Right", } /** * [Api set: ExcelApi 1.1] */ - namespace ChartLegendPosition { - var invalid: string; - var top: string; - var bottom: string; - var left: string; - var right: string; - var corner: string; - var custom: string; + enum ChartLegendPosition { + invalid = "Invalid", + top = "Top", + bottom = "Bottom", + left = "Left", + right = "Right", + corner = "Corner", + custom = "Custom", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartMarkerStyle { + invalid = "Invalid", + automatic = "Automatic", + none = "None", + square = "Square", + diamond = "Diamond", + triangle = "Triangle", + x = "X", + star = "Star", + dot = "Dot", + dash = "Dash", + circle = "Circle", + plus = "Plus", + picture = "Picture", } /** * @@ -9052,529 +11159,1040 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - namespace ChartSeriesBy { + enum ChartSeriesBy { /** * * On Desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns; on Excel Online, "auto" will simply default to "columns". * */ - var auto: string; - var columns: string; - var rows: string; + auto = "Auto", + columns = "Columns", + rows = "Rows", + } + /** + * + * Represents the horizontal alignment for the specified object. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartTextHorizontalAlignment { + center = "Center", + left = "Left", + right = "Right", + justify = "Justify", + distributed = "Distributed", + } + /** + * + * Represents the vertical alignment for the specified object. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartTextVerticalAlignment { + center = "Center", + bottom = "Bottom", + top = "Top", + justify = "Justify", + distributed = "Distributed", } /** * [Api set: ExcelApi 1.1] */ - namespace ChartType { - var invalid: string; - var columnClustered: string; - var columnStacked: string; - var columnStacked100: string; - var _3DColumnClustered: string; - var _3DColumnStacked: string; - var _3DColumnStacked100: string; - var barClustered: string; - var barStacked: string; - var barStacked100: string; - var _3DBarClustered: string; - var _3DBarStacked: string; - var _3DBarStacked100: string; - var lineStacked: string; - var lineStacked100: string; - var lineMarkers: string; - var lineMarkersStacked: string; - var lineMarkersStacked100: string; - var pieOfPie: string; - var pieExploded: string; - var _3DPieExploded: string; - var barOfPie: string; - var xyscatterSmooth: string; - var xyscatterSmoothNoMarkers: string; - var xyscatterLines: string; - var xyscatterLinesNoMarkers: string; - var areaStacked: string; - var areaStacked100: string; - var _3DAreaStacked: string; - var _3DAreaStacked100: string; - var doughnutExploded: string; - var radarMarkers: string; - var radarFilled: string; - var surface: string; - var surfaceWireframe: string; - var surfaceTopView: string; - var surfaceTopViewWireframe: string; - var bubble: string; - var bubble3DEffect: string; - var stockHLC: string; - var stockOHLC: string; - var stockVHLC: string; - var stockVOHLC: string; - var cylinderColClustered: string; - var cylinderColStacked: string; - var cylinderColStacked100: string; - var cylinderBarClustered: string; - var cylinderBarStacked: string; - var cylinderBarStacked100: string; - var cylinderCol: string; - var coneColClustered: string; - var coneColStacked: string; - var coneColStacked100: string; - var coneBarClustered: string; - var coneBarStacked: string; - var coneBarStacked100: string; - var coneCol: string; - var pyramidColClustered: string; - var pyramidColStacked: string; - var pyramidColStacked100: string; - var pyramidBarClustered: string; - var pyramidBarStacked: string; - var pyramidBarStacked100: string; - var pyramidCol: string; - var _3DColumn: string; - var line: string; - var _3DLine: string; - var _3DPie: string; - var pie: string; - var xyscatter: string; - var _3DArea: string; - var area: string; - var doughnut: string; - var radar: string; + enum ChartType { + invalid = "Invalid", + columnClustered = "ColumnClustered", + columnStacked = "ColumnStacked", + columnStacked100 = "ColumnStacked100", + _3DColumnClustered = "3DColumnClustered", + _3DColumnStacked = "3DColumnStacked", + _3DColumnStacked100 = "3DColumnStacked100", + barClustered = "BarClustered", + barStacked = "BarStacked", + barStacked100 = "BarStacked100", + _3DBarClustered = "3DBarClustered", + _3DBarStacked = "3DBarStacked", + _3DBarStacked100 = "3DBarStacked100", + lineStacked = "LineStacked", + lineStacked100 = "LineStacked100", + lineMarkers = "LineMarkers", + lineMarkersStacked = "LineMarkersStacked", + lineMarkersStacked100 = "LineMarkersStacked100", + pieOfPie = "PieOfPie", + pieExploded = "PieExploded", + _3DPieExploded = "3DPieExploded", + barOfPie = "BarOfPie", + xyscatterSmooth = "XYScatterSmooth", + xyscatterSmoothNoMarkers = "XYScatterSmoothNoMarkers", + xyscatterLines = "XYScatterLines", + xyscatterLinesNoMarkers = "XYScatterLinesNoMarkers", + areaStacked = "AreaStacked", + areaStacked100 = "AreaStacked100", + _3DAreaStacked = "3DAreaStacked", + _3DAreaStacked100 = "3DAreaStacked100", + doughnutExploded = "DoughnutExploded", + radarMarkers = "RadarMarkers", + radarFilled = "RadarFilled", + surface = "Surface", + surfaceWireframe = "SurfaceWireframe", + surfaceTopView = "SurfaceTopView", + surfaceTopViewWireframe = "SurfaceTopViewWireframe", + bubble = "Bubble", + bubble3DEffect = "Bubble3DEffect", + stockHLC = "StockHLC", + stockOHLC = "StockOHLC", + stockVHLC = "StockVHLC", + stockVOHLC = "StockVOHLC", + cylinderColClustered = "CylinderColClustered", + cylinderColStacked = "CylinderColStacked", + cylinderColStacked100 = "CylinderColStacked100", + cylinderBarClustered = "CylinderBarClustered", + cylinderBarStacked = "CylinderBarStacked", + cylinderBarStacked100 = "CylinderBarStacked100", + cylinderCol = "CylinderCol", + coneColClustered = "ConeColClustered", + coneColStacked = "ConeColStacked", + coneColStacked100 = "ConeColStacked100", + coneBarClustered = "ConeBarClustered", + coneBarStacked = "ConeBarStacked", + coneBarStacked100 = "ConeBarStacked100", + coneCol = "ConeCol", + pyramidColClustered = "PyramidColClustered", + pyramidColStacked = "PyramidColStacked", + pyramidColStacked100 = "PyramidColStacked100", + pyramidBarClustered = "PyramidBarClustered", + pyramidBarStacked = "PyramidBarStacked", + pyramidBarStacked100 = "PyramidBarStacked100", + pyramidCol = "PyramidCol", + _3DColumn = "3DColumn", + line = "Line", + _3DLine = "3DLine", + _3DPie = "3DPie", + pie = "Pie", + xyscatter = "XYScatter", + _3DArea = "3DArea", + area = "Area", + doughnut = "Doughnut", + radar = "Radar", + } + + /** + * [Api set: ExcelApi 1.1] + */ + enum ChartUnderlineStyle { + none = "None", + single = "Single", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartTrendlineType { + linear = "Linear", + exponential = "Exponential", + logarithmic = "Logarithmic", + movingAverage = "MovingAverage", + polynomial = "Polynomial", + power = "Power", } /** * [Api set: ExcelApi 1.1] */ - namespace ChartUnderlineStyle { - var none: string; - var single: string; + enum BindingType { + range = "Range", + table = "Table", + text = "Text", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum BorderIndex { + edgeTop = "EdgeTop", + edgeBottom = "EdgeBottom", + edgeLeft = "EdgeLeft", + edgeRight = "EdgeRight", + insideVertical = "InsideVertical", + insideHorizontal = "InsideHorizontal", + diagonalDown = "DiagonalDown", + diagonalUp = "DiagonalUp", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum BorderLineStyle { + none = "None", + continuous = "Continuous", + dash = "Dash", + dashDot = "DashDot", + dashDotDot = "DashDotDot", + dot = "Dot", + double = "Double", + slantDashDot = "SlantDashDot", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum BorderWeight { + hairline = "Hairline", + thin = "Thin", + medium = "Medium", + thick = "Thick", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum CalculationMode { + automatic = "Automatic", + automaticExceptTables = "AutomaticExceptTables", + manual = "Manual", + } + /** + * [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. + * + */ + recalculate = "Recalculate", + /** + * + * This will mark all cells as dirty and then recalculate them. + * + */ + full = "Full", + /** + * + * This will rebuild the full dependency chain, mark all cells as dirty and then recalculate them. + * + */ + fullRebuild = "FullRebuild", + } + /** + * [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks & HyperlinksAndFormats.] + */ + enum ClearApplyTo { + all = "All", + /** + * + * Clears all formatting for the range. + * + */ + formats = "Formats", + /** + * + * Clears the contents of the range. + * + */ + contents = "Contents", + /** + * + * Clears all hyperlinks, but leaves all content and formatting intact. + * + */ + hyperlinks = "Hyperlinks", + /** + * + * Removes hyperlinks and formatting for the cell but leaves content, conditional formats and data validation intact. + * + */ + removeHyperlinks = "RemoveHyperlinks", } /** * * Represents the format options for a Data Bar Axis. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalDataBarAxisFormat { - var automatic: string; - var none: string; - var cellMidPoint: string; + enum ConditionalDataBarAxisFormat { + automatic = "Automatic", + none = "None", + cellMidPoint = "CellMidPoint", } /** * * Represents the Data Bar direction within a cell. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalDataBarDirection { - var context: string; - var leftToRight: string; - var rightToLeft: string; + enum ConditionalDataBarDirection { + context = "Context", + leftToRight = "LeftToRight", + rightToLeft = "RightToLeft", } /** * * Represents the direction for a selection. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalFormatDirection { - var top: string; - var bottom: string; + enum ConditionalFormatDirection { + top = "Top", + bottom = "Bottom", } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalFormatType { - var custom: string; - var dataBar: string; - var colorScale: string; - var iconSet: string; - var topBottom: string; - var presetCriteria: string; - var containsText: string; - var cellValue: string; + enum ConditionalFormatType { + custom = "Custom", + dataBar = "DataBar", + colorScale = "ColorScale", + iconSet = "IconSet", + topBottom = "TopBottom", + presetCriteria = "PresetCriteria", + containsText = "ContainsText", + cellValue = "CellValue", } /** * * Represents the types of conditional format values. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalFormatRuleType { - var invalid: string; - var automatic: string; - var lowestValue: string; - var highestValue: string; - var number: string; - var percent: string; - var formula: string; - var percentile: string; + enum ConditionalFormatRuleType { + invalid = "Invalid", + automatic = "Automatic", + lowestValue = "LowestValue", + highestValue = "HighestValue", + number = "Number", + percent = "Percent", + formula = "Formula", + percentile = "Percentile", } /** * * Represents the types of conditional format values. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalFormatIconRuleType { - var invalid: string; - var number: string; - var percent: string; - var formula: string; - var percentile: string; + enum ConditionalFormatIconRuleType { + invalid = "Invalid", + number = "Number", + percent = "Percent", + formula = "Formula", + percentile = "Percentile", } /** * * Represents the types of conditional format values. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalFormatColorCriterionType { - var invalid: string; - var lowestValue: string; - var highestValue: string; - var number: string; - var percent: string; - var formula: string; - var percentile: string; + enum ConditionalFormatColorCriterionType { + invalid = "Invalid", + lowestValue = "LowestValue", + highestValue = "HighestValue", + number = "Number", + percent = "Percent", + formula = "Formula", + percentile = "Percentile", } /** * * Represents the criteria for the above/below average conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalTopBottomCriterionType { - var invalid: string; - var topItems: string; - var topPercent: string; - var bottomItems: string; - var bottomPercent: string; + enum ConditionalTopBottomCriterionType { + invalid = "Invalid", + topItems = "TopItems", + topPercent = "TopPercent", + bottomItems = "BottomItems", + bottomPercent = "BottomPercent", } /** * * Represents the criteria for the Preset Criteria conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalFormatPresetCriterion { - var invalid: string; - var blanks: string; - var nonBlanks: string; - var errors: string; - var nonErrors: string; - var yesterday: string; - var today: string; - var tomorrow: string; - var lastSevenDays: string; - var lastWeek: string; - var thisWeek: string; - var nextWeek: string; - var lastMonth: string; - var thisMonth: string; - var nextMonth: string; - var aboveAverage: string; - var belowAverage: string; - var equalOrAboveAverage: string; - var equalOrBelowAverage: string; - var oneStdDevAboveAverage: string; - var oneStdDevBelowAverage: string; - var twoStdDevAboveAverage: string; - var twoStdDevBelowAverage: string; - var threeStdDevAboveAverage: string; - var threeStdDevBelowAverage: string; - var uniqueValues: string; - var duplicateValues: string; + enum ConditionalFormatPresetCriterion { + invalid = "Invalid", + blanks = "Blanks", + nonBlanks = "NonBlanks", + errors = "Errors", + nonErrors = "NonErrors", + yesterday = "Yesterday", + today = "Today", + tomorrow = "Tomorrow", + lastSevenDays = "LastSevenDays", + lastWeek = "LastWeek", + thisWeek = "ThisWeek", + nextWeek = "NextWeek", + lastMonth = "LastMonth", + thisMonth = "ThisMonth", + nextMonth = "NextMonth", + aboveAverage = "AboveAverage", + belowAverage = "BelowAverage", + equalOrAboveAverage = "EqualOrAboveAverage", + equalOrBelowAverage = "EqualOrBelowAverage", + oneStdDevAboveAverage = "OneStdDevAboveAverage", + oneStdDevBelowAverage = "OneStdDevBelowAverage", + twoStdDevAboveAverage = "TwoStdDevAboveAverage", + twoStdDevBelowAverage = "TwoStdDevBelowAverage", + threeStdDevAboveAverage = "ThreeStdDevAboveAverage", + threeStdDevBelowAverage = "ThreeStdDevBelowAverage", + uniqueValues = "UniqueValues", + duplicateValues = "DuplicateValues", } /** * * Represents the operator of the text conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalTextOperator { - var invalid: string; - var contains: string; - var notContains: string; - var beginsWith: string; - var endsWith: string; + enum ConditionalTextOperator { + invalid = "Invalid", + contains = "Contains", + notContains = "NotContains", + beginsWith = "BeginsWith", + endsWith = "EndsWith", } /** * * Represents the operator of the text conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalCellValueOperator { - var invalid: string; - var between: string; - var notBetween: string; - var equalTo: string; - var notEqualTo: string; - var greaterThan: string; - var lessThan: string; - var greaterThanOrEqual: string; - var lessThanOrEqual: string; + enum ConditionalCellValueOperator { + invalid = "Invalid", + between = "Between", + notBetween = "NotBetween", + equalTo = "EqualTo", + notEqualTo = "NotEqualTo", + greaterThan = "GreaterThan", + lessThan = "LessThan", + greaterThanOrEqual = "GreaterThanOrEqual", + lessThanOrEqual = "LessThanOrEqual", } /** * * Represents the operator for each icon criteria. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalIconCriterionOperator { - var invalid: string; - var greaterThan: string; - var greaterThanOrEqual: string; + enum ConditionalIconCriterionOperator { + invalid = "Invalid", + greaterThan = "GreaterThan", + greaterThanOrEqual = "GreaterThanOrEqual", } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalRangeBorderIndex { - var edgeTop: string; - var edgeBottom: string; - var edgeLeft: string; - var edgeRight: string; + enum ConditionalRangeBorderIndex { + edgeTop = "EdgeTop", + edgeBottom = "EdgeBottom", + edgeLeft = "EdgeLeft", + edgeRight = "EdgeRight", } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalRangeBorderLineStyle { - var none: string; - var continuous: string; - var dash: string; - var dashDot: string; - var dashDotDot: string; - var dot: string; + enum ConditionalRangeBorderLineStyle { + none = "None", + continuous = "Continuous", + dash = "Dash", + dashDot = "DashDot", + dashDotDot = "DashDotDot", + dot = "Dot", } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - namespace ConditionalRangeFontUnderlineStyle { - var none: string; - var single: string; - var double: string; + enum ConditionalRangeFontUnderlineStyle { + none = "None", + single = "Single", + double = "Double", } /** * [Api set: ExcelApi 1.1] */ - namespace DeleteShiftDirection { - var up: string; - var left: string; + enum DeleteShiftDirection { + up = "Up", + left = "Left", } /** * [Api set: ExcelApi 1.2] */ - namespace DynamicFilterCriteria { - var unknown: string; - var aboveAverage: string; - var allDatesInPeriodApril: string; - var allDatesInPeriodAugust: string; - var allDatesInPeriodDecember: string; - var allDatesInPeriodFebruray: string; - var allDatesInPeriodJanuary: string; - var allDatesInPeriodJuly: string; - var allDatesInPeriodJune: string; - var allDatesInPeriodMarch: string; - var allDatesInPeriodMay: string; - var allDatesInPeriodNovember: string; - var allDatesInPeriodOctober: string; - var allDatesInPeriodQuarter1: string; - var allDatesInPeriodQuarter2: string; - var allDatesInPeriodQuarter3: string; - var allDatesInPeriodQuarter4: string; - var allDatesInPeriodSeptember: string; - var belowAverage: string; - var lastMonth: string; - var lastQuarter: string; - var lastWeek: string; - var lastYear: string; - var nextMonth: string; - var nextQuarter: string; - var nextWeek: string; - var nextYear: string; - var thisMonth: string; - var thisQuarter: string; - var thisWeek: string; - var thisYear: string; - var today: string; - var tomorrow: string; - var yearToDate: string; - var yesterday: string; + enum DynamicFilterCriteria { + unknown = "Unknown", + aboveAverage = "AboveAverage", + allDatesInPeriodApril = "AllDatesInPeriodApril", + allDatesInPeriodAugust = "AllDatesInPeriodAugust", + allDatesInPeriodDecember = "AllDatesInPeriodDecember", + allDatesInPeriodFebruray = "AllDatesInPeriodFebruray", + allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", + allDatesInPeriodJuly = "AllDatesInPeriodJuly", + allDatesInPeriodJune = "AllDatesInPeriodJune", + allDatesInPeriodMarch = "AllDatesInPeriodMarch", + allDatesInPeriodMay = "AllDatesInPeriodMay", + allDatesInPeriodNovember = "AllDatesInPeriodNovember", + allDatesInPeriodOctober = "AllDatesInPeriodOctober", + allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", + allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", + allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", + allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", + allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", + belowAverage = "BelowAverage", + lastMonth = "LastMonth", + lastQuarter = "LastQuarter", + lastWeek = "LastWeek", + lastYear = "LastYear", + nextMonth = "NextMonth", + nextQuarter = "NextQuarter", + nextWeek = "NextWeek", + nextYear = "NextYear", + thisMonth = "ThisMonth", + thisQuarter = "ThisQuarter", + thisWeek = "ThisWeek", + thisYear = "ThisYear", + today = "Today", + tomorrow = "Tomorrow", + yearToDate = "YearToDate", + yesterday = "Yesterday", } /** * [Api set: ExcelApi 1.2] */ - namespace FilterDatetimeSpecificity { - var year: string; - var month: string; - var day: string; - var hour: string; - var minute: string; - var second: string; + enum FilterDatetimeSpecificity { + year = "Year", + month = "Month", + day = "Day", + hour = "Hour", + minute = "Minute", + second = "Second", } /** * [Api set: ExcelApi 1.2] */ - namespace FilterOn { - var bottomItems: string; - var bottomPercent: string; - var cellColor: string; - var dynamic: string; - var fontColor: string; - var values: string; - var topItems: string; - var topPercent: string; - var icon: string; - var custom: string; + enum FilterOn { + bottomItems = "BottomItems", + bottomPercent = "BottomPercent", + cellColor = "CellColor", + dynamic = "Dynamic", + fontColor = "FontColor", + values = "Values", + topItems = "TopItems", + topPercent = "TopPercent", + icon = "Icon", + custom = "Custom", } /** * [Api set: ExcelApi 1.2] */ - namespace FilterOperator { - var and: string; - var or: string; + enum FilterOperator { + and = "And", + or = "Or", } /** * [Api set: ExcelApi 1.1] */ - namespace HorizontalAlignment { - var general: string; - var left: string; - var center: string; - var right: string; - var fill: string; - var justify: string; - var centerAcrossSelection: string; - var distributed: string; + enum HorizontalAlignment { + general = "General", + left = "Left", + center = "Center", + right = "Right", + fill = "Fill", + justify = "Justify", + centerAcrossSelection = "CenterAcrossSelection", + distributed = "Distributed", } /** * [Api set: ExcelApi 1.2] */ - namespace IconSet { - var invalid: string; - var threeArrows: string; - var threeArrowsGray: string; - var threeFlags: string; - var threeTrafficLights1: string; - var threeTrafficLights2: string; - var threeSigns: string; - var threeSymbols: string; - var threeSymbols2: string; - var fourArrows: string; - var fourArrowsGray: string; - var fourRedToBlack: string; - var fourRating: string; - var fourTrafficLights: string; - var fiveArrows: string; - var fiveArrowsGray: string; - var fiveRating: string; - var fiveQuarters: string; - var threeStars: string; - var threeTriangles: string; - var fiveBoxes: string; + enum IconSet { + invalid = "Invalid", + threeArrows = "ThreeArrows", + threeArrowsGray = "ThreeArrowsGray", + threeFlags = "ThreeFlags", + threeTrafficLights1 = "ThreeTrafficLights1", + threeTrafficLights2 = "ThreeTrafficLights2", + threeSigns = "ThreeSigns", + threeSymbols = "ThreeSymbols", + threeSymbols2 = "ThreeSymbols2", + fourArrows = "FourArrows", + fourArrowsGray = "FourArrowsGray", + fourRedToBlack = "FourRedToBlack", + fourRating = "FourRating", + fourTrafficLights = "FourTrafficLights", + fiveArrows = "FiveArrows", + fiveArrowsGray = "FiveArrowsGray", + fiveRating = "FiveRating", + fiveQuarters = "FiveQuarters", + threeStars = "ThreeStars", + threeTriangles = "ThreeTriangles", + fiveBoxes = "FiveBoxes", } /** * [Api set: ExcelApi 1.2] */ - namespace ImageFittingMode { - var fit: string; - var fitAndCenter: string; - var fill: string; + enum ImageFittingMode { + fit = "Fit", + fitAndCenter = "FitAndCenter", + fill = "Fill", } /** * [Api set: ExcelApi 1.1] */ - namespace InsertShiftDirection { - var down: string; - var right: string; + enum InsertShiftDirection { + down = "Down", + right = "Right", } /** * [Api set: ExcelApi 1.4] */ - namespace NamedItemScope { - var worksheet: string; - var workbook: string; + enum NamedItemScope { + worksheet = "Worksheet", + workbook = "Workbook", + } + /** + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + enum NamedItemType { + string = "String", + integer = "Integer", + double = "Double", + boolean = "Boolean", + range = "Range", + error = "Error", + array = "Array", } /** * [Api set: ExcelApi 1.1] */ - namespace NamedItemType { - var string: string; - var integer: string; - var double: string; - var boolean: string; - var range: string; - var error: string; + enum RangeUnderlineStyle { + none = "None", + single = "Single", + double = "Double", + singleAccountant = "SingleAccountant", + doubleAccountant = "DoubleAccountant", } /** * [Api set: ExcelApi 1.1] */ - namespace RangeUnderlineStyle { - var none: string; - var single: string; - var double: string; - var singleAccountant: string; - var doubleAccountant: string; + enum SheetVisibility { + visible = "Visible", + hidden = "Hidden", + veryHidden = "VeryHidden", } /** - * [Api set: ExcelApi 1.1] + * [Api set: ExcelApi 1.1 for Unknown, Empty, String, Integer, Double, Boolean, Error. 1.7 for RichValue] */ - namespace SheetVisibility { - var visible: string; - var hidden: string; - var veryHidden: string; - } - /** - * [Api set: ExcelApi 1.1] - */ - namespace RangeValueType { - var unknown: string; - var empty: string; - var string: string; - var integer: string; - var double: string; - var boolean: string; - var error: string; + enum RangeValueType { + unknown = "Unknown", + empty = "Empty", + string = "String", + integer = "Integer", + double = "Double", + boolean = "Boolean", + error = "Error", + richValue = "RichValue", } /** * [Api set: ExcelApi 1.2] */ - namespace SortOrientation { - var rows: string; - var columns: string; + enum SortOrientation { + rows = "Rows", + columns = "Columns", } /** * [Api set: ExcelApi 1.2] */ - namespace SortOn { - var value: string; - var cellColor: string; - var fontColor: string; - var icon: string; + enum SortOn { + value = "Value", + cellColor = "CellColor", + fontColor = "FontColor", + icon = "Icon", } /** * [Api set: ExcelApi 1.2] */ - namespace SortDataOption { - var normal: string; - var textAsNumber: string; + enum SortDataOption { + normal = "Normal", + textAsNumber = "TextAsNumber", } /** * [Api set: ExcelApi 1.2] */ - namespace SortMethod { - var pinYin: string; - var strokeCount: string; + enum SortMethod { + pinYin = "PinYin", + strokeCount = "StrokeCount", } /** * [Api set: ExcelApi 1.1] */ - namespace VerticalAlignment { - var top: string; - var center: string; - var bottom: string; - var justify: string; - var distributed: string; + enum VerticalAlignment { + top = "Top", + center = "Center", + bottom = "Bottom", + justify = "Justify", + distributed = "Distributed", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyType { + number = "Number", + boolean = "Boolean", + date = "Date", + string = "String", + float = "Float", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum EventSource { + /** + * + * Local means event comes from local user session. + * + */ + local = "Local", + /** + * + * Remote means event comes from remote user session. + * + */ + remote = "Remote", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum DataChangeType { + /** + * + * Unknown represents the type of data change is not the listed types. + * + */ + unknown = "Unknown", + /** + * + * RangeEdited represents the data change event is triggered by range being edited. + * + */ + rangeEdited = "RangeEdited", + /** + * + * RowInserted represents the data change event is triggered by inserting new rows. + * + */ + rowInserted = "RowInserted", + /** + * + * RowDeleted represents the data change event is triggered by deleting rows. + * + */ + rowDeleted = "RowDeleted", + /** + * + * ColumnInserted represents the data change event is triggered by inserting new columns. + * + */ + columnInserted = "ColumnInserted", + /** + * + * ColumnDeleted represents the data change event is triggered by deleting columns. + * + */ + columnDeleted = "ColumnDeleted", + /** + * + * CellInserted represents the data change event is triggered by inserting new cells. + * + */ + cellInserted = "CellInserted", + /** + * + * CellDeleted represents the data change event is triggered by deleting cells. + * + */ + cellDeleted = "CellDeleted", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum EventType { + /** + * + * WorksheetChanged represents the type of event that is registered on Worksheet or WorksheetCollection, and occurs when data changes. + * + */ + worksheetChanged = "WorksheetChanged", + /** + * + * WorksheetSelectionChanged represents the type of event that is registered on Worksheet, and occurs when selection changes. + * + */ + worksheetSelectionChanged = "WorksheetSelectionChanged", + /** + * + * WorksheetAdded represents the type of event that is registered on WorksheetCollection, and occurs when a new worksheet is added to the workbook. + * + */ + worksheetAdded = "WorksheetAdded", + /** + * + * WorksheetActivated represents the type of event that is registered on Worksheet or WorksheetCollection, and occurs when worksheet activates. + * + */ + worksheetActivated = "WorksheetActivated", + /** + * + * WorksheetDeactivated represents the type of event that is registered on Worksheet or WorksheetCollection, and occurs when worksheet deactivates. + * + */ + worksheetDeactivated = "WorksheetDeactivated", + /** + * + * TableChanged represents the type of event that is registered on Table, and occurs when data changes. + * + */ + tableChanged = "TableChanged", + /** + * + * TableSelectionChanged represents the type of event that is registered on Table, and occurs when selection changes. + * + */ + tableSelectionChanged = "TableSelectionChanged", + /** + * + * WorksheetDeleted represents the type of event that is registered on WorksheetCollection, and occurs when a worksheet is deleted from the workbook. + * + */ + worksheetDeleted = "WorksheetDeleted", + /** + * + * ChartAdded represents the type of event that is registered on ChartCollection, and occurs when a new chart is added to the worksheet. + * + */ + chartAdded = "ChartAdded", + /** + * + * ChartActivated represents the type of event that is registered on Chart or ChartCollection, and occurs when chart activates. + * + */ + chartActivated = "ChartActivated", + /** + * + * ChartDeactivated represents the type of event that is registered on Chart or ChartCollection, and occurs when chart deactivates. + * + */ + chartDeactivated = "ChartDeactivated", + /** + * + * ChartDeleted represents the type of event that is registered on ChartCollection, and occurs when a chart is deleted from the worksheet. + * + */ + chartDeleted = "ChartDeleted", + /** + * + * WorksheetCalculated represents the type of event that is registered on Worksheet or WorksheetCollection, and occurs when a worksheet is calculated. + * + */ + worksheetCalculated = "WorksheetCalculated", + /** + * + * ChartActivated represents the type of event that is registered on Chart or ChartCollection, and occurs when chart activates. + * + */ + visualSelectionChanged = "VisualSelectionChanged", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyItem { + title = "Title", + subject = "Subject", + author = "Author", + keywords = "Keywords", + comments = "Comments", + template = "Template", + lastAuth = "LastAuth", + revision = "Revision", + appName = "AppName", + lastPrint = "LastPrint", + creation = "Creation", + lastSave = "LastSave", + category = "Category", + format = "Format", + manager = "Manager", + company = "Company", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ProtectionSelectionMode { + /** + * + * Selection is allowed for all cells. + * + */ + normal = "Normal", + /** + * + * Selection is allowed only for cells that are not locked. + * + */ + unlocked = "Unlocked", + /** + * + * Selection is not allowed for all cells. + * + */ + none = "None", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum PageOrientation { + portrait = "Portrait", + landscape = "Landscape", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum PaperType { + letter = "Letter", + letterSmall = "LetterSmall", + tabloid = "Tabloid", + ledger = "Ledger", + legal = "Legal", + statement = "Statement", + executive = "Executive", + a3 = "A3", + a4 = "A4", + a4Small = "A4Small", + a5 = "A5", + b4 = "B4", + b5 = "B5", + folio = "Folio", + quatro = "Quatro", + paper10x14 = "Paper10x14", + paper11x17 = "Paper11x17", + note = "Note", + envelope9 = "Envelope9", + envelope10 = "Envelope10", + envelope11 = "Envelope11", + envelope12 = "Envelope12", + envelope14 = "Envelope14", + csheet = "Csheet", + dsheet = "Dsheet", + esheet = "Esheet", + envelopeDL = "EnvelopeDL", + envelopeC5 = "EnvelopeC5", + envelopeC3 = "EnvelopeC3", + envelopeC4 = "EnvelopeC4", + envelopeC6 = "EnvelopeC6", + envelopeC65 = "EnvelopeC65", + envelopeB4 = "EnvelopeB4", + envelopeB5 = "EnvelopeB5", + envelopeB6 = "EnvelopeB6", + envelopeItaly = "EnvelopeItaly", + envelopeMonarch = "EnvelopeMonarch", + envelopePersonal = "EnvelopePersonal", + fanfoldUS = "FanfoldUS", + fanfoldStdGerman = "FanfoldStdGerman", + fanfoldLegalGerman = "FanfoldLegalGerman", + } + /** + * [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. + * + */ + context = "Context", + /** + * + * Left to right reading order + * + */ + leftToRight = "LeftToRight", + /** + * + * Right to left reading order + * + */ + rightToLeft = "RightToLeft", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum BuiltInStyle { + normal = "Normal", + comma = "Comma", + currency = "Currency", + percent = "Percent", + wholeComma = "WholeComma", + wholeDollar = "WholeDollar", + hlink = "Hlink", + hlinkTrav = "HlinkTrav", + note = "Note", + warningText = "WarningText", + emphasis1 = "Emphasis1", + emphasis2 = "Emphasis2", + emphasis3 = "Emphasis3", + sheetTitle = "SheetTitle", + heading1 = "Heading1", + heading2 = "Heading2", + heading3 = "Heading3", + heading4 = "Heading4", + input = "Input", + output = "Output", + calculation = "Calculation", + checkCell = "CheckCell", + linkedCell = "LinkedCell", + total = "Total", + good = "Good", + bad = "Bad", + neutral = "Neutral", + accent1 = "Accent1", + accent1_20 = "Accent1_20", + accent1_40 = "Accent1_40", + accent1_60 = "Accent1_60", + accent2 = "Accent2", + accent2_20 = "Accent2_20", + accent2_40 = "Accent2_40", + accent2_60 = "Accent2_60", + accent3 = "Accent3", + accent3_20 = "Accent3_20", + accent3_40 = "Accent3_40", + accent3_60 = "Accent3_60", + accent4 = "Accent4", + accent4_20 = "Accent4_20", + accent4_40 = "Accent4_40", + accent4_60 = "Accent4_60", + accent5 = "Accent5", + accent5_20 = "Accent5_20", + accent5_40 = "Accent5_40", + accent5_60 = "Accent5_60", + accent6 = "Accent6", + accent6_20 = "Accent6_20", + accent6_40 = "Accent6_40", + accent6_60 = "Accent6_60", + explanatoryText = "ExplanatoryText", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum PrintErrorType { + errorsDisplayed = "ErrorsDisplayed", + errorsBlank = "ErrorsBlank", + errorsDash = "ErrorsDash", + errorsNotAvailable = "ErrorsNotAvailable", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum WorksheetPositionType { + none = "None", + before = "Before", + after = "After", + beginning = "Beginning", + end = "End", } /** * @@ -9600,11 +12218,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): FunctionResult; - toJSON(): { - "error": string; - "value": T; - }; + load(option?: Excel.Interfaces.FunctionResultLoadOptions): FunctionResult; + load(option?: string | string[]): FunctionResult; + load(option?: { + select?: string; + expand?: string; + }): FunctionResult; + toJSON(): Interfaces.FunctionResultData; } /** * @@ -13349,25 +15969,52 @@ declare namespace Excel { * @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; - toJSON(): {}; + toJSON(): { + [key: string]: string; + }; } - namespace ErrorCodes { - var accessDenied: string; - var apiNotFound: string; - var generalException: string; - var insertDeleteConflict: string; - var invalidArgument: string; - var invalidBinding: string; - var invalidOperation: string; - var invalidReference: string; - var invalidSelection: string; - var itemAlreadyExists: string; - var itemNotFound: string; - var notImplemented: string; - var unsupportedOperation: string; - var invalidOperationInCellEditMode: string; + enum ErrorCodes { + accessDenied = "AccessDenied", + apiNotFound = "ApiNotFound", + conflict = "Conflict", + generalException = "GeneralException", + insertDeleteConflict = "InsertDeleteConflict", + invalidArgument = "InvalidArgument", + invalidBinding = "InvalidBinding", + invalidOperation = "InvalidOperation", + invalidReference = "InvalidReference", + invalidSelection = "InvalidSelection", + itemAlreadyExists = "ItemAlreadyExists", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + unsupportedOperation = "UnsupportedOperation", + invalidOperationInCellEditMode = "InvalidOperationInCellEditMode", } - module Interfaces { + namespace Interfaces { + interface CollectionLoadOptions { + $top?: number; + $skip?: number; + } + /** An interface for updating data on the Application object, for use in "application.set({ ... })". */ + interface ApplicationUpdateData { + /** + * + * Returns the calculation mode used in the workbook. See Excel.CalculationMode for details. + * + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + } + /** An interface for updating data on the Workbook object, for use in "workbook.set({ ... })". */ + interface WorkbookUpdateData { + /** + * + * Gets the workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesUpdateData; + } /** An interface for updating data on the Worksheet object, for use in "worksheet.set({ ... })". */ interface WorksheetUpdateData { /** @@ -13384,13 +16031,34 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ position?: number; + /** + * + * Returns or sets 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. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * + * Gets or sets the worksheet tab color. + 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 "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; /** * * The Visibility of the worksheet. * * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] */ - visibility?: string; + 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 { @@ -13411,31 +16079,50 @@ declare namespace Excel { /** * * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - formulas?: Array>; + 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. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - formulasLocal?: Array>; + formulasLocal?: any[][]; /** * * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.2] */ - formulasR1C1?: Array>; + formulasR1C1?: any[][]; /** * - * Represents Excel's number format code for the given cell. + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - numberFormat?: Array>; + numberFormat?: any[][]; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; /** * * Represents if all rows of the current range are hidden. @@ -13443,13 +16130,23 @@ declare namespace Excel { * [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. + * + * [Api set: ExcelApi 1.7] + */ + style?: string; /** * * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. * * [Api set: ExcelApi 1.1] */ - values?: Array>; + values?: any[][]; } /** An interface for updating data on the RangeView object, for use in "rangeView.set({ ... })". */ interface RangeViewUpdateData { @@ -13459,35 +16156,43 @@ declare namespace Excel { * * [Api set: ExcelApi 1.3] */ - formulas?: Array>; + 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. * * [Api set: ExcelApi 1.3] */ - formulasLocal?: Array>; + formulasLocal?: any[][]; /** * * Represents the formula in R1C1-style notation. * * [Api set: ExcelApi 1.3] */ - formulasR1C1?: Array>; + formulasR1C1?: any[][]; /** * * Represents Excel's number format code for the given cell. * * [Api set: ExcelApi 1.3] */ - numberFormat?: Array>; + numberFormat?: any[][]; /** * * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. * * [Api set: ExcelApi 1.3] */ - values?: Array>; + values?: any[][]; + } + /** 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 { @@ -13499,6 +16204,10 @@ declare namespace Excel { */ 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 { /** @@ -13508,6 +16217,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ comment?: string; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: any; /** * * Specifies whether the object is visible or not. @@ -13516,6 +16232,14 @@ declare namespace Excel { */ 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 Table object, for use in "table.set({ ... })". */ interface TableUpdateData { /** @@ -13582,6 +16306,10 @@ declare namespace Excel { */ 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 { /** @@ -13597,7 +16325,11 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - values?: Array>; + values?: any[][]; + } + /** 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 { @@ -13607,7 +16339,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - values?: Array>; + values?: any[][]; } /** An interface for updating data on the RangeFormat object, for use in "rangeFormat.set({ ... })". */ interface RangeFormatUpdateData { @@ -13645,21 +16377,50 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - horizontalAlignment?: string; + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; /** * - * Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned. + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. * * [Api set: ExcelApi 1.2] */ rowHeight?: number; + /** + * + * Gets or sets 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. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * + * Indicates whether the columnwidth 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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; /** * * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. * * [Api set: ExcelApi 1.1] */ - verticalAlignment?: string; + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; /** * * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting @@ -13710,14 +16471,18 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - style?: string; + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; /** * * Specifies the weight of the border around a range. See Excel.BorderWeight for details. * * [Api set: ExcelApi 1.1] */ - weight?: string; + weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; + } + /** An interface for updating data on the RangeBorderCollection object, for use in "rangeBorderCollection.set({ ... })". */ + interface RangeBorderCollectionUpdateData { + items?: Excel.Interfaces.RangeBorderData[]; } /** An interface for updating data on the RangeFont object, for use in "rangeFont.set({ ... })". */ interface RangeFontUpdateData { @@ -13762,7 +16527,11 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - underline?: string; + 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 { @@ -13801,6 +16570,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartTitleUpdateData; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [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"; /** * * Represents the height, in points, of the chart object. @@ -13822,6 +16598,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ name?: string; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; /** * * Represents 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). @@ -13839,6 +16622,13 @@ declare namespace Excel { } /** 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. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; /** * * Represents the font attributes (font name, font size, color, etc.) for the current object. @@ -13847,6 +16637,10 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontUpdateData; } + /** 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 { /** @@ -13856,6 +16650,71 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartSeriesFormatUpdateData; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [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"; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: 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. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; /** * * Represents the name of a series in a chart. @@ -13863,6 +16722,27 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ name?: string; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable for line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; } /** An interface for updating data on the ChartSeriesFormat object, for use in "chartSeriesFormat.set({ ... })". */ interface ChartSeriesFormatUpdateData { @@ -13874,6 +16754,72 @@ declare namespace Excel { */ 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. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelUpdateData; + /** + * + * Encapsulates the format properties chart point. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatUpdateData; + /** + * + * Represents whether a data point has datalabel. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [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. + * + * [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 { /** @@ -13928,6 +16874,55 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartAxisTitleUpdateData; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. + * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + crosses?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. @@ -13949,6 +16944,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ minimum?: any; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. @@ -13956,6 +16965,55 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ minorUnit?: any; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * + * Represents 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. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; } /** An interface for updating data on the ChartAxisFormat object, for use in "chartAxisFormat.set({ ... })". */ interface ChartAxisFormatUpdateData { @@ -14023,7 +17081,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - position?: string; + 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. @@ -14074,6 +17132,65 @@ declare namespace Excel { */ showValue?: boolean; } + /** An interface for updating data on the ChartDataLabel object, for use in "chartDataLabel.set({ ... })". */ + interface ChartDataLabelUpdateData { + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + } /** An interface for updating data on the ChartDataLabelFormat object, for use in "chartDataLabelFormat.set({ ... })". */ interface ChartDataLabelFormatUpdateData { /** @@ -14120,6 +17237,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartLegendFormatUpdateData; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; /** * * Boolean value for whether the chart legend should overlap with the main body of the chart. @@ -14133,7 +17264,21 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - position?: string; + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; /** * * A boolean value the represents the visibility of a ChartLegend object. @@ -14141,6 +17286,27 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ visible?: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [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 visible of a chart legend entry. + * + * [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 { @@ -14161,6 +17327,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartTitleFormatUpdateData; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; /** * * Boolean value representing if the chart title will overlay the chart or not. @@ -14168,6 +17348,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ overlay?: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; /** * * Represents the title text of a chart. @@ -14175,6 +17369,27 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ text?: string; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; /** * * A boolean value the represents the visibility of a chart title object. @@ -14183,8 +17398,25 @@ declare namespace Excel { */ 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, color, etc. of chart characters object. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; /** * * Represents the font attributes (font name, font size, color, etc.) for an object. @@ -14193,6 +17425,30 @@ declare namespace Excel { */ 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. + * + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } /** An interface for updating data on the ChartLineFormat object, for use in "chartLineFormat.set({ ... })". */ interface ChartLineFormatUpdateData { /** @@ -14202,6 +17458,20 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ color?: string; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + weight?: number; } /** An interface for updating data on the ChartFont object, for use in "chartFont.set({ ... })". */ interface ChartFontUpdateData { @@ -14246,7 +17516,78 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - underline?: string; + 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. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatUpdateData; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * + * Represents the type of a chart trendline. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } + /** 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 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 { @@ -14258,6 +17599,90 @@ declare namespace Excel { */ name?: string; } + /** An interface for updating data on the DocumentProperties object, for use in "documentProperties.set({ ... })". */ + interface DocumentPropertiesUpdateData { + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". */ + interface CustomPropertyUpdateData { + /** + * + * Gets or sets the value of the custom property. + * + * [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 { /** @@ -14265,7 +17690,7 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ cellValue?: Excel.Interfaces.CellValueConditionalFormatUpdateData; /** @@ -14273,77 +17698,77 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatUpdateData; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ colorScale?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ custom?: Excel.Interfaces.CustomConditionalFormatUpdateData; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ customOrNullObject?: Excel.Interfaces.CustomConditionalFormatUpdateData; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ dataBar?: Excel.Interfaces.DataBarConditionalFormatUpdateData; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatUpdateData; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ iconSet?: Excel.Interfaces.IconSetConditionalFormatUpdateData; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatUpdateData; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ preset?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; /** @@ -14351,7 +17776,7 @@ declare namespace Excel { * 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". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ textComparison?: Excel.Interfaces.TextConditionalFormatUpdateData; /** @@ -14359,7 +17784,7 @@ declare namespace Excel { * 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". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatUpdateData; /** @@ -14367,7 +17792,7 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ topBottom?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; /** @@ -14375,7 +17800,7 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; /** @@ -14384,8 +17809,9 @@ declare namespace Excel { changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than than 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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ priority?: number; /** @@ -14393,7 +17819,7 @@ declare namespace Excel { * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ stopIfTrue?: boolean; } @@ -14403,14 +17829,14 @@ declare namespace Excel { * * Representation of all values to the left of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatUpdateData; /** * * Representation of all values to the right of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatUpdateData; /** @@ -14418,42 +17844,42 @@ declare namespace Excel { * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ axisColor?: string; /** * * Representation of how the axis is determined for an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - axisFormat?: string; + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; /** * * Represents the direction that the data bar graphic should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - barDirection?: string; + barDirection?: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; /** * * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ lowerBoundRule?: Excel.ConditionalDataBarRule; /** * * If true, hides the values from the cells where the data bar is applied. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ upperBoundRule?: Excel.ConditionalDataBarRule; } @@ -14464,21 +17890,21 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * * Boolean representation of whether or not the DataBar has a gradient. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ gradientFill?: boolean; } @@ -14489,28 +17915,28 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor?: boolean; /** * * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveFillColor?: boolean; } @@ -14520,14 +17946,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.Interfaces.ConditionalFormatRuleUpdateData; } @@ -14537,21 +17963,21 @@ declare namespace Excel { * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula?: string; /** * * The formula, if required, to evaluate the conditional format rule on in the user's language. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaLocal?: string; /** * * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaR1C1?: string; } @@ -14561,30 +17987,30 @@ declare namespace Excel { * * An array of Criteria and IconSets 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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - criteria?: Array; + criteria?: Excel.ConditionalIconCriterion[]; /** * * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ reverseIconOrder?: boolean; /** * * If true, hides the values and only shows icons. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ showIconOnly?: boolean; /** * * If set, displays the IconSet option for the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - style?: string; + 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 { @@ -14592,7 +18018,7 @@ declare namespace Excel { * * The criteria of the color scale. Midpoint is optional when using a two point color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ criteria?: Excel.ConditionalColorScaleCriteria; } @@ -14602,14 +18028,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * The criteria of the Top/Bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTopBottomRule; } @@ -14619,14 +18045,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalPresetCriteriaRule; } @@ -14636,14 +18062,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTextComparisonRule; } @@ -14653,24 +18079,45 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData; + /** + * + * Returns the fill object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillUpdateData; + /** + * + * Returns the font object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontUpdateData; /** * * Represents Excel's number format code for the given range. Cleared if null is passed in. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ numberFormat?: any; } @@ -14680,37 +18127,37 @@ declare namespace Excel { * * Represents the bold status of font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ bold?: boolean; /** * * HTML color code representation of the text color. E.g. #FF0000 represents Red. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color?: string; /** * * Represents the italic status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ italic?: boolean; /** * * Represents the strikethrough status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ strikethrough?: boolean; /** * * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ - underline?: string; + underline?: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; } /** An interface for updating data on the ConditionalRangeFill object, for use in "conditionalRangeFill.set({ ... })". */ interface ConditionalRangeFillUpdateData { @@ -14718,7 +18165,7 @@ declare namespace Excel { * * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color?: string; } @@ -14728,16 +18175,7876 @@ declare namespace Excel { * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [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 top border + * + * [Api set: ExcelApi 1.6] + */ + bottom?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + left?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + right?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the top border + * + * [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 { + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillUpdateData; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontUpdateData; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [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 describing the data returned by calling "application.toJSON()". */ + interface ApplicationData { + /** + * + * Returns the calculation mode used in the workbook. See Excel.CalculationMode for details. + * + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + } + /** An interface describing the data returned by calling "workbook.toJSON()". */ + interface WorkbookData { + /** + * + * Represents the Excel application instance that contains this workbook. + * + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationData; + /** + * + * Represents a collection of bindings that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingData[]; + /** + * + * Represents the collection of custom XML parts contained by this workbook. + * + * [Api set: ExcelApi 1.5] + */ + customXmlParts?: Excel.Interfaces.CustomXmlPartData[]; + /** + * + * Represents a collection of workbook scoped named items (named ranges and constants). + * + * [Api set: ExcelApi 1.1] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * + * Represents a collection of PivotTables associated with the workbook. + * + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * + * Gets the workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesData; + /** + * + * Represents a collection of Settings associated with the workbook. + * + * [Api set: ExcelApi 1.4] + */ + settings?: Excel.Interfaces.SettingData[]; + /** + * + * Represents a collection of styles associated with the workbook. + * + * [Api set: ExcelApi 1.7] + */ + styles?: Excel.Interfaces.StyleData[]; + /** + * + * Represents a collection of tables associated with the workbook. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableData[]; + /** + * + * Represents a collection of worksheets associated with the workbook. + * + * [Api set: ExcelApi 1.1] + */ + worksheets?: Excel.Interfaces.WorksheetData[]; + /** + * + * Gets the workbook name. + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + } + /** An interface describing the data returned by calling "worksheet.toJSON()". */ + interface WorksheetData { + /** + * + * Returns collection of charts that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartData[]; + /** + * + * Collection of names scoped to the current worksheet. + * + * [Api set: ExcelApi 1.4] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * + * Collection of PivotTables that are part of the worksheet. + * + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * + * Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionData; + /** + * + * Collection of tables that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableData[]; + /** + * + * 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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * + * Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + standardHeight?: number; + /** + * + * Returns or sets 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. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * + * Gets or sets the worksheet tab color. + 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 "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; + /** + * + * The Visibility of the worksheet. + * + * [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 { + /** + * + * Sheet protection options. + * + * [Api set: ExcelApi 1.2] + */ + options?: Excel.WorksheetProtectionOptions; + /** + * + * Indicates if the worksheet is protected. Read-Only. + * + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + } + /** An interface describing the data returned by calling "range.toJSON()". */ + interface RangeData { + /** + * + * Collection of ConditionalFormats that intersect the range. + * + * [Api set: ExcelApi 1.6] + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * + * The worksheet containing the current range. + * + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. Sheet1!A1:B4). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + address?: string; + /** + * + * Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + addressLocal?: string; + /** + * + * Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + cellCount?: number; + /** + * + * Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnCount?: number; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnIndex?: number; + /** + * + * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [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. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: any[][]; + /** + * + * Represents if all cells of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * + * Represents if the current range is an entire column. + * + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * + * Represents if the current range is an entire row. + * + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: any[][]; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; + /** + * + * Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowCount?: number; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowIndex?: number; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] */ style?: string; + /** + * + * 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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + text?: string[][]; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueTypes?: Excel.RangeValueType[][]; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "rangeView.toJSON()". */ + interface RangeViewData { + /** + * + * Represents a collection of range views associated with the range. + * + * [Api set: ExcelApi 1.3] + */ + rows?: Excel.Interfaces.RangeViewData[]; + /** + * + * Represents the cell addresses of the RangeView. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: any[][]; + /** + * + * Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: number; + /** + * + * Represents the formula in A1-style notation. + * + * [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. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: any[][]; + /** + * + * Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: number; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: any[][]; + /** + * + * Returns the number of visible rows. Read-only. + * + * [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. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: string[][]; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [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. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: any[][]; + } + /** 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 { + /** + * + * Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: string; + /** + * + * Represents the value stored for this setting. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + arrayValues?: Excel.Interfaces.NamedItemArrayValuesData; + /** + * + * Returns the worksheet on which the named item is scoped to. Throws an error if the items is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: any; + /** + * + * The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: Excel.NamedItemScope | "Worksheet" | "Workbook"; + /** + * + * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [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, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: any; + /** + * + * Specifies whether the object is visible or not. + * + * [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 + * + * [Api set: ExcelApi 1.7] + */ + types?: Excel.RangeValueType[][]; + /** + * + * Represents the values of each item in the named item array. + * + * [Api set: ExcelApi 1.7] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "binding.toJSON()". */ + interface BindingData { + /** + * + * Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [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 "table.toJSON()". */ + interface TableData { + /** + * + * Represents a collection of all the columns in the table. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnData[]; + /** + * + * Represents a collection of all the rows in the table. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowData[]; + /** + * + * Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortData; + /** + * + * The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [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 { + /** + * + * Retrieve the filter applied to the column. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterData; + /** + * + * Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: number; + /** + * + * Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * + * Represents the name of the table column. + * + * [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 of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** 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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "rangeFormat.toJSON()". */ + interface RangeFormatData { + /** + * + * Collection of border objects that apply to the overall range. + * + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * + * Returns the fill object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * + * Returns the font object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * + * Returns the format protection object for a range. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionData; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * + * Gets or sets 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. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * + * Indicates whether the columnwidth 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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface describing the data returned by calling "formatProtection.toJSON()". */ + interface FormatProtectionData { + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [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 border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + } + /** An interface describing the data returned by calling "rangeBorder.toJSON()". */ + interface RangeBorderData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [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 font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesData; + /** + * + * Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * + * Encapsulates the format properties for the chart area. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatData; + /** + * + * Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendData; + /** + * + * Represents either a single series or collection of series in the chart. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesData[]; + /** + * + * Represents the title of the specified chart, including the text, visibility, position and formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleData; + /** + * + * The worksheet containing the current chart. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [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"; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * + * The unique id of chart. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + id?: string; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * + * Represents 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). + * + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** 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. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** 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 { + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatData; + /** + * + * Represents a collection of all points in the series. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointData[]; + /** + * + * Represents a collection of trendlines in the series. + * + * [Api set: ExcelApi 1.7] + */ + trendlines?: Excel.Interfaces.ChartTrendlineData[]; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [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"; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: 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. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable for line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + } + /** An interface describing the data returned by calling "chartSeriesFormat.toJSON()". */ + interface ChartSeriesFormatData { + /** + * + * Represents line formatting. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelData; + /** + * + * Encapsulates the format properties chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatData; + /** + * + * Represents whether a data point has datalabel. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [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. Read-only. + * + * [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. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisData; + /** + * + * Represents the series axis of a 3-dimensional chart. + * + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisData; + /** + * + * Represents the value axis in an axis. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatData; + /** + * + * Returns a gridlines object that represents the major gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleData; + /** + * + * Represents the group for the specified axis. See Excel.ChartAxisGroup for details. + * + * [Api set: ExcelApi 1.7] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. + * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + crosses?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `PositionAt` instead. + * Represents the specified axis where the other axis crosses at. Read Only. Set to this property should use SetCrossesAt(double) method. + * + * [Api set: ExcelApi 1.7] + */ + crossesAt?: number; + /** + * + * Represents the custom axis display unit value. Read Only. To set this property, please use the SetCustomDisplayUnit(double) method. + * + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: number; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * + * Represents the height, in points, of the chart axis. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents the distance, in points, from the left edge of the axis to the left of chart area. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. + * + * [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. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * + * Represents 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. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * + * Represents the distance, in points, from the top edge of the axis to the top of chart area. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * Represents the axis type. See Excel.ChartAxisType for details. + * + * [Api set: ExcelApi 1.7] + */ + type?: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the chart axis. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartAxisFormat.toJSON()". */ + interface ChartAxisFormatData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartAxisTitle.toJSON()". */ + interface ChartAxisTitleData { + /** + * + * Represents the formatting of chart axis title. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatData; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartAxisTitleFormat.toJSON()". */ + interface ChartAxisTitleFormatData { + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartDataLabels.toJSON()". */ + interface ChartDataLabelsData { + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + } + /** An interface describing the data returned by calling "chartDataLabel.toJSON()". */ + interface ChartDataLabelData { + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + } + /** An interface describing the data returned by calling "chartDataLabelFormat.toJSON()". */ + interface ChartDataLabelFormatData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartGridlines.toJSON()". */ + interface ChartGridlinesData { + /** + * + * Represents the formatting of chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatData; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartGridlinesFormat.toJSON()". */ + interface ChartGridlinesFormatData { + /** + * + * Represents chart line formatting. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatData; + /** + * + * Represents a collection of legendEntries in the legend. + * + * [Api set: ExcelApi 1.7] + */ + legendEntries?: Excel.Interfaces.ChartLegendEntryData[]; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartLegendEntry.toJSON()". */ + interface ChartLegendEntryData { + /** + * + * Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + } + /** 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 font attributes such as font name, font size, color, etc. of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** 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. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatData; + /** + * + * Returns the height, in points, of the chart title. Read-only. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Returns the width, in points, of the chart title. Read-only. Null if chart title is not visible. + * + * [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, color, etc. of chart characters object. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface describing the data returned by calling "chartLineFormat.toJSON()". */ + interface ChartLineFormatData { + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [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. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatData; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * + * Represents the type of a chart trendline. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "tableSort.toJSON()". */ + interface TableSortData { + /** + * + * Represents the current conditions used to last sort the table. + * + * [Api set: ExcelApi 1.2] + */ + fields?: Excel.SortField[]; + /** + * + * Represents whether the casing impacted the last sort of the table. + * + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * + * Represents Chinese character ordering method last used to sort the table. + * + * [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. + * + * [Api set: ExcelApi 1.2] + */ + criteria?: Excel.FilterCriteria; + } + /** 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. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * + * The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: string; + } + /** 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 worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Id of the PivotTable. + * + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: string; + } + /** An interface describing the data returned by calling "documentProperties.toJSON()". */ + interface DocumentPropertiesData { + /** + * + * Gets the collection of custom properties of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + custom?: Excel.Interfaces.CustomPropertyData[]; + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * + * Gets the creation date of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + creationDate?: Date; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * + * Gets the last author of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: string; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface describing the data returned by calling "customProperty.toJSON()". */ + interface CustomPropertyData { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + key?: string; + /** + * + * Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + type?: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * + * Gets or sets the value of the custom property. + * + * [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. + For example to format all cells between 5 and 10. + * + * [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. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatData; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [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". + * + * [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". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [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 than 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. + * + * [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. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * A type of conditional format. Only one can be set at a time. Read-Only. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatData; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatData; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection?: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [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. + * + * [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, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [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, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * Represents the Rule object on this conditional format. + * + * [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, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: string; + } + /** An interface describing the data returned by calling "iconSetConditionalFormat.toJSON()". */ + interface IconSetConditionalFormatData { + /** + * + * An array of Criteria and IconSets 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. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalIconCriterion[]; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [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. + * + * [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). + * + * [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 formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The rule of the conditional format. + * + * [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 formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The rule of the conditional format. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * Represents the Rule object on this conditional format. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderData[]; + /** + * + * Returns the fill object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillData; + /** + * + * Returns the font object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontData; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface describing the data returned by calling "conditionalRangeFont.toJSON()". */ + interface ConditionalRangeFontData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [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, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [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, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [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. + * + * [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 Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * + * Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [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 "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. + * + * [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). + * + * [Api set: ExcelApi 1.2] + */ + value?: T; + } + /** + * + * Represents the Excel application that manages the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface ApplicationLoadOptions { + $all?: boolean; + /** + * + * Returns the calculation mode used in the workbook. See Excel.CalculationMode for details. + * + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: boolean; + } + /** + * + * Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface WorkbookLoadOptions { + $all?: boolean; + /** + * + * Represents the Excel application instance that contains this workbook. + * + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationLoadOptions; + /** + * + * Represents a collection of bindings that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingCollectionLoadOptions; + /** + * + * Gets the workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesLoadOptions; + /** + * + * Represents a collection of tables associated with the workbook. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * Gets the workbook name. + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + } + /** + * + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface WorksheetLoadOptions { + $all?: boolean; + /** + * + * Returns collection of charts that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * + * Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * + * Collection of tables that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * 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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * + * Returns or sets 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. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * + * Gets or sets the worksheet tab color. + 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 "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * + * The Visibility of the worksheet. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + interface WorksheetCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns collection of charts that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Collection of tables that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * 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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets 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. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the worksheet tab color. + 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 "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * + * For EACH ITEM in the collection: The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: boolean; + } + /** + * + * Represents the protection of a sheet object. + * + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionLoadOptions { + $all?: boolean; + /** + * + * Sheet protection options. + * + * [Api set: ExcelApi 1.2] + */ + options?: boolean; + /** + * + * Indicates if the worksheet is protected. Read-Only. + * + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + } + /** + * + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, block of cells, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * + * The worksheet containing the current range. + * + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. Sheet1!A1:B4). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * + * Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * + * Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * + * Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * + * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [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. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * + * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: boolean; + /** + * + * Represents if all cells of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink?: boolean; + /** + * + * Represents if the current range is an entire column. + * + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * + * Represents if the current range is an entire row. + * + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * + * Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowIndex?: 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. + * + * [Api set: ExcelApi 1.7] + */ + style?: 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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueTypes?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * RangeView represents a set of visible cells of the parent range. + * + * [Api set: ExcelApi 1.3] + */ + interface RangeViewLoadOptions { + $all?: boolean; + /** + * + * Represents the cell addresses of the RangeView. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * + * Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * + * Represents the formula in A1-style notation. + * + * [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. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * + * Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * + * Returns the number of visible rows. Read-only. + * + * [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. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [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. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + } + /** + * + * Represents a collection of RangeView objects. + * + * [Api set: ExcelApi 1.3] + */ + interface RangeViewCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the cell addresses of the RangeView. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in A1-style notation. + * + * [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. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the number of visible rows. Read-only. + * + * [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. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the type of data of each cell. Read-only. + * + * [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. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + } + /** + * + * Represents a collection of worksheet objects that are part of the workbook. + * + * [Api set: ExcelApi 1.4] + */ + interface SettingCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: boolean; + } + /** + * + * Setting represents a key-value pair of a setting persisted to the document. + * + * [Api set: ExcelApi 1.4] + */ + interface SettingLoadOptions { + $all?: boolean; + /** + * + * Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * + * Represents the value stored for this setting. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + interface NamedItemCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns an object containing values and types of the named item. + * + * [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 items is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * + * For EACH ITEM in the collection: The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [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, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * + * For EACH ITEM in the collection: Specifies whether the object is visible or not. + * + * [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, reference to a range. This object can be used to obtain range object associated with names. + * + * [Api set: ExcelApi 1.1] + */ + interface NamedItemLoadOptions { + $all?: boolean; + /** + * + * Returns an object containing values and types of the named item. + * + * [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 items is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * + * The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * + * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [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, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * + * Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents an object containing values and types of a named item. + * + * [Api set: ExcelApi 1.7] + */ + interface NamedItemArrayValuesLoadOptions { + $all?: boolean; + /** + * + * Represents the types for each item in the named item array + * + * [Api set: ExcelApi 1.7] + */ + types?: boolean; + /** + * + * Represents the values of each item in the named item array. + * + * [Api set: ExcelApi 1.7] + */ + values?: boolean; + } + /** + * + * Represents an Office.js binding that is defined in the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface BindingLoadOptions { + $all?: boolean; + /** + * + * Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents the collection of all the binding objects that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface BindingCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + interface TableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the last column contains special formatting. + * + * [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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * + * Represents an Excel table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Represents a collection of all the columns in the table. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * + * Represents a collection of all the rows in the table. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * + * Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * + * The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * + * Represents a collection of all the columns that are part of the table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableColumnCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Retrieve the filter applied to the column. + * + * [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. Read-only. + * + * [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. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of the table column. + * + * [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 of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a column in a table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableColumnLoadOptions { + $all?: boolean; + /** + * + * Retrieve the filter applied to the column. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterLoadOptions; + /** + * + * Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * Represents the name of the table column. + * + * [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 of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: 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/columns are added before them, + a TableRow object represent 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. + * + * [Api set: ExcelApi 1.1] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [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 of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a row in a table. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent 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. + * + * [Api set: ExcelApi 1.1] + */ + interface TableRowLoadOptions { + $all?: boolean; + /** + * + * Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFormatLoadOptions { + $all?: boolean; + /** + * + * Collection of border objects that apply to the overall range. + * + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * + * Returns the fill object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * + * Returns the font object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * + * Returns the format protection object for a range. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionLoadOptions; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth?: boolean; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: boolean; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight?: boolean; + /** + * + * Gets or sets 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. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * + * Indicates whether the columnwidth 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. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: boolean; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** + * + * Represents the format protection of a range object. + * + * [Api set: ExcelApi 1.2] + */ + interface FormatProtectionLoadOptions { + $all?: boolean; + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** + * + * Represents the background of a range object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFillLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * + * Represents the border objects that make up the range border. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [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. Read-only. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * + * A collection of all the chart objects on a worksheet. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents chart axes. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * For EACH ITEM in the collection: Encapsulates the format properties for the chart area. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents either a single series or collection of series in the chart. + * + * [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 formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current chart. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the type of the chart. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: The unique id of chart. Read-only. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * + * For EACH ITEM in the collection: Represents 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). + * + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * + * Represents a chart object in a workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLoadOptions { + $all?: boolean; + /** + * + * Represents chart axes. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * + * Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * Encapsulates the format properties for the chart area. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * + * Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * + * Represents either a single series or collection of series in the chart. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; + /** + * + * Represents the title of the specified chart, including the text, visibility, position and formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * + * The worksheet containing the current chart. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * + * The unique id of chart. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + id?: boolean; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * + * Represents 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). + * + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties for the overall chart area. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAreaFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format of chart area, which includes color, linestyle and weight. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a collection of chart series. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents a collection of all points in the series. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the chart type of a series. See Excel.ChartType for details. + * + * [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 doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: 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. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * For EACH ITEM in the collection: Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * + * For EACH ITEM in the collection: Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series is smooth or not. Only applicable for line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + } + /** + * + * Represents a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * + * Represents a collection of all points in the series. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: 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. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable for line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + } + /** + * + * encapsulates the format properties for the chart series + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesFormatLoadOptions { + $all?: boolean; + /** + * + * Represents line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * A collection of all the chart points within a series inside a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointsCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * + * For EACH ITEM in the collection: Encapsulates the format properties chart point. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents whether a data point has datalabel. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: Represents marker size of data point. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * + * Represents a point of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointLoadOptions { + $all?: boolean; + /** + * + * Returns the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * + * Encapsulates the format properties chart point. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatLoadOptions; + /** + * + * Represents whether a data point has datalabel. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * + * Represents formatting object for chart points. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format of a chart data point, which includes color, style and weight information. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + } + /** + * + * Represents the chart axes. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxesLoadOptions { + $all?: boolean; + /** + * + * Represents the category axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * + * Represents the series axis of a 3-dimensional chart. + * + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * + * Represents the value axis in an axis. + * + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisLoadOptions; + } + /** + * + * Represents a single axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart object, which includes line and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatLoadOptions; + /** + * + * Returns a gridlines object that represents the major gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleLoadOptions; + /** + * + * Represents the group for the specified axis. See Excel.ChartAxisGroup for details. + * + * [Api set: ExcelApi 1.7] + */ + axisGroup?: boolean; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: boolean; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType?: boolean; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. + * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + crosses?: boolean; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `PositionAt` instead. + * Represents the specified axis where the other axis crosses at. Read Only. Set to this property should use SetCrossesAt(double) method. + * + * [Api set: ExcelApi 1.7] + */ + crossesAt?: boolean; + /** + * + * Represents the custom axis display unit value. Read Only. To set this property, please use the SetCustomDisplayUnit(double) method. + * + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: boolean; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit?: boolean; + /** + * + * Represents the height, in points, of the chart axis. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * + * Represents the distance, in points, from the left edge of the axis to the left of chart area. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase?: boolean; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: boolean; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. + * + * [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. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + minimum?: boolean; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: boolean; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [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. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit?: boolean; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType?: boolean; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: boolean; + /** + * + * Represents 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. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: boolean; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: boolean; + /** + * + * Represents the distance, in points, from the top edge of the axis to the top of chart area. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * + * Represents the axis type. See Excel.ChartAxisType for details. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the chart axis. Null if the axis's not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties for the chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * Represents the title of a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of chart axis title. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents the chart axis title formatting. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a collection of all the data labels on a chart point. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelsLoadOptions { + $all?: boolean; + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * String representing the separator used for the data labels on a chart. + * + * [Api set: ExcelApi 1.1] + */ + separator?: boolean; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + } + /** + * + * Represents the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartDataLabelLoadOptions { + $all?: boolean; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * + * String representing the separator used for the data label on a chart. + * + * [Api set: ExcelApi 1.7] + */ + separator?: boolean; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + } + /** + * + * Encapsulates the format properties for the chart data labels. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents major or minor gridlines on a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatLoadOptions; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Encapsulates the format properties for chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesFormatLoadOptions { + $all?: boolean; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * Represents the legend in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart legend, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatLoadOptions; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * + * Represents the legendEntry in legendEntryCollection. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryLoadOptions { + $all?: boolean; + /** + * + * Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + } + /** + * + * Represents a collection of legendEntries. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + } + /** + * + * Encapsulates the format properties of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a chart title object of a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart title, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatLoadOptions; + /** + * + * Returns the height, in points, of the chart title. Read-only. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * + * Represents a boolean value that determines if the chart title has a shadow. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: boolean; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title's not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Returns the width, in points, of the chart title. Read-only. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * + * Represents the substring in chart related objects that contains text, like ChartTitle object, ChartAxisTitle object, etc. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartFormatStringLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart characters object. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Provides access to the office art formatting for chart title. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format of chart title, which includes color, linestyle and weight. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents the border formatting of a chart element. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of borders in the chart. + * + * [Api set: ExcelApi 1.7] + */ + color?: boolean; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * + * Represents weight of the border, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * + * Enapsulates the formatting options for line elements. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLineFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * + * Represents weight of the line, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for a chart object. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * + * This object represents the attributes for a chart trendline object. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: boolean; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: boolean; + /** + * + * Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * + * Represents a collection of Chart Trendlines. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * + * 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. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [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, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * + * Represents the format properties for chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineFormatLoadOptions { + $all?: boolean; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * Manages sorting operations on Table objects. + * + * [Api set: ExcelApi 1.2] + */ + interface TableSortLoadOptions { + $all?: boolean; + /** + * + * Represents the current conditions used to last sort the table. + * + * [Api set: ExcelApi 1.2] + */ + fields?: boolean; + /** + * + * Represents whether the casing impacted the last sort of the table. + * + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * + * Represents Chinese character ordering method last used to sort the table. + * + * [Api set: ExcelApi 1.2] + */ + method?: boolean; + } + /** + * + * Manages the filtering of a table's column. + * + * [Api set: ExcelApi 1.2] + */ + interface FilterLoadOptions { + $all?: boolean; + /** + * + * The currently applied filter on the given column. + * + * [Api set: ExcelApi 1.2] + */ + criteria?: 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. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartScopedCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * A collection of custom XML parts. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * Represents a custom XML part object in a workbook. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartLoadOptions { + $all?: boolean; + /** + * + * The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.3] + */ + interface PivotTableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Id of the PivotTable. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + } + /** + * + * Represents an Excel PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + interface PivotTableLoadOptions { + $all?: boolean; + /** + * + * The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Id of the PivotTable. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + } + /** + * + * Represents workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + interface DocumentPropertiesLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author?: boolean; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category?: boolean; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments?: boolean; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company?: boolean; + /** + * + * Gets the creation date of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + creationDate?: boolean; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords?: boolean; + /** + * + * Gets the last author of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: boolean; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager?: boolean; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: boolean; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject?: boolean; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title?: boolean; + } + /** + * + * Represents a custom property. + * + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyLoadOptions { + $all?: boolean; + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * + * Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * + * Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * + * Contains the collection of customProperty objects. + * + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * + * Represents a collection of all the conditional formats that are overlap the range. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [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. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [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. + * + * [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. + * + * [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. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [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". + * + * [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". + * + * [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 an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [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 an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [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 than 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. + * + * [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. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [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. Read-Only. + * + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * + * An object encapsulating a conditional format's range, format, rule, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [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. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [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". + * + * [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". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [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 than 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. + * + * [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. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * A type of conditional format. Only one can be set at a time. Read-Only. + * + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * + * Represents an Excel Conditional Data Bar Type. + * + * [Api set: ExcelApi 1.6] + */ + interface DataBarConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Representation of all values to the left of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor?: boolean; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat?: boolean; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection?: boolean; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: boolean; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: boolean; + } + /** + * + * Represents a conditional format DataBar Format for the positive side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarPositiveFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** + * + * Represents a conditional format DataBar Format for the negative side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarNegativeFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** + * + * Represents a custom conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + interface CustomConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleLoadOptions; + } + /** + * + * Represents a rule, for all traditional rule/format pairings. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatRuleLoadOptions { + $all?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: boolean; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + interface IconSetConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * An array of Criteria and IconSets 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. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: boolean; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + interface ColorScaleConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * [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). + * + * [Api set: ExcelApi 1.6] + */ + threeColorScale?: boolean; + } + /** + * + * Represents a Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface TopBottomConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents the the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror. + * + * [Api set: ExcelApi 1.6] + */ + interface PresetCriteriaConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents a specific text conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface TextConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents a cell value conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface CellValueConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFormatLoadOptions { + $all?: boolean; + /** + * + * Collection of border objects that apply to the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions; + /** + * + * Returns the fill object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillLoadOptions; + /** + * + * Returns the font object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontLoadOptions; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat?: boolean; + } + /** + * + * This object represents the font attributes (font style,, color, etc.) for an object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + underline?: boolean; + } + /** + * + * Represents the background of a conditional range object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFillLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * Represents the border objects that make up range border. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [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. Read-only. + * + * [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. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * An object encapsulating a style's format and other properties. + * + * [Api set: ExcelApi 1.7] + */ + interface StyleLoadOptions { + $all?: boolean; + /** + * + * A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * + * Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * + * Represents a collection of all the styles. + * + * [Api set: ExcelApi 1.7] + */ + interface StyleCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The Fill of the style. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * + * For EACH ITEM in the collection: Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the formula will be hidden when the worksheet is protected. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [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. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * For EACH ITEM in the collection: The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * + * For EACH ITEM in the collection: The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * + * For EACH ITEM in the collection: The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * + * An object containing the result of a function-evaluation operation + * + * [Api set: ExcelApi 1.2] + */ + interface FunctionResultLoadOptions { + $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. + * + * [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). + * + * [Api set: ExcelApi 1.2] + */ + value?: boolean; } } } @@ -14760,6 +26067,30 @@ declare namespace Excel { //////////////////////////////////////////////////////////////// declare namespace Word { + /** + * + * The Application object. + * + * [Api set: WordApi 1.3] + */ + class Application extends OfficeExtension.ClientObject { + /** + * + * Creates a new hidden document by using an optional base64 encoded .docx file. + * + * [Api set: WordApi 1.3] + * + * @param base64File Optional. The base64 encoded .docx file. The default value is null. + */ + createDocument(base64File?: string): Word.DocumentCreated; + /** + * Create a new instance of Word.Application object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; + toJSON(): { + [key: string]: string; + }; + } /** * * Represents the body of a document or a section. @@ -14773,84 +26104,84 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. * * [Api set: WordApi 1.1] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the collection of inlinePicture objects in the body. The collection does not include floating images. Read-only. * * [Api set: WordApi 1.1] */ - inlinePictures: Word.InlinePictureCollection; + readonly inlinePictures: Word.InlinePictureCollection; /** * * Gets the collection of list objects in the body. Read-only. * * [Api set: WordApi 1.3] */ - lists: Word.ListCollection; + readonly lists: Word.ListCollection; /** * * Gets the collection of paragraph objects in the body. Read-only. * * [Api set: WordApi 1.1] */ - paragraphs: Word.ParagraphCollection; + 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 if there isn't a parent body. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. * * [Api set: WordApi 1.3] */ - parentBodyOrNullObject: Word.Body; + readonly parentBodyOrNullObject: Word.Body; /** * * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. * * [Api set: WordApi 1.3] */ - parentSection: Word.Section; + readonly parentSection: Word.Section; /** * * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. * * [Api set: WordApi 1.3] */ - parentSectionOrNullObject: Word.Section; + readonly parentSectionOrNullObject: Word.Section; /** * * Gets the collection of table objects in the body. Read-only. * * [Api set: WordApi 1.3] */ - tables: Word.TableCollection; + readonly tables: Word.TableCollection; /** * * Gets or sets 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. @@ -14864,28 +26195,23 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn: string; + styleBuiltIn: Word.Style | "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. Read-only. * * [Api set: WordApi 1.1] */ - text: string; + readonly text: string; /** * * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. * * [Api set: WordApi 1.3] */ - type: string; + readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.BodyUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Body): void; /** @@ -14917,7 +26243,16 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. */ - getRange(rangeLocation?: string): Word.Range; + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the whole body, or the starting or ending point of the body, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start' or 'End'. @@ -14927,7 +26262,17 @@ declare namespace Word { * @param breakType Required. The break type to add to the body. * @param insertLocation Required. The value can be 'Start' or 'End'. */ - insertBreak(breakType: string, insertLocation: string): void; + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the body. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; /** * * Wraps the body object with a Rich Text content control. @@ -14944,7 +26289,17 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document into the body at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -14954,7 +26309,17 @@ declare namespace Word { * @param html Required. The HTML to be inserted in the document. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertHtml(html: string, insertLocation: string): Word.Range; + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the document. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a picture into the body at the specified location. The insertLocation value can be 'Start' or 'End'. @@ -14964,7 +26329,17 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted in the body. * @param insertLocation Required. The value can be 'Start' or 'End'. */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts a picture into the body at the specified location. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted in the body. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; /** * * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -14974,7 +26349,17 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertOoxml(ooxml: string, insertLocation: string): Word.Range; + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a paragraph at the specified location. The insertLocation value can be 'Start' or 'End'. @@ -14984,7 +26369,17 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Start' or 'End'. */ - insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; /** * * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Start' or 'End'. @@ -14996,7 +26391,19 @@ declare namespace Word { * @param insertLocation Required. The value can 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: string, values?: Array>): Word.Table; + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Start' or 'End'. + * + * [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 can 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: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; /** * * Inserts text into the body at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -15006,7 +26413,17 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertText(text: string, insertLocation: string): Word.Range; + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text into the body at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): 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. @@ -15033,11 +26450,25 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. */ - select(selectionMode?: string): void; + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the body and navigates the Word UI to it. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Body; + load(option?: Word.Interfaces.BodyLoadOptions): Word.Body; + load(option?: string | string[]): Word.Body; + load(option?: { + 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 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. */ @@ -15046,13 +26477,7 @@ declare namespace Word { * 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(): Word.Body; - toJSON(): { - "font": Font; - "style": string; - "styleBuiltIn": string; - "text": string; - "type": string; - }; + toJSON(): Word.Interfaces.BodyData; } /** * @@ -15067,98 +26492,98 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.1] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the collection of inlinePicture objects in the content control. The collection does not include floating images. Read-only. * * [Api set: WordApi 1.1] */ - inlinePictures: Word.InlinePictureCollection; + readonly inlinePictures: Word.InlinePictureCollection; /** * * Gets the collection of list objects in the content control. Read-only. * * [Api set: WordApi 1.3] */ - lists: Word.ListCollection; + readonly lists: Word.ListCollection; /** * * Get the collection of paragraph objects in the content control. Read-only. * * [Api set: WordApi 1.1] */ - paragraphs: Word.ParagraphCollection; + readonly paragraphs: Word.ParagraphCollection; /** * * Gets the parent body of the content control. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the content control. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the content control. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets the collection of table objects in the content control. Read-only. * * [Api set: WordApi 1.3] */ - tables: Word.TableCollection; + readonly tables: Word.TableCollection; /** * * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. * * [Api set: WordApi 1.1] */ - appearance: string; + appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; /** * * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. @@ -15186,7 +26611,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - id: number; + readonly id: number; /** * * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. @@ -15214,14 +26639,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn: string; + styleBuiltIn: Word.Style | "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. Read-only. * * [Api set: WordApi 1.3] */ - subtype: string; + readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; /** * * Gets or sets a tag to identify a content control. @@ -15235,7 +26660,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - text: string; + readonly text: string; /** * * Gets or sets the title for a content control. @@ -15249,14 +26674,9 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - type: string; + readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ContentControlUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ContentControl): void; /** @@ -15297,7 +26717,16 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Before', 'Start', 'End', 'After' or 'Content'. */ - getRange(rangeLocation?: string): Word.Range; + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the whole content control, or the starting or ending point of the content control, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Before', 'Start', 'End', 'After' or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; /** * * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. @@ -15307,7 +26736,7 @@ declare namespace Word { * @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: Array, trimSpacing?: boolean): Word.RangeCollection; + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. @@ -15317,7 +26746,17 @@ declare namespace Word { * @param breakType Required. Type of break. * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. */ - insertBreak(breakType: string, insertLocation: string): void; + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. Type of break. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; /** * * Inserts a document into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -15327,7 +26766,17 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ - insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts HTML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -15337,7 +26786,17 @@ declare namespace Word { * @param html Required. The HTML to be inserted in to the content control. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ - insertHtml(html: string, insertLocation: string): Word.Range; + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts an inline picture into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -15347,7 +26806,17 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted in the content control. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts an inline picture into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted in the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; /** * * Inserts OOXML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -15357,7 +26826,17 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted in to the content control. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ - insertOoxml(ooxml: string, insertLocation: string): Word.Range; + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. @@ -15367,7 +26846,17 @@ declare namespace Word { * @param paragraphText Required. The paragrph text to be inserted. * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. */ - insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragrph text to be inserted. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; /** * * Inserts a table with the specified number of rows and columns into, or next to, a content control. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. @@ -15379,7 +26868,19 @@ declare namespace Word { * @param insertLocation Required. The value can 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: string, values?: Array>): Word.Table; + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns into, or next to, a content control. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. + * + * [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 can 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: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; /** * * Inserts text into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -15389,7 +26890,17 @@ declare namespace Word { * @param text Required. The text to be inserted in to the content control. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. */ - insertText(text: string, insertLocation: string): Word.Range; + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. The text to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): 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. @@ -15416,7 +26927,16 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. */ - select(selectionMode?: string): void; + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the content control. This causes Word to scroll to the selection. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can 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. @@ -15428,11 +26948,16 @@ declare namespace Word { * @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: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControl; + load(option?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; + load(option?: string | string[]): Word.ContentControl; + load(option?: { + select?: string; + expand?: string; + }): Word.ContentControl; /** * 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. */ @@ -15441,23 +26966,7 @@ declare namespace Word { * 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(): Word.ContentControl; - toJSON(): { - "appearance": string; - "cannotDelete": boolean; - "cannotEdit": boolean; - "color": string; - "font": Font; - "id": number; - "placeholderText": string; - "removeWhenEdited": boolean; - "style": string; - "styleBuiltIn": string; - "subtype": string; - "tag": string; - "text": string; - "title": string; - "type": string; - }; + toJSON(): Word.Interfaces.ContentControlData; } /** * @@ -15467,7 +26976,7 @@ declare namespace Word { */ class ContentControlCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.ContentControl[]; /** * * Gets a content control by its identifier. Throws if there isn't a content control with the identifier in this collection. @@ -15512,7 +27021,7 @@ declare namespace Word { * * @param types Required. An array of content control types and/or subtypes. */ - getByTypes(types: Array): Word.ContentControlCollection; + getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; /** * * Gets the first content control in this collection. Throws if this collection is empty. @@ -15539,7 +27048,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControlCollection; + load(option?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; + load(option?: string | string[]): Word.ContentControlCollection; + load(option?: OfficeExtension.LoadOption): Word.ContentControlCollection; /** * 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. */ @@ -15548,7 +27059,7 @@ declare namespace Word { * 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(): Word.ContentControlCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.ContentControlCollectionData; } /** * @@ -15563,28 +27074,23 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - key: string; + readonly key: string; /** * - * Gets the value type of the custom property. Read only. + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. * * [Api set: WordApi 1.3] */ - type: string; + readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; /** * - * Gets or sets the value of the custom property. + * Gets or sets the value of the custom property. Note that even though Word Online 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). * * [Api set: WordApi 1.3] */ value: any; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.CustomPropertyUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: CustomProperty): void; /** @@ -15597,7 +27103,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.CustomProperty; + load(option?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; + load(option?: string | string[]): Word.CustomProperty; + load(option?: { + 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 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. */ @@ -15606,11 +27117,7 @@ declare namespace Word { * 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(): Word.CustomProperty; - toJSON(): { - "key": string; - "type": string; - "value": any; - }; + toJSON(): Word.Interfaces.CustomPropertyData; } /** * @@ -15620,7 +27127,7 @@ declare namespace Word { */ class CustomPropertyCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.CustomProperty[]; /** * * Creates a new or sets an existing custom property. @@ -15666,7 +27173,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.CustomPropertyCollection; + load(option?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; + load(option?: string | string[]): Word.CustomPropertyCollection; + load(option?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; /** * 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. */ @@ -15675,7 +27184,7 @@ declare namespace Word { * 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(): Word.CustomPropertyCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.CustomPropertyCollectionData; } /** * @@ -15690,42 +27199,37 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - body: Word.Body; + readonly body: Word.Body; /** * - * Gets the collection of content control objects in the current document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * - * Gets the properties of the current document. Read-only. + * Gets the properties of the document. Read-only. * * [Api set: WordApi 1.3] */ - properties: Word.DocumentProperties; + readonly properties: Word.DocumentProperties; /** * * Gets the collection of section objects in the document. Read-only. * * [Api set: WordApi 1.1] */ - sections: Word.SectionCollection; + readonly sections: Word.SectionCollection; /** * * 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. Read-only. * * [Api set: WordApi 1.1] */ - saved: boolean; + readonly saved: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.DocumentUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Document): void; /** @@ -15745,7 +27249,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Document; + load(option?: Word.Interfaces.DocumentLoadOptions): Word.Document; + load(option?: string | string[]): Word.Document; + load(option?: { + select?: string; + expand?: string; + }): Word.Document; /** * 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. */ @@ -15754,11 +27263,86 @@ declare namespace Word { * 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(): Word.Document; - toJSON(): { - "body": Body; - "properties": DocumentProperties; - "saved": boolean; - }; + toJSON(): Word.Interfaces.DocumentData; + } + /** + * + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * [Api set: WordApi 1.3] + */ + class DocumentCreated extends OfficeExtension.ClientObject { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [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.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly sections: Word.SectionCollection; + /** + * + * 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. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly saved: boolean; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + 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: DocumentCreated): void; + /** + * + * Open the document. + * + * [Api set: WordApi 1.3] + */ + open(): void; + /** + * + * Saves the document. This will use the Word default file naming convention if the document has not been saved before. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + save(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; + load(option?: string | string[]): Word.DocumentCreated; + load(option?: { + 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 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(): Word.DocumentCreated; + /** + * 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(): Word.DocumentCreated; + toJSON(): Word.Interfaces.DocumentCreatedData; } /** * @@ -15773,14 +27357,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - customProperties: Word.CustomPropertyCollection; + readonly customProperties: Word.CustomPropertyCollection; /** * * Gets the application name of the document. Read only. * * [Api set: WordApi 1.3] */ - applicationName: string; + readonly applicationName: string; /** * * Gets or sets the author of the document. @@ -15815,7 +27399,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - creationDate: Date; + readonly creationDate: Date; /** * * Gets or sets the format of the document. @@ -15836,21 +27420,21 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - lastAuthor: string; + readonly lastAuthor: string; /** * * Gets the last print date of the document. Read only. * * [Api set: WordApi 1.3] */ - lastPrintDate: Date; + readonly lastPrintDate: Date; /** * * Gets the last save time of the document. Read only. * * [Api set: WordApi 1.3] */ - lastSaveTime: Date; + readonly lastSaveTime: Date; /** * * Gets or sets the manager of the document. @@ -15864,14 +27448,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - revisionNumber: string; + readonly revisionNumber: string; /** * * Gets the security of the document. Read only. * * [Api set: WordApi 1.3] */ - security: number; + readonly security: number; /** * * Gets or sets the subject of the document. @@ -15885,7 +27469,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - template: string; + readonly template: string; /** * * Gets or sets the title of the document. @@ -15894,18 +27478,18 @@ declare namespace Word { */ title: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.DocumentPropertiesUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: DocumentProperties): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.DocumentProperties; + load(option?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; + load(option?: string | string[]): Word.DocumentProperties; + load(option?: { + 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 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. */ @@ -15914,25 +27498,7 @@ declare namespace Word { * 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(): Word.DocumentProperties; - toJSON(): { - "applicationName": string; - "author": string; - "category": string; - "comments": string; - "company": string; - "creationDate": Date; - "format": string; - "keywords": string; - "lastAuthor": string; - "lastPrintDate": Date; - "lastSaveTime": Date; - "manager": string; - "revisionNumber": string; - "security": number; - "subject": string; - "template": string; - "title": string; - }; + toJSON(): Word.Interfaces.DocumentPropertiesData; } /** * @@ -16017,20 +27583,20 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - underline: string; + 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 on the object at the same time, based on JSON input. */ - set(properties: Interfaces.FontUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Font): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Font; + load(option?: Word.Interfaces.FontLoadOptions): Word.Font; + load(option?: string | string[]): Word.Font; + load(option?: { + 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 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. */ @@ -16039,19 +27605,7 @@ declare namespace Word { * 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(): Word.Font; - toJSON(): { - "bold": boolean; - "color": string; - "doubleStrikeThrough": boolean; - "highlightColor": string; - "italic": boolean; - "name": string; - "size": number; - "strikeThrough": boolean; - "subscript": boolean; - "superscript": boolean; - "underline": string; - }; + toJSON(): Word.Interfaces.FontData; } /** * @@ -16066,49 +27620,49 @@ declare namespace Word { * * [Api set: WordApi 1.2] */ - paragraph: Word.Paragraph; + readonly paragraph: Word.Paragraph; /** * * Gets the content control that contains the inline image. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the inline image. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets or sets a string that represents the alternative text associated with the inline image @@ -16152,12 +27706,7 @@ declare namespace Word { */ width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.InlinePictureUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: InlinePicture): void; /** @@ -16196,7 +27745,16 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. */ - getRange(rangeLocation?: string): Word.Range; + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the picture, or the starting or ending point of the picture, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. @@ -16206,7 +27764,17 @@ declare namespace Word { * @param breakType Required. The break type to add. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertBreak(breakType: string, insertLocation: string): void; + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; /** * * Wraps the inline picture with a rich text content control. @@ -16223,7 +27791,17 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts HTML at the specified location. The insertLocation value can be 'Before' or 'After'. @@ -16233,7 +27811,17 @@ declare namespace Word { * @param html Required. The HTML to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertHtml(html: string, insertLocation: string): Word.Range; + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts an inline picture at the specified location. The insertLocation value can be 'Replace', 'Before' or 'After'. @@ -16243,7 +27831,17 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Before' or 'After'. */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts an inline picture at the specified location. The insertLocation value can be 'Replace', 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Before' or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; /** * * Inserts OOXML at the specified location. The insertLocation value can be 'Before' or 'After'. @@ -16253,7 +27851,17 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertOoxml(ooxml: string, insertLocation: string): Word.Range; + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. @@ -16263,7 +27871,17 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; /** * * Inserts text at the specified location. The insertLocation value can be 'Before' or 'After'. @@ -16273,7 +27891,17 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertText(text: string, insertLocation: string): Word.Range; + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Selects the inline picture. This causes Word to scroll to the selection. @@ -16282,11 +27910,25 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. */ - select(selectionMode?: string): void; + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the inline picture. This causes Word to scroll to the selection. + * + * [Api set: WordApi 1.2] + * + * @param selectionMode Optional. The selection mode can 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePicture; + load(option?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; + load(option?: string | string[]): Word.InlinePicture; + load(option?: { + 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 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. */ @@ -16295,14 +27937,7 @@ declare namespace Word { * 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(): Word.InlinePicture; - toJSON(): { - "altTextDescription": string; - "altTextTitle": string; - "height": number; - "hyperlink": string; - "lockAspectRatio": boolean; - "width": number; - }; + toJSON(): Word.Interfaces.InlinePictureData; } /** * @@ -16312,7 +27947,7 @@ declare namespace Word { */ class InlinePictureCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.InlinePicture[]; /** * * Gets the first inline image in this collection. Throws if this collection is empty. @@ -16330,7 +27965,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePictureCollection; + load(option?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; + load(option?: string | string[]): Word.InlinePictureCollection; + load(option?: OfficeExtension.LoadOption): Word.InlinePictureCollection; /** * 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. */ @@ -16339,7 +27976,7 @@ declare namespace Word { * 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(): Word.InlinePictureCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.InlinePictureCollectionData; } /** * @@ -16354,28 +27991,28 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - paragraphs: Word.ParagraphCollection; + readonly paragraphs: Word.ParagraphCollection; /** * * Gets the list's id. * * [Api set: WordApi 1.3] */ - id: number; + 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. Read-only. * * [Api set: WordApi 1.3] */ - levelExistences: Array; + readonly levelExistences: boolean[]; /** * * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. * * [Api set: WordApi 1.3] */ - levelTypes: Array; + readonly levelTypes: Word.ListLevelType[]; /** * * Gets the paragraphs that occur at the specified level in the list. @@ -16403,7 +28040,17 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. */ - insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; /** * * Sets the alignment of the bullet, number or picture at the specified level in the list. @@ -16413,7 +28060,17 @@ declare namespace Word { * @param level Required. The level in the list. * @param alignment Required. The level alignment that can be 'left', 'centered' or 'right'. */ - setLevelAlignment(level: number, alignment: string): void; + setLevelAlignment(level: number, alignment: Word.Alignment): void; + /** + * + * Sets the alignment of the bullet, number or picture at the specified level in the list. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that can 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. @@ -16425,7 +28082,19 @@ declare namespace Word { * @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: string, charCode?: number, fontName?: string): void; + 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. + * + * [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. @@ -16434,7 +28103,7 @@ declare namespace Word { * * @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 textIndent Required. The relative indent, in points, of the bullet, number or picture. It is the same as paragraph first line 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; /** @@ -16447,7 +28116,18 @@ declare namespace Word { * @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: string, formatString?: Array): void; + setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: any[]): void; + /** + * + * Sets the numbering format at the specified level in the list. + * + * [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?: any[]): void; /** * * Sets the starting number at the specified level in the list. Default value is 1. @@ -16461,7 +28141,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.List; + load(option?: Word.Interfaces.ListLoadOptions): Word.List; + load(option?: string | string[]): Word.List; + load(option?: { + 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 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. */ @@ -16470,11 +28155,7 @@ declare namespace Word { * 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(): Word.List; - toJSON(): { - "id": number; - "levelExistences": boolean[]; - "levelTypes": string[]; - }; + toJSON(): Word.Interfaces.ListData; } /** * @@ -16484,7 +28165,7 @@ declare namespace Word { */ class ListCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.List[]; /** * * Gets a list by its identifier. Throws if there isn't a list with the identifier in this collection. @@ -16529,7 +28210,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListCollection; + load(option?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; + load(option?: string | string[]): Word.ListCollection; + load(option?: OfficeExtension.LoadOption): Word.ListCollection; /** * 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. */ @@ -16538,7 +28221,7 @@ declare namespace Word { * 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(): Word.ListCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.ListCollectionData; } /** * @@ -16560,21 +28243,16 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - listString: string; + readonly listString: string; /** * * Gets the list item order number in relation to its siblings. Read-only. * * [Api set: WordApi 1.3] */ - siblingIndex: number; + readonly siblingIndex: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ListItemUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: ListItem): void; /** @@ -16607,7 +28285,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListItem; + load(option?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; + load(option?: string | string[]): Word.ListItem; + load(option?: { + 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 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. */ @@ -16616,11 +28299,7 @@ declare namespace Word { * 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(): Word.ListItem; - toJSON(): { - "level": number; - "listString": string; - "siblingIndex": number; - }; + toJSON(): Word.Interfaces.ListItemData; } /** * @@ -16635,105 +28314,105 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.1] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the collection of inlinePicture objects in the paragraph. The collection does not include floating images. Read-only. * * [Api set: WordApi 1.1] */ - inlinePictures: Word.InlinePictureCollection; + readonly inlinePictures: Word.InlinePictureCollection; /** * * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. Read-only. * * [Api set: WordApi 1.3] */ - list: Word.List; + readonly list: Word.List; /** * * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. Read-only. * * [Api set: WordApi 1.3] */ - listItem: Word.ListItem; + readonly listItem: Word.ListItem; /** * * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. Read-only. * * [Api set: WordApi 1.3] */ - listItemOrNullObject: Word.ListItem; + readonly listItemOrNullObject: Word.ListItem; /** * * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. * * [Api set: WordApi 1.3] */ - listOrNullObject: Word.List; + readonly listOrNullObject: Word.List; /** * * Gets the parent body of the paragraph. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the paragraph. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * * [Api set: WordApi 1.1] */ - alignment: string; + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets or sets 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. @@ -16747,14 +28426,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - isLastParagraph: boolean; + readonly isLastParagraph: boolean; /** * * Checks whether the paragraph is a list item. Read-only. * * [Api set: WordApi 1.3] */ - isListItem: boolean; + readonly isListItem: boolean; /** * * Gets or sets the left indent value, in points, for the paragraph. @@ -16824,28 +28503,23 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn: string; + styleBuiltIn: Word.Style | "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 is not in a table. Read-only. * * [Api set: WordApi 1.3] */ - tableNestingLevel: number; + readonly tableNestingLevel: number; /** * * Gets the text of the paragraph. Read-only. * * [Api set: WordApi 1.1] */ - text: string; + readonly text: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.ParagraphUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Paragraph): void; /** @@ -16929,7 +28603,16 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. */ - getRange(rangeLocation?: string): Word.Range; + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; /** * * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. @@ -16939,7 +28622,7 @@ declare namespace Word { * @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: Array, trimSpacing?: boolean): Word.RangeCollection; + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. @@ -16949,7 +28632,17 @@ declare namespace Word { * @param breakType Required. The break type to add to the document. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertBreak(breakType: string, insertLocation: string): void; + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the document. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; /** * * Wraps the paragraph object with a rich text content control. @@ -16966,7 +28659,17 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts HTML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -16976,7 +28679,17 @@ declare namespace Word { * @param html Required. The HTML to be inserted in the paragraph. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertHtml(html: string, insertLocation: string): Word.Range; + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the paragraph. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a picture into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -16986,7 +28699,17 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts a picture into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; /** * * Inserts OOXML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -16996,7 +28719,17 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted in the paragraph. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertOoxml(ooxml: string, insertLocation: string): Word.Range; + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in the paragraph. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. @@ -17006,7 +28739,17 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; /** * * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. @@ -17018,7 +28761,19 @@ declare namespace Word { * @param insertLocation Required. The value can 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: string, values?: Array>): Word.Table; + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [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 can 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: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; /** * * Inserts text into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -17028,7 +28783,17 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. */ - insertText(text: string, insertLocation: string): Word.Range; + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): 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. @@ -17055,7 +28820,16 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. */ - select(selectionMode?: string): void; + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects and navigates the Word UI to the paragraph. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; /** * * Splits the paragraph into child ranges by using delimiters. @@ -17066,7 +28840,7 @@ declare namespace Word { * @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: Array, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + 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. @@ -17077,7 +28851,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Paragraph; + load(option?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; + load(option?: string | string[]): Word.Paragraph; + load(option?: { + 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 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. */ @@ -17086,27 +28865,7 @@ declare namespace Word { * 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(): Word.Paragraph; - toJSON(): { - "alignment": string; - "firstLineIndent": number; - "font": Font; - "isLastParagraph": boolean; - "isListItem": boolean; - "leftIndent": number; - "lineSpacing": number; - "lineUnitAfter": number; - "lineUnitBefore": number; - "listItem": ListItem; - "listItemOrNullObject": ListItem; - "outlineLevel": number; - "rightIndent": number; - "spaceAfter": number; - "spaceBefore": number; - "style": string; - "styleBuiltIn": string; - "tableNestingLevel": number; - "text": string; - }; + toJSON(): Word.Interfaces.ParagraphData; } /** * @@ -17116,7 +28875,7 @@ declare namespace Word { */ class ParagraphCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.Paragraph[]; /** * * Gets the first paragraph in this collection. Throws if the collection is empty. @@ -17148,7 +28907,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ParagraphCollection; + load(option?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; + load(option?: string | string[]): Word.ParagraphCollection; + load(option?: OfficeExtension.LoadOption): Word.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. */ @@ -17157,7 +28918,7 @@ declare namespace Word { * 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(): Word.ParagraphCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.ParagraphCollectionData; } /** * @@ -17172,91 +28933,91 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.1] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the collection of inline picture objects in the range. Read-only. * * [Api set: WordApi 1.2] */ - inlinePictures: Word.InlinePictureCollection; + readonly inlinePictures: Word.InlinePictureCollection; /** * * Gets the collection of list objects in the range. Read-only. * * [Api set: WordApi 1.3] */ - lists: Word.ListCollection; + readonly lists: Word.ListCollection; /** * * Gets the collection of paragraph objects in the range. Read-only. * * [Api set: WordApi 1.1] */ - paragraphs: Word.ParagraphCollection; + readonly paragraphs: Word.ParagraphCollection; /** * * Gets the parent body of the range. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the range. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the range. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the range. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the range. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets the collection of table objects in the range. Read-only. * * [Api set: WordApi 1.3] */ - tables: Word.TableCollection; + 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. @@ -17270,7 +29031,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - isEmpty: boolean; + readonly isEmpty: boolean; /** * * Gets or sets 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. @@ -17284,21 +29045,16 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn: string; + styleBuiltIn: Word.Style | "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. Read-only. * * [Api set: WordApi 1.1] */ - text: string; + readonly text: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.RangeUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Range): void; /** @@ -17316,7 +29072,7 @@ declare namespace Word { * * @param range Required. The range to compare with this range. */ - compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; + compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; /** * * Deletes the range and its content from the document. @@ -17365,7 +29121,7 @@ declare namespace Word { * @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: Array, trimSpacing?: boolean): Word.Range; + getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; /** * * Gets the next text range by using punctuation marks and/or other ending marks. Returns a null object if this text range is the last one. @@ -17375,7 +29131,7 @@ declare namespace Word { * @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: Array, trimSpacing?: boolean): Word.Range; + getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; /** * * Gets the OOXML representation of the range object. @@ -17391,7 +29147,16 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. */ - getRange(rangeLocation?: string): Word.Range; + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Clones the range, or gets the starting or ending point of the range as a new range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; /** * * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. @@ -17401,7 +29166,7 @@ declare namespace Word { * @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: Array, trimSpacing?: boolean): Word.RangeCollection; + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. @@ -17411,7 +29176,17 @@ declare namespace Word { * @param breakType Required. The break type to add. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertBreak(breakType: string, insertLocation: string): void; + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; /** * * Wraps the range object with a rich text content control. @@ -17428,7 +29203,17 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. */ - insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. @@ -17438,7 +29223,17 @@ declare namespace Word { * @param html Required. The HTML to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. */ - insertHtml(html: string, insertLocation: string): Word.Range; + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a picture at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. @@ -17448,7 +29243,17 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts a picture at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; /** * * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. @@ -17458,7 +29263,17 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. */ - insertOoxml(ooxml: string, insertLocation: string): Word.Range; + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. @@ -17468,7 +29283,17 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; /** * * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. @@ -17480,7 +29305,19 @@ declare namespace Word { * @param insertLocation Required. The value can 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: string, values?: Array>): Word.Table; + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [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 can 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: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; /** * * Inserts text at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. @@ -17490,7 +29327,17 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. */ - insertText(text: string, insertLocation: string): Word.Range; + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; /** * * Returns a new range as the intersection of this range with another range. This range is not changed. Throws if the two ranges are not overlapped or adjacent. @@ -17535,7 +29382,16 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. */ - select(selectionMode?: string): void; + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects and navigates the Word UI to the range. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; /** * * Splits the range into child ranges by using delimiters. @@ -17547,11 +29403,16 @@ declare namespace Word { * @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: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Range; + load(option?: Word.Interfaces.RangeLoadOptions): Word.Range; + load(option?: string | string[]): Word.Range; + load(option?: { + 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 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. */ @@ -17560,14 +29421,7 @@ declare namespace Word { * 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(): Word.Range; - toJSON(): { - "font": Font; - "hyperlink": string; - "isEmpty": boolean; - "style": string; - "styleBuiltIn": string; - "text": string; - }; + toJSON(): Word.Interfaces.RangeData; } /** * @@ -17577,7 +29431,7 @@ declare namespace Word { */ class RangeCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.Range[]; /** * * Gets the first range in this collection. Throws if this collection is empty. @@ -17595,7 +29449,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.RangeCollection; + load(option?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; + load(option?: string | string[]): Word.RangeCollection; + load(option?: OfficeExtension.LoadOption): Word.RangeCollection; /** * 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. */ @@ -17604,7 +29460,7 @@ declare namespace Word { * 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(): Word.RangeCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.RangeCollectionData; } /** * @@ -17664,31 +29520,23 @@ declare namespace Word { */ matchWildcards: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.SearchOptionsUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: SearchOptions): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.SearchOptions; + load(option?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; + load(option?: string | string[]): Word.SearchOptions; + load(option?: { + select?: string; + expand?: string; + }): Word.SearchOptions; /** * Create a new instance of Word.SearchOptions object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; - toJSON(): { - "ignorePunct": boolean; - "ignoreSpace": boolean; - "matchCase": boolean; - "matchPrefix": boolean; - "matchSuffix": boolean; - "matchWholeWord": boolean; - "matchWildcards": boolean; - }; + toJSON(): Word.Interfaces.SearchOptionsData; } /** * @@ -17703,14 +29551,9 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - body: Word.Body; + readonly body: Word.Body; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.SectionUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Section): void; /** @@ -17721,7 +29564,16 @@ declare namespace Word { * * @param type Required. The type of footer to return. This value can be: 'primary', 'firstPage' or 'evenPages'. */ - getFooter(type: string): Word.Body; + getFooter(type: Word.HeaderFooterType): Word.Body; + /** + * + * Gets one of the section's footers. + * + * [Api set: WordApi 1.1] + * + * @param type Required. The type of footer to return. This value can be: 'primary', 'firstPage' or 'evenPages'. + */ + getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; /** * * Gets one of the section's headers. @@ -17730,7 +29582,16 @@ declare namespace Word { * * @param type Required. The type of header to return. This value can be: 'primary', 'firstPage' or 'evenPages'. */ - getHeader(type: string): Word.Body; + getHeader(type: Word.HeaderFooterType): Word.Body; + /** + * + * Gets one of the section's headers. + * + * [Api set: WordApi 1.1] + * + * @param type Required. The type of header to return. This value can be: 'primary', 'firstPage' or 'evenPages'. + */ + getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; /** * * Gets the next section. Throws if this section is the last one. @@ -17748,7 +29609,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Section; + load(option?: Word.Interfaces.SectionLoadOptions): Word.Section; + load(option?: string | string[]): Word.Section; + load(option?: { + 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 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. */ @@ -17757,9 +29623,7 @@ declare namespace Word { * 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(): Word.Section; - toJSON(): { - "body": Body; - }; + toJSON(): Word.Interfaces.SectionData; } /** * @@ -17769,7 +29633,7 @@ declare namespace Word { */ class SectionCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.Section[]; /** * * Gets the first section in this collection. Throws if this collection is empty. @@ -17787,7 +29651,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.SectionCollection; + load(option?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; + load(option?: string | string[]): Word.SectionCollection; + load(option?: OfficeExtension.LoadOption): Word.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. */ @@ -17796,7 +29662,7 @@ declare namespace Word { * 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(): Word.SectionCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.SectionCollectionData; } /** * @@ -17811,77 +29677,77 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the parent body of the table. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the table. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains this table. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains this table. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets all of the table rows. Read-only. * * [Api set: WordApi 1.3] */ - rows: Word.TableRowCollection; + readonly rows: Word.TableRowCollection; /** * * Gets the child tables nested one level deeper. Read-only. * * [Api set: WordApi 1.3] */ - tables: Word.TableCollection; + readonly tables: Word.TableCollection; /** * * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. * * [Api set: WordApi 1.3] */ - alignment: string; + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets and sets the number of header rows. @@ -17895,28 +29761,28 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - horizontalAlignment: string; + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Indicates whether all of the table rows are uniform. Read-only. * * [Api set: WordApi 1.3] */ - isUniform: boolean; + readonly isUniform: boolean; /** * * Gets the nesting level of the table. Top-level tables have level 1. Read-only. * * [Api set: WordApi 1.3] */ - nestingLevel: number; + readonly nestingLevel: number; /** * * Gets the number of rows in the table. Read-only. * * [Api set: WordApi 1.3] */ - rowCount: number; + readonly rowCount: number; /** * * Gets and sets the shading color. @@ -17951,7 +29817,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn: string; + styleBuiltIn: Word.Style | "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 and sets whether the table has a first column with a special style. @@ -17979,14 +29845,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - values: Array>; + values: string[][]; /** * * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. * * [Api set: WordApi 1.3] */ - verticalAlignment: string; + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * * Gets and sets the width of the table in points. @@ -17995,12 +29861,7 @@ declare namespace Word { */ width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TableUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: Table): void; /** @@ -18013,7 +29874,18 @@ declare namespace Word { * @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: string, columnCount: number, values?: Array>): void; + addColumns(insertLocation: Word.InsertLocation, columnCount: number, values?: string[][]): 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. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can 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: "Before" | "After" | "Start" | "End" | "Replace", 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. @@ -18024,7 +29896,18 @@ declare namespace Word { * @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: string, rowCount: number, values?: Array>): Word.TableRowCollection; + addRows(insertLocation: Word.InsertLocation, rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * 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. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can 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: "Before" | "After" | "Start" | "End" | "Replace", rowCount: number, values?: string[][]): Word.TableRowCollection; /** * * Autofits the table columns to the width of the window. @@ -18081,7 +29964,16 @@ declare namespace Word { * * @param borderLocation Required. The border location. */ - getBorder(borderLocation: string): Word.TableBorder; + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * + * Gets the border style for the specified border. + * + * [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 if the specified table cell does not exist. @@ -18110,7 +30002,16 @@ declare namespace Word { * * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. */ - getCellPadding(cellPaddingLocation: string): OfficeExtension.ClientResult; + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; /** * * Gets the next table. Throws if this table is the last one. @@ -18161,7 +30062,16 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End' or 'After'. */ - getRange(rangeLocation?: string): Word.Range; + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the range that contains this table, or the range at the start or end of the table. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End' or 'After'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; /** * * Inserts a content control on the table. @@ -18178,7 +30088,17 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. */ - insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; /** * * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. @@ -18190,7 +30110,19 @@ declare namespace Word { * @param insertLocation Required. The value can 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: string, values?: Array>): Word.Table; + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [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 can 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: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; /** * * Performs a search with the specified searchOptions on the scope of the table object. The search results are a collection of range objects. @@ -18217,7 +30149,16 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. */ - select(selectionMode?: string): void; + 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. + * + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; /** * * Sets cell padding in points. @@ -18227,11 +30168,26 @@ declare namespace Word { * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. * @param cellPadding Required. The cell padding. */ - setCellPadding(cellPaddingLocation: string, cellPadding: number): void; + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Table; + load(option?: Word.Interfaces.TableLoadOptions): Word.Table; + load(option?: string | string[]): Word.Table; + load(option?: { + 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 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. */ @@ -18240,26 +30196,7 @@ declare namespace Word { * 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(): Word.Table; - toJSON(): { - "alignment": string; - "font": Font; - "headerRowCount": number; - "horizontalAlignment": string; - "isUniform": boolean; - "nestingLevel": number; - "rowCount": number; - "shadingColor": string; - "style": string; - "styleBandedColumns": boolean; - "styleBandedRows": boolean; - "styleBuiltIn": string; - "styleFirstColumn": boolean; - "styleLastColumn": boolean; - "styleTotalRow": boolean; - "values": string[][]; - "verticalAlignment": string; - "width": number; - }; + toJSON(): Word.Interfaces.TableData; } /** * @@ -18269,7 +30206,7 @@ declare namespace Word { */ class TableCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.Table[]; /** * * Gets the first table in this collection. Throws if this collection is empty. @@ -18287,7 +30224,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCollection; + load(option?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; + load(option?: string | string[]): Word.TableCollection; + load(option?: OfficeExtension.LoadOption): Word.TableCollection; /** * 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. */ @@ -18296,7 +30235,7 @@ declare namespace Word { * 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(): Word.TableCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.TableCollectionData; } /** * @@ -18311,42 +30250,42 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - cells: Word.TableCellCollection; + readonly cells: Word.TableCellCollection; /** * * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.3] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets parent table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the number of cells in the row. Read-only. * * [Api set: WordApi 1.3] */ - cellCount: number; + readonly cellCount: number; /** * * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. * * [Api set: WordApi 1.3] */ - horizontalAlignment: string; + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. * * [Api set: WordApi 1.3] */ - isHeader: boolean; + readonly isHeader: boolean; /** * * Gets and sets the preferred height of the row in points. @@ -18360,7 +30299,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - rowIndex: number; + readonly rowIndex: number; /** * * Gets and sets the shading color. @@ -18374,21 +30313,16 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - values: Array>; + values: string[][]; /** * * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. * * [Api set: WordApi 1.3] */ - verticalAlignment: string; + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TableRowUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: TableRow): void; /** @@ -18413,7 +30347,16 @@ declare namespace Word { * * @param borderLocation Required. The border location. */ - getBorder(borderLocation: string): Word.TableBorder; + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * + * Gets the border style of the cells in the row. + * + * [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. @@ -18422,7 +30365,16 @@ declare namespace Word { * * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. */ - getCellPadding(cellPaddingLocation: string): OfficeExtension.ClientResult; + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; /** * * Gets the next row. Throws if this row is the last one. @@ -18447,7 +30399,18 @@ declare namespace Word { * @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: string, rowCount: number, values?: Array>): Word.TableRowCollection; + insertRows(insertLocation: Word.InsertLocation, rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. Where the new rows should be inserted, relative to the current row. It can 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: "Before" | "After" | "Start" | "End" | "Replace", rowCount: number, values?: string[][]): Word.TableRowCollection; /** * * Performs a search with the specified searchOptions on the scope of the row. The search results are a collection of range objects. @@ -18474,7 +30437,16 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. */ - select(selectionMode?: string): void; + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the row and navigates the Word UI to it. + * + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; /** * * Sets cell padding in points. @@ -18484,11 +30456,26 @@ declare namespace Word { * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. * @param cellPadding Required. The cell padding. */ - setCellPadding(cellPaddingLocation: string, cellPadding: number): void; + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRow; + load(option?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; + load(option?: string | string[]): Word.TableRow; + load(option?: { + 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 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. */ @@ -18497,17 +30484,7 @@ declare namespace Word { * 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(): Word.TableRow; - toJSON(): { - "cellCount": number; - "font": Font; - "horizontalAlignment": string; - "isHeader": boolean; - "preferredHeight": number; - "rowIndex": number; - "shadingColor": string; - "values": string[][]; - "verticalAlignment": string; - }; + toJSON(): Word.Interfaces.TableRowData; } /** * @@ -18517,7 +30494,7 @@ declare namespace Word { */ class TableRowCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.TableRow[]; /** * * Gets the first row in this collection. Throws if this collection is empty. @@ -18535,7 +30512,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRowCollection; + load(option?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; + load(option?: string | string[]): Word.TableRowCollection; + load(option?: OfficeExtension.LoadOption): Word.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. */ @@ -18544,7 +30523,7 @@ declare namespace Word { * 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(): Word.TableRowCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.TableRowCollectionData; } /** * @@ -18559,28 +30538,28 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - body: Word.Body; + readonly body: Word.Body; /** * * Gets the parent row of the cell. Read-only. * * [Api set: WordApi 1.3] */ - parentRow: Word.TableRow; + readonly parentRow: Word.TableRow; /** * * Gets the parent table of the cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the index of the cell in its row. Read-only. * * [Api set: WordApi 1.3] */ - cellIndex: number; + readonly cellIndex: number; /** * * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. @@ -18594,14 +30573,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - horizontalAlignment: string; + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets the index of the cell's row in the table. Read-only. * * [Api set: WordApi 1.3] */ - rowIndex: number; + readonly rowIndex: number; /** * * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. @@ -18622,21 +30601,16 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - verticalAlignment: string; + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * * Gets the width of the cell in points. Read-only. * * [Api set: WordApi 1.3] */ - width: number; + readonly width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TableCellUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: TableCell): void; /** @@ -18661,7 +30635,16 @@ declare namespace Word { * * @param borderLocation Required. The border location. */ - getBorder(borderLocation: string): Word.TableBorder; + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * + * Gets the border style for the specified border. + * + * [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. @@ -18670,7 +30653,16 @@ declare namespace Word { * * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. */ - getCellPadding(cellPaddingLocation: string): OfficeExtension.ClientResult; + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; /** * * Gets the next cell. Throws if this cell is the last one. @@ -18695,7 +30687,18 @@ declare namespace Word { * @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: string, columnCount: number, values?: Array>): void; + insertColumns(insertLocation: Word.InsertLocation, columnCount: number, values?: string[][]): void; + /** + * + * 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. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can 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: "Before" | "After" | "Start" | "End" | "Replace", 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. @@ -18706,7 +30709,18 @@ declare namespace Word { * @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: string, rowCount: number, values?: Array>): Word.TableRowCollection; + insertRows(insertLocation: Word.InsertLocation, rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * 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. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can 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: "Before" | "After" | "Start" | "End" | "Replace", rowCount: number, values?: string[][]): Word.TableRowCollection; /** * * Sets cell padding in points. @@ -18716,11 +30730,26 @@ declare namespace Word { * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. * @param cellPadding Required. The cell padding. */ - setCellPadding(cellPaddingLocation: string, cellPadding: number): void; + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCell; + load(option?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; + load(option?: string | string[]): Word.TableCell; + load(option?: { + 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 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. */ @@ -18729,17 +30758,7 @@ declare namespace Word { * 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(): Word.TableCell; - toJSON(): { - "body": Body; - "cellIndex": number; - "columnWidth": number; - "horizontalAlignment": string; - "rowIndex": number; - "shadingColor": string; - "value": string; - "verticalAlignment": string; - "width": number; - }; + toJSON(): Word.Interfaces.TableCellData; } /** * @@ -18749,7 +30768,7 @@ declare namespace Word { */ class TableCellCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Word.TableCell[]; /** * * Gets the first table cell in this collection. Throws if this collection is empty. @@ -18767,7 +30786,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCellCollection; + load(option?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; + load(option?: string | string[]): Word.TableCellCollection; + load(option?: OfficeExtension.LoadOption): Word.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. */ @@ -18776,7 +30797,7 @@ declare namespace Word { * 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(): Word.TableCellCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.TableCellCollectionData; } /** * @@ -18798,7 +30819,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - type: string; + 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"; /** * * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. @@ -18807,18 +30828,18 @@ declare namespace Word { */ width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.TableBorderUpdateData, options?: { - /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + 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: TableBorder): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableBorder; + load(option?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; + load(option?: string | string[]): Word.TableBorder; + load(option?: { + 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 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. */ @@ -18827,11 +30848,7 @@ declare namespace Word { * 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(): Word.TableBorder; - toJSON(): { - "color": string; - "type": string; - "width": number; - }; + toJSON(): Word.Interfaces.TableBorderData; } /** * @@ -18839,24 +30856,24 @@ declare namespace Word { * * [Api set: WordApi] */ - namespace ContentControlType { - var unknown: string; - var richTextInline: string; - var richTextParagraphs: string; - var richTextTableCell: string; - var richTextTableRow: string; - var richTextTable: string; - var plainTextInline: string; - var plainTextParagraph: string; - var picture: string; - var buildingBlockGallery: string; - var checkBox: string; - var comboBox: string; - var dropDownList: string; - var datePicker: string; - var repeatingSection: string; - var richText: string; - var plainText: string; + enum ContentControlType { + unknown = "Unknown", + richTextInline = "RichTextInline", + richTextParagraphs = "RichTextParagraphs", + richTextTableCell = "RichTextTableCell", + richTextTableRow = "RichTextTableRow", + richTextTable = "RichTextTable", + plainTextInline = "PlainTextInline", + plainTextParagraph = "PlainTextParagraph", + picture = "Picture", + buildingBlockGallery = "BuildingBlockGallery", + checkBox = "CheckBox", + comboBox = "ComboBox", + dropDownList = "DropDownList", + datePicker = "DatePicker", + repeatingSection = "RepeatingSection", + richText = "RichText", + plainText = "PlainText", } /** * @@ -18864,10 +30881,10 @@ declare namespace Word { * * [Api set: WordApi] */ - namespace ContentControlAppearance { - var boundingBox: string; - var tags: string; - var hidden: string; + enum ContentControlAppearance { + boundingBox = "BoundingBox", + tags = "Tags", + hidden = "Hidden", } /** * @@ -18875,36 +30892,36 @@ declare namespace Word { * * [Api set: WordApi] */ - namespace UnderlineType { - var mixed: string; - var none: string; + enum UnderlineType { + mixed = "Mixed", + none = "None", /** * * @deprecated Hidden is no longer supported. */ - var hidden: string; + hidden = "Hidden", /** * * @deprecated DotLine is no longer supported. */ - var dotLine: string; - var single: string; - var word: string; - var double: string; - var thick: string; - var dotted: string; - var dottedHeavy: string; - var dashLine: string; - var dashLineHeavy: string; - var dashLineLong: string; - var dashLineLongHeavy: string; - var dotDashLine: string; - var dotDashLineHeavy: string; - var twoDotDashLine: string; - var twoDotDashLineHeavy: string; - var wave: string; - var waveHeavy: string; - var waveDouble: string; + dotLine = "DotLine", + single = "Single", + word = "Word", + double = "Double", + thick = "Thick", + dotted = "Dotted", + dottedHeavy = "DottedHeavy", + dashLine = "DashLine", + dashLineHeavy = "DashLineHeavy", + dashLineLong = "DashLineLong", + dashLineLongHeavy = "DashLineLongHeavy", + dotDashLine = "DotDashLine", + dotDashLineHeavy = "DotDashLineHeavy", + twoDotDashLine = "TwoDotDashLine", + twoDotDashLineHeavy = "TwoDotDashLineHeavy", + wave = "Wave", + waveHeavy = "WaveHeavy", + waveDouble = "WaveDouble", } /** * @@ -18912,48 +30929,48 @@ declare namespace Word { * * [Api set: WordApi] */ - namespace BreakType { + enum BreakType { /** * * Page break. * */ - var page: string; + page = "Page", /** * * @deprecated Use sectionNext instead. */ - var next: string; + next = "Next", /** * * Section break, with the new section starting on the next page. * */ - var sectionNext: string; + sectionNext = "SectionNext", /** * * Section break, with the new section starting on the same page. * */ - var sectionContinuous: string; + sectionContinuous = "SectionContinuous", /** * * Section break, with the new section starting on the next even-numbered page. * */ - var sectionEven: string; + sectionEven = "SectionEven", /** * * Section break, with the new section starting on the next odd-numbered page. * */ - var sectionOdd: string; + sectionOdd = "SectionOdd", /** * * Line break. * */ - var line: string; + line = "Line", } /** * @@ -18961,422 +30978,446 @@ declare namespace Word { * * [Api set: WordApi] */ - namespace InsertLocation { - var before: string; - var after: string; - var start: string; - var end: string; - var replace: string; + enum InsertLocation { + before = "Before", + after = "After", + start = "Start", + end = "End", + replace = "Replace", } /** * [Api set: WordApi] */ - namespace Alignment { - var mixed: string; - var unknown: string; - var left: string; - var centered: string; - var right: string; - var justified: string; + enum Alignment { + mixed = "Mixed", + unknown = "Unknown", + left = "Left", + centered = "Centered", + right = "Right", + justified = "Justified", } /** * [Api set: WordApi] */ - namespace HeaderFooterType { - var primary: string; - var firstPage: string; - var evenPages: string; + enum HeaderFooterType { + primary = "Primary", + firstPage = "FirstPage", + evenPages = "EvenPages", } /** * [Api set: WordApi] */ - namespace BodyType { - var unknown: string; - var mainDoc: string; - var section: string; - var header: string; - var footer: string; - var tableCell: string; + enum BodyType { + unknown = "Unknown", + mainDoc = "MainDoc", + section = "Section", + header = "Header", + footer = "Footer", + tableCell = "TableCell", } /** * [Api set: WordApi] */ - namespace SelectionMode { - var select: string; - var start: string; - var end: string; + enum SelectionMode { + select = "Select", + start = "Start", + end = "End", } /** * [Api set: WordApi] */ - namespace ImageFormat { - var unsupported: string; - var undefined: string; - var bmp: string; - var jpeg: string; - var gif: string; - var tiff: string; - var png: string; - var icon: string; - var exif: string; - var wmf: string; - var emf: string; - var pict: string; - var pdf: string; - var svg: string; + enum ImageFormat { + unsupported = "Unsupported", + undefined = "Undefined", + bmp = "Bmp", + jpeg = "Jpeg", + gif = "Gif", + tiff = "Tiff", + png = "Png", + icon = "Icon", + exif = "Exif", + wmf = "Wmf", + emf = "Emf", + pict = "Pict", + pdf = "Pdf", + svg = "Svg", } /** * [Api set: WordApi] */ - namespace RangeLocation { - var whole: string; - var start: string; - var end: string; - var before: string; - var after: string; - var content: string; + enum RangeLocation { + whole = "Whole", + start = "Start", + end = "End", + before = "Before", + after = "After", + content = "Content", } /** * [Api set: WordApi] */ - namespace LocationRelation { - var unrelated: string; - var equal: string; - var containsStart: string; - var containsEnd: string; - var contains: string; - var insideStart: string; - var insideEnd: string; - var inside: string; - var adjacentBefore: string; - var overlapsBefore: string; - var before: string; - var adjacentAfter: string; - var overlapsAfter: string; - var after: string; + enum LocationRelation { + unrelated = "Unrelated", + equal = "Equal", + containsStart = "ContainsStart", + containsEnd = "ContainsEnd", + contains = "Contains", + insideStart = "InsideStart", + insideEnd = "InsideEnd", + inside = "Inside", + adjacentBefore = "AdjacentBefore", + overlapsBefore = "OverlapsBefore", + before = "Before", + adjacentAfter = "AdjacentAfter", + overlapsAfter = "OverlapsAfter", + after = "After", } /** * [Api set: WordApi] */ - namespace BorderLocation { - var top: string; - var left: string; - var bottom: string; - var right: string; - var insideHorizontal: string; - var insideVertical: string; - var inside: string; - var outside: string; - var all: string; + enum BorderLocation { + top = "Top", + left = "Left", + bottom = "Bottom", + right = "Right", + insideHorizontal = "InsideHorizontal", + insideVertical = "InsideVertical", + inside = "Inside", + outside = "Outside", + all = "All", } /** * [Api set: WordApi] */ - namespace CellPaddingLocation { - var top: string; - var left: string; - var bottom: string; - var right: string; + enum CellPaddingLocation { + top = "Top", + left = "Left", + bottom = "Bottom", + right = "Right", } /** * [Api set: WordApi] */ - namespace BorderType { - var mixed: string; - var none: string; - var single: string; - var double: string; - var dotted: string; - var dashed: string; - var dotDashed: string; - var dot2Dashed: string; - var triple: string; - var thinThickSmall: string; - var thickThinSmall: string; - var thinThickThinSmall: string; - var thinThickMed: string; - var thickThinMed: string; - var thinThickThinMed: string; - var thinThickLarge: string; - var thickThinLarge: string; - var thinThickThinLarge: string; - var wave: string; - var doubleWave: string; - var dashedSmall: string; - var dashDotStroked: string; - var threeDEmboss: string; - var threeDEngrave: string; + enum BorderType { + mixed = "Mixed", + none = "None", + single = "Single", + double = "Double", + dotted = "Dotted", + dashed = "Dashed", + dotDashed = "DotDashed", + dot2Dashed = "Dot2Dashed", + triple = "Triple", + thinThickSmall = "ThinThickSmall", + thickThinSmall = "ThickThinSmall", + thinThickThinSmall = "ThinThickThinSmall", + thinThickMed = "ThinThickMed", + thickThinMed = "ThickThinMed", + thinThickThinMed = "ThinThickThinMed", + thinThickLarge = "ThinThickLarge", + thickThinLarge = "ThickThinLarge", + thinThickThinLarge = "ThinThickThinLarge", + wave = "Wave", + doubleWave = "DoubleWave", + dashedSmall = "DashedSmall", + dashDotStroked = "DashDotStroked", + threeDEmboss = "ThreeDEmboss", + threeDEngrave = "ThreeDEngrave", } /** * [Api set: WordApi] */ - namespace VerticalAlignment { - var mixed: string; - var top: string; - var center: string; - var bottom: string; + enum VerticalAlignment { + mixed = "Mixed", + top = "Top", + center = "Center", + bottom = "Bottom", } /** * [Api set: WordApi] */ - namespace ListLevelType { - var bullet: string; - var number: string; - var picture: string; + enum ListLevelType { + bullet = "Bullet", + number = "Number", + picture = "Picture", } /** * [Api set: WordApi] */ - namespace ListBullet { - var custom: string; - var solid: string; - var hollow: string; - var square: string; - var diamonds: string; - var arrow: string; - var checkmark: string; + enum ListBullet { + custom = "Custom", + solid = "Solid", + hollow = "Hollow", + square = "Square", + diamonds = "Diamonds", + arrow = "Arrow", + checkmark = "Checkmark", } /** * [Api set: WordApi] */ - namespace ListNumbering { - var none: string; - var arabic: string; - var upperRoman: string; - var lowerRoman: string; - var upperLetter: string; - var lowerLetter: string; + enum ListNumbering { + none = "None", + arabic = "Arabic", + upperRoman = "UpperRoman", + lowerRoman = "LowerRoman", + upperLetter = "UpperLetter", + lowerLetter = "LowerLetter", } /** * [Api set: WordApi] */ - namespace Style { + enum Style { /** * * Mixed styles or other style not in this list. * */ - var other: string; + other = "Other", /** * * Reset character and paragraph style to default. * */ - var normal: string; - var heading1: string; - var heading2: string; - var heading3: string; - var heading4: string; - var heading5: string; - var heading6: string; - var heading7: string; - var heading8: string; - var heading9: string; + normal = "Normal", + heading1 = "Heading1", + heading2 = "Heading2", + heading3 = "Heading3", + heading4 = "Heading4", + heading5 = "Heading5", + heading6 = "Heading6", + heading7 = "Heading7", + heading8 = "Heading8", + heading9 = "Heading9", /** * * Table-of-content level 1. * */ - var toc1: string; + toc1 = "Toc1", /** * * Table-of-content level 2. * */ - var toc2: string; + toc2 = "Toc2", /** * * Table-of-content level 3. * */ - var toc3: string; + toc3 = "Toc3", /** * * Table-of-content level 4. * */ - var toc4: string; + toc4 = "Toc4", /** * * Table-of-content level 5. * */ - var toc5: string; + toc5 = "Toc5", /** * * Table-of-content level 6. * */ - var toc6: string; + toc6 = "Toc6", /** * * Table-of-content level 7. * */ - var toc7: string; + toc7 = "Toc7", /** * * Table-of-content level 8. * */ - var toc8: string; + toc8 = "Toc8", /** * * Table-of-content level 9. * */ - var toc9: string; - var footnoteText: string; - var header: string; - var footer: string; - var caption: string; - var footnoteReference: string; - var endnoteReference: string; - var endnoteText: string; - var title: string; - var subtitle: string; - var hyperlink: string; - var strong: string; - var emphasis: string; - var noSpacing: string; - var listParagraph: string; - var quote: string; - var intenseQuote: string; - var subtleEmphasis: string; - var intenseEmphasis: string; - var subtleReference: string; - var intenseReference: string; - var bookTitle: string; - var bibliography: string; + toc9 = "Toc9", + footnoteText = "FootnoteText", + header = "Header", + footer = "Footer", + caption = "Caption", + footnoteReference = "FootnoteReference", + endnoteReference = "EndnoteReference", + endnoteText = "EndnoteText", + title = "Title", + subtitle = "Subtitle", + hyperlink = "Hyperlink", + strong = "Strong", + emphasis = "Emphasis", + noSpacing = "NoSpacing", + listParagraph = "ListParagraph", + quote = "Quote", + intenseQuote = "IntenseQuote", + subtleEmphasis = "SubtleEmphasis", + intenseEmphasis = "IntenseEmphasis", + subtleReference = "SubtleReference", + intenseReference = "IntenseReference", + bookTitle = "BookTitle", + bibliography = "Bibliography", /** * * Table-of-content heading. * */ - var tocHeading: string; - var tableGrid: string; - var plainTable1: string; - var plainTable2: string; - var plainTable3: string; - var plainTable4: string; - var plainTable5: string; - var tableGridLight: string; - var gridTable1Light: string; - var gridTable1Light_Accent1: string; - var gridTable1Light_Accent2: string; - var gridTable1Light_Accent3: string; - var gridTable1Light_Accent4: string; - var gridTable1Light_Accent5: string; - var gridTable1Light_Accent6: string; - var gridTable2: string; - var gridTable2_Accent1: string; - var gridTable2_Accent2: string; - var gridTable2_Accent3: string; - var gridTable2_Accent4: string; - var gridTable2_Accent5: string; - var gridTable2_Accent6: string; - var gridTable3: string; - var gridTable3_Accent1: string; - var gridTable3_Accent2: string; - var gridTable3_Accent3: string; - var gridTable3_Accent4: string; - var gridTable3_Accent5: string; - var gridTable3_Accent6: string; - var gridTable4: string; - var gridTable4_Accent1: string; - var gridTable4_Accent2: string; - var gridTable4_Accent3: string; - var gridTable4_Accent4: string; - var gridTable4_Accent5: string; - var gridTable4_Accent6: string; - var gridTable5Dark: string; - var gridTable5Dark_Accent1: string; - var gridTable5Dark_Accent2: string; - var gridTable5Dark_Accent3: string; - var gridTable5Dark_Accent4: string; - var gridTable5Dark_Accent5: string; - var gridTable5Dark_Accent6: string; - var gridTable6Colorful: string; - var gridTable6Colorful_Accent1: string; - var gridTable6Colorful_Accent2: string; - var gridTable6Colorful_Accent3: string; - var gridTable6Colorful_Accent4: string; - var gridTable6Colorful_Accent5: string; - var gridTable6Colorful_Accent6: string; - var gridTable7Colorful: string; - var gridTable7Colorful_Accent1: string; - var gridTable7Colorful_Accent2: string; - var gridTable7Colorful_Accent3: string; - var gridTable7Colorful_Accent4: string; - var gridTable7Colorful_Accent5: string; - var gridTable7Colorful_Accent6: string; - var listTable1Light: string; - var listTable1Light_Accent1: string; - var listTable1Light_Accent2: string; - var listTable1Light_Accent3: string; - var listTable1Light_Accent4: string; - var listTable1Light_Accent5: string; - var listTable1Light_Accent6: string; - var listTable2: string; - var listTable2_Accent1: string; - var listTable2_Accent2: string; - var listTable2_Accent3: string; - var listTable2_Accent4: string; - var listTable2_Accent5: string; - var listTable2_Accent6: string; - var listTable3: string; - var listTable3_Accent1: string; - var listTable3_Accent2: string; - var listTable3_Accent3: string; - var listTable3_Accent4: string; - var listTable3_Accent5: string; - var listTable3_Accent6: string; - var listTable4: string; - var listTable4_Accent1: string; - var listTable4_Accent2: string; - var listTable4_Accent3: string; - var listTable4_Accent4: string; - var listTable4_Accent5: string; - var listTable4_Accent6: string; - var listTable5Dark: string; - var listTable5Dark_Accent1: string; - var listTable5Dark_Accent2: string; - var listTable5Dark_Accent3: string; - var listTable5Dark_Accent4: string; - var listTable5Dark_Accent5: string; - var listTable5Dark_Accent6: string; - var listTable6Colorful: string; - var listTable6Colorful_Accent1: string; - var listTable6Colorful_Accent2: string; - var listTable6Colorful_Accent3: string; - var listTable6Colorful_Accent4: string; - var listTable6Colorful_Accent5: string; - var listTable6Colorful_Accent6: string; - var listTable7Colorful: string; - var listTable7Colorful_Accent1: string; - var listTable7Colorful_Accent2: string; - var listTable7Colorful_Accent3: string; - var listTable7Colorful_Accent4: string; - var listTable7Colorful_Accent5: string; - var listTable7Colorful_Accent6: string; + tocHeading = "TocHeading", + tableGrid = "TableGrid", + plainTable1 = "PlainTable1", + plainTable2 = "PlainTable2", + plainTable3 = "PlainTable3", + plainTable4 = "PlainTable4", + plainTable5 = "PlainTable5", + tableGridLight = "TableGridLight", + gridTable1Light = "GridTable1Light", + gridTable1Light_Accent1 = "GridTable1Light_Accent1", + gridTable1Light_Accent2 = "GridTable1Light_Accent2", + gridTable1Light_Accent3 = "GridTable1Light_Accent3", + gridTable1Light_Accent4 = "GridTable1Light_Accent4", + gridTable1Light_Accent5 = "GridTable1Light_Accent5", + gridTable1Light_Accent6 = "GridTable1Light_Accent6", + gridTable2 = "GridTable2", + gridTable2_Accent1 = "GridTable2_Accent1", + gridTable2_Accent2 = "GridTable2_Accent2", + gridTable2_Accent3 = "GridTable2_Accent3", + gridTable2_Accent4 = "GridTable2_Accent4", + gridTable2_Accent5 = "GridTable2_Accent5", + gridTable2_Accent6 = "GridTable2_Accent6", + gridTable3 = "GridTable3", + gridTable3_Accent1 = "GridTable3_Accent1", + gridTable3_Accent2 = "GridTable3_Accent2", + gridTable3_Accent3 = "GridTable3_Accent3", + gridTable3_Accent4 = "GridTable3_Accent4", + gridTable3_Accent5 = "GridTable3_Accent5", + gridTable3_Accent6 = "GridTable3_Accent6", + gridTable4 = "GridTable4", + gridTable4_Accent1 = "GridTable4_Accent1", + gridTable4_Accent2 = "GridTable4_Accent2", + gridTable4_Accent3 = "GridTable4_Accent3", + gridTable4_Accent4 = "GridTable4_Accent4", + gridTable4_Accent5 = "GridTable4_Accent5", + gridTable4_Accent6 = "GridTable4_Accent6", + gridTable5Dark = "GridTable5Dark", + gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", + gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", + gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", + gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", + gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", + gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", + gridTable6Colorful = "GridTable6Colorful", + gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", + gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", + gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", + gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", + gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", + gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", + gridTable7Colorful = "GridTable7Colorful", + gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", + gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", + gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", + gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", + gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", + gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", + listTable1Light = "ListTable1Light", + listTable1Light_Accent1 = "ListTable1Light_Accent1", + listTable1Light_Accent2 = "ListTable1Light_Accent2", + listTable1Light_Accent3 = "ListTable1Light_Accent3", + listTable1Light_Accent4 = "ListTable1Light_Accent4", + listTable1Light_Accent5 = "ListTable1Light_Accent5", + listTable1Light_Accent6 = "ListTable1Light_Accent6", + listTable2 = "ListTable2", + listTable2_Accent1 = "ListTable2_Accent1", + listTable2_Accent2 = "ListTable2_Accent2", + listTable2_Accent3 = "ListTable2_Accent3", + listTable2_Accent4 = "ListTable2_Accent4", + listTable2_Accent5 = "ListTable2_Accent5", + listTable2_Accent6 = "ListTable2_Accent6", + listTable3 = "ListTable3", + listTable3_Accent1 = "ListTable3_Accent1", + listTable3_Accent2 = "ListTable3_Accent2", + listTable3_Accent3 = "ListTable3_Accent3", + listTable3_Accent4 = "ListTable3_Accent4", + listTable3_Accent5 = "ListTable3_Accent5", + listTable3_Accent6 = "ListTable3_Accent6", + listTable4 = "ListTable4", + listTable4_Accent1 = "ListTable4_Accent1", + listTable4_Accent2 = "ListTable4_Accent2", + listTable4_Accent3 = "ListTable4_Accent3", + listTable4_Accent4 = "ListTable4_Accent4", + listTable4_Accent5 = "ListTable4_Accent5", + listTable4_Accent6 = "ListTable4_Accent6", + listTable5Dark = "ListTable5Dark", + listTable5Dark_Accent1 = "ListTable5Dark_Accent1", + listTable5Dark_Accent2 = "ListTable5Dark_Accent2", + listTable5Dark_Accent3 = "ListTable5Dark_Accent3", + listTable5Dark_Accent4 = "ListTable5Dark_Accent4", + listTable5Dark_Accent5 = "ListTable5Dark_Accent5", + listTable5Dark_Accent6 = "ListTable5Dark_Accent6", + listTable6Colorful = "ListTable6Colorful", + listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", + listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", + listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", + listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", + listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", + listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", + listTable7Colorful = "ListTable7Colorful", + listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", + listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", + listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", + listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", + listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", + listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", } /** * [Api set: WordApi] */ - namespace DocumentPropertyType { - var string: string; - var number: string; - var date: string; - var boolean: string; + enum DocumentPropertyType { + string = "String", + number = "Number", + date = "Date", + boolean = "Boolean", } - namespace ErrorCodes { - var accessDenied: string; - var generalException: string; - var invalidArgument: string; - var itemNotFound: string; - var notImplemented: string; + /** + * [Api set: WordApi] + */ + enum TapObjectType { + chart = "Chart", + smartArt = "SmartArt", + table = "Table", + image = "Image", + slide = "Slide", + ole = "OLE", + text = "Text", } - module Interfaces { + /** + * [Api set: WordApi] + */ + enum FileContentFormat { + base64 = "Base64", + html = "Html", + ooxml = "Ooxml", + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + } + namespace Interfaces { + interface CollectionLoadOptions { + $top?: number; + $skip?: number; + } /** An interface for updating data on the Body object, for use in "body.set({ ... })". */ interface BodyUpdateData { /** @@ -19399,7 +31440,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + styleBuiltIn?: Word.Style | "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 ContentControl object, for use in "contentControl.set({ ... })". */ interface ContentControlUpdateData { @@ -19416,7 +31457,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - appearance?: string; + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; /** * * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. @@ -19465,7 +31506,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + styleBuiltIn?: Word.Style | "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 or sets a tag to identify a content control. @@ -19481,16 +31522,24 @@ declare namespace Word { */ 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 { /** * - * Gets or sets the value of the custom property. + * Gets or sets the value of the custom property. Note that even though Word Online 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). * * [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 Document object, for use in "document.set({ ... })". */ interface DocumentUpdateData { /** @@ -19502,11 +31551,35 @@ declare namespace Word { body?: Word.Interfaces.BodyUpdateData; /** * - * Gets the properties of the current document. + * Gets the properties of the document. * * [Api set: WordApi 1.3] */ properties?: Word.Interfaces.DocumentPropertiesUpdateData; + /** + * + * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. + * + * [Api set: WordApi] + */ + allowCloseOnUntitled?: boolean; + } + /** 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.. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * + * Gets the properties of the document. + * + * [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 { @@ -19652,7 +31725,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - underline?: string; + 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 { @@ -19699,6 +31772,14 @@ declare namespace Word { */ 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 { /** @@ -19738,7 +31819,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - alignment?: string; + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets or sets 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. @@ -19815,7 +31896,11 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + styleBuiltIn?: Word.Style | "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 Range object, for use in "range.set({ ... })". */ interface RangeUpdateData { @@ -19846,7 +31931,11 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + styleBuiltIn?: Word.Style | "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 { @@ -19910,6 +31999,10 @@ declare namespace Word { */ 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 Table object, for use in "table.set({ ... })". */ interface TableUpdateData { /** @@ -19925,7 +32018,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - alignment?: string; + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets and sets the number of header rows. @@ -19939,7 +32032,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - horizontalAlignment?: string; + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets and sets the shading color. @@ -19974,7 +32067,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + styleBuiltIn?: Word.Style | "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 and sets whether the table has a first column with a special style. @@ -20002,14 +32095,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - values?: Array>; + values?: string[][]; /** * * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. * * [Api set: WordApi 1.3] */ - verticalAlignment?: string; + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; /** * * Gets and sets the width of the table in points. @@ -20018,6 +32111,10 @@ declare namespace Word { */ width?: 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 { /** @@ -20033,7 +32130,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - horizontalAlignment?: string; + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets and sets the preferred height of the row in points. @@ -20054,14 +32151,18 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - values?: Array>; + values?: string[][]; /** * * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. * * [Api set: WordApi 1.3] */ - verticalAlignment?: string; + 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 { @@ -20085,7 +32186,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - horizontalAlignment?: string; + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** * * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. @@ -20106,7 +32207,11 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - verticalAlignment?: string; + 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 { @@ -20123,7 +32228,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - type?: string; + 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"; /** * * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. @@ -20132,33 +32237,4097 @@ declare namespace Word { */ width?: number; } + /** An interface describing the data returned by calling "body.toJSON()". */ + interface BodyData { + /** + * + * Gets the collection of rich text content control objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inlinePicture objects in the body. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the collection of list objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * + * Gets the collection of paragraph objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionData; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionData; + /** + * + * Gets the collection of table objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "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. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell"; + } + /** An interface describing the data returned by calling "contentControl.toJSON()". */ + interface ContentControlData { + /** + * + * Gets the collection of content control objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inlinePicture objects in the content control. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the collection of list objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * + * Get the collection of paragraph objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the parent body of the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the content control. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the content control. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets the collection of table objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: number; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "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. Read-only. + * + * [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"; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * + * Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: string; + /** + * + * Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [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. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: string; + /** + * + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online 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). + * + * [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 "document.toJSON()". */ + interface DocumentData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [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.. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApi 1.1] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * + * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. + * + * [Api set: WordApi] + */ + allowCloseOnUntitled?: 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. Read-only. + * + * [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.. Read-only. + * + * [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.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * + * 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. Read-only. + * + * [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. Read only. + * + * [Api set: WordApi 1.3] + */ + customProperties?: Word.Interfaces.CustomPropertyData[]; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + applicationName?: string; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + creationDate?: Date; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * + * Gets the last author of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastAuthor?: string; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastPrintDate?: Date; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastSaveTime?: Date; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + revisionNumber?: string; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + security?: number; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + template?: string; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface describing the data returned by calling "font.toJSON()". */ + interface FontData { + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets 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, or an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * + * Gets or sets a value that indicates whether the font has a strike through. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [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 { + /** + * + * Gets the parent paragraph that contains the inline image. Read-only. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphData; + /** + * + * Gets the content control that contains the inline image. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the inline image. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [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. + * + * [Api set: WordApi 1.3] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the list's id. + * + * [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. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean[]; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. + * + * [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 { + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: number; + /** + * + * Gets the list item bullet, number or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] + */ + listString?: string; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3] + */ + siblingIndex?: number; + } + /** An interface describing the data returned by calling "paragraph.toJSON()". */ + interface ParagraphData { + /** + * + * Gets the collection of content control objects in the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inlinePicture objects in the paragraph. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListData; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemData; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemData; + /** + * + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListData; + /** + * + * Gets the parent body of the paragraph. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the paragraph. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines. after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "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 is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: number; + /** + * + * Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: 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 "range.toJSON()". */ + interface RangeData { + /** + * + * Gets the collection of content control objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inline picture objects in the range. Read-only. + * + * [Api set: WordApi 1.2] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the collection of list objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * + * Gets the collection of paragraph objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the parent body of the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the range. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the range. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the range. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the range. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets the collection of table objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * 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. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * + * Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "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. Read-only. + * + * [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 { + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * + * Gets or sets 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 (Edit menu). + * + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets 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. + * + * [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 does not include the header/footer and other section metadata. Read-only. + * + * [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 "table.toJSON()". */ + interface TableData { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the parent body of the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the table. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains this table. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains this table. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets all of the table rows. Read-only. + * + * [Api set: WordApi 1.3] + */ + rows?: Word.Interfaces.TableRowData[]; + /** + * + * Gets the child tables nested one level deeper. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3] + */ + nestingLevel?: number; + /** + * + * Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowCount?: number; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "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 and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: 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. + * + * [Api set: WordApi 1.3] + */ + cells?: Word.Interfaces.TableCellData[]; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. + * + * [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. Read-only. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowData; + /** + * + * Gets the parent table of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellIndex?: number; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [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. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * + * Gets the width of the cell in points. Read-only. + * + * [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 { + /** + * + * Gets or sets the table border color, as a hex value or name. + * + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * + * Gets or sets the type of the table border. + * + * [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"; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** + * + * Represents the body of a document or a section. + * + * [Api set: WordApi 1.1] + */ + interface BodyLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * [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 if there isn't a parent body. + * + * [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. Returns a null object if there isn't a parent body. + * + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. + * + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. + * + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the text of the body. Use the insertText method to insert text. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + type?: 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 content controls are supported. + * + * [Api set: WordApi 1.1] + */ + interface ContentControlLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the content control. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the content control. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the content control. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets 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. + * + * [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. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * + * Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * + * Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * + * Contains a collection of [contentControl](contentControl.md) 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 content controls are supported. + * + * [Api set: WordApi 1.1] + */ + interface ContentControlCollectionLoadOptions { + $all?: boolean; + /** + * + * 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. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the content control. + * + * [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 if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the content control. Throws if it is not contained in a table. + * + * [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 if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the content control. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [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. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a custom property. + * + * [Api set: WordApi 1.3] + */ + interface CustomPropertyLoadOptions { + $all?: boolean; + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online 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). + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * + * Contains the collection of [customProperty](customProperty.md) objects. + * + * [Api set: WordApi 1.3] + */ + interface CustomPropertyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the key of the custom property. Read only. + * + * [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. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value of the custom property. Note that even though Word Online 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). + * + * [Api set: WordApi 1.3] + */ + value?: 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. + * + * [Api set: WordApi 1.1] + */ + interface DocumentLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * + * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. + * + * [Api set: WordApi] + */ + allowCloseOnUntitled?: 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. Read-only. + * + * [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. + * + * [Api set: WordApi 1.3] + */ + interface DocumentCreatedLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the properties of the document. + * + * [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. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** + * + * Represents document properties. + * + * [Api set: WordApi 1.3] + */ + interface DocumentPropertiesLoadOptions { + $all?: boolean; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + applicationName?: boolean; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: boolean; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: boolean; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: boolean; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: boolean; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + creationDate?: boolean; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: boolean; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: boolean; + /** + * + * Gets the last author of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastAuthor?: boolean; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastPrintDate?: boolean; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastSaveTime?: boolean; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: boolean; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + revisionNumber?: boolean; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + security?: boolean; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: boolean; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + template?: boolean; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: boolean; + } + /** + * + * Represents a font. + * + * [Api set: WordApi 1.1] + */ + interface FontLoadOptions { + $all?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets 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, or an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: boolean; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: boolean; + /** + * + * Gets or sets a value that indicates whether the font has a strike through. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline?: boolean; + } + /** + * + * Represents an inline picture. + * + * [Api set: WordApi 1.1] + */ + interface InlinePictureLoadOptions { + $all?: boolean; + /** + * + * Gets the parent paragraph that contains the inline image. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the content control that contains the inline image. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the inline image. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * + * Contains a collection of [inlinePicture](inlinePicture.md) objects. + * + * [Api set: WordApi 1.1] + */ + interface InlinePictureCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. + * + * [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 if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws if it is not contained in a table. + * + * [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 if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the inline image. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets a string that represents the alternative text associated with the inline image + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * + * Contains a collection of [paragraph](paragraph.md) objects. + * + * [Api set: WordApi 1.3] + */ + interface ListLoadOptions { + $all?: boolean; + /** + * + * Gets the list's id. + * + * [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. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * + * Contains a collection of [list](list.md) objects. + * + * [Api set: WordApi 1.3] + */ + interface ListCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the list's id. + * + * [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. Read-only. + * + * [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'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * + * Represents the paragraph list item format. + * + * [Api set: WordApi 1.3] + */ + interface ListItemLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: boolean; + /** + * + * Gets the list item bullet, number or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] + */ + listString?: boolean; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3] + */ + siblingIndex?: boolean; + } + /** + * + * Represents a single paragraph in a selection, range, content control, or document body. + * + * [Api set: WordApi 1.1] + */ + interface ParagraphLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * + * Gets the parent body of the paragraph. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the paragraph. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * + * Gets or sets the amount of spacing, in grid lines. after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * + * Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Contains a collection of [paragraph](paragraph.md) objects. + * + * [Api set: WordApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + $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. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the paragraph. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the amount of spacing, in grid lines. after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [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 is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Represents a contiguous area in a document. + * + * [Api set: WordApi 1.1] + */ + interface RangeLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the range. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the range. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the range. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the range. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the range. Returns a null object if it is not contained in a table. + * + * [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. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * + * Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Contains a collection of [range](range.md) objects. + * + * [Api set: WordApi 1.1] + */ + interface RangeCollectionLoadOptions { + $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. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the range. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the range. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the range. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the range. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the range. Returns a null object if it is not contained in a table. + * + * [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. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Specifies the options to be included in a search operation. + * + * [Api set: WordApi 1.1] + */ + interface SearchOptionsLoadOptions { + $all?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * + * Gets or sets 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 (Edit menu). + * + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** + * + * Represents a section in a Word document. + * + * [Api set: WordApi 1.1] + */ + interface SectionLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * + * Contains the collection of the document's [section](section.md) objects. + * + * [Api set: WordApi 1.1] + */ + interface SectionCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * + * Represents a table in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the table. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the table. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains this table. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains this table. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains this table. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * + * Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Contains the collection of the document's Table objects. + * + * [Api set: WordApi 1.3] + */ + interface TableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the table. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the table. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the table. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains this table. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains this table. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. Read-only. + * + * [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. Read-only. + * + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets 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. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Represents a row in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableRowLoadOptions { + $all?: boolean; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets parent table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * + * Contains the collection of the document's TableRow objects. + * + * [Api set: WordApi 1.3] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets parent table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * + * Represents a table cell in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableCellLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the parent row of the cell. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * + * Gets the parent table of the cell. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Contains the collection of the document's TableCell objects. + * + * [Api set: WordApi 1.3] + */ + interface TableCellCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent table of the cell. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Specifies the border style + * + * [Api set: WordApi 1.3] + */ + interface TableBorderLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the table border color, as a hex value or name. + * + * [Api set: WordApi 1.3] + */ + color?: boolean; + /** + * + * Gets or sets the type of the table border. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } } } -declare module Word { +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 OfficeExtension.ClientRequestContext { + class RequestContext extends OfficeCore.RequestContext { constructor(url?: string); - document: Document; + readonly document: Document; + readonly application: Application; } /** * 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; /** * 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; } @@ -20178,7 +36347,6 @@ declare module Word { ////////////////////// Begin OneNote APIs ////////////////////// //////////////////////////////////////////////////////////////// - declare namespace OneNote { /** * @@ -20187,14 +36355,13 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Application extends OfficeExtension.ClientObject { - private m_notebooks; /** * * 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. * * [Api set: OneNoteApi 1.1] */ - notebooks: OneNote.NotebookCollection; + readonly notebooks: OneNote.NotebookCollection; /** * * Gets the active notebook if one exists. If no notebook is active, throws ItemNotFound. @@ -20237,6 +36404,20 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ getActivePageOrNull(): OneNote.Page; + /** + * + * Gets the active Paragraph if one exists, If no Paragraph is active, throws ItemNotFound. + * + * [Api set: OneNoteApi] + */ + getActiveParagraph(): OneNote.Paragraph; + /** + * + * Gets the active Paragraph if one exists, otherwise returns null. + * + * [Api set: OneNoteApi] + */ + getActiveParagraphOrNull(): OneNote.Paragraph; /** * * Gets the active section if one exists. If no section is active, throws ItemNotFound. @@ -20253,26 +36434,41 @@ declare namespace OneNote { getActiveSectionOrNull(): OneNote.Section; /** * - * Opens the specified page in the application instance. - * - * @param page The page to open. + * The collection of pages in the section. Read only * * [Api set: OneNoteApi 1.1] */ + getSelectedPages(): OneNote.PageCollection; + getWindowSize(): OfficeExtension.ClientResult>; + insertHtmlAtCurrentPosition(html: string): void; + /** + * + * Opens the specified page in the application instance. + * + * [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. * - * @param url The client url of the page to open. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Application; + load(option?: OneNote.Interfaces.ApplicationLoadOptions): OneNote.Application; + load(option?: string | string[]): OneNote.Application; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Application; + toJSON(): OneNote.Interfaces.ApplicationData; } /** * @@ -20281,35 +36477,54 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysis extends OfficeExtension.ClientObject { - private m_id; - private m_page; - private m_paragraphs; - private m__ReferenceId; /** * * Gets the parent page object. Read-only. * * [Api set: OneNoteApi 1.1] */ - page: OneNote.Page; + readonly page: OneNote.Page; /** * * Gets the ink analysis paragraphs in this page. Read-only. * * [Api set: OneNoteApi 1.1] */ - paragraphs: OneNote.InkAnalysisParagraphCollection; + readonly paragraphs: OneNote.InkAnalysisParagraphCollection; /** * * Gets the ID of the InkAnalysis object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.InkAnalysisUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: InkAnalysis): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkAnalysis; + load(option?: OneNote.Interfaces.InkAnalysisLoadOptions): OneNote.InkAnalysis; + load(option?: string | string[]): OneNote.InkAnalysis; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.InkAnalysisData; } /** * @@ -20318,35 +36533,54 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisParagraph extends OfficeExtension.ClientObject { - private m_id; - private m_inkAnalysis; - private m_lines; - private m__ReferenceId; /** * * Reference to the parent InkAnalysisPage. Read-only. * * [Api set: OneNoteApi 1.1] */ - inkAnalysis: OneNote.InkAnalysis; + readonly inkAnalysis: OneNote.InkAnalysis; /** * * Gets the ink analysis lines in this ink analysis paragraph. Read-only. * * [Api set: OneNoteApi 1.1] */ - lines: OneNote.InkAnalysisLineCollection; + readonly lines: OneNote.InkAnalysisLineCollection; /** * * Gets the ID of the InkAnalysisParagraph object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.InkAnalysisParagraphUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: InkAnalysisParagraph): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkAnalysisParagraph; + load(option?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions): OneNote.InkAnalysisParagraph; + load(option?: string | string[]): OneNote.InkAnalysisParagraph; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.InkAnalysisParagraphData; } /** * @@ -20355,40 +36589,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisParagraphCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of InkAnalysisParagraphs in the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a InkAnalysisParagraph object by ID or by its index in the collection. Read-only. * - * @param index The ID of the InkAnalysisParagraph object, or the index location of the InkAnalysisParagraph object in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkAnalysisParagraphCollection; + load(option?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisParagraphCollection; + load(option?: string | string[]): OneNote.InkAnalysisParagraphCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.InkAnalysisParagraphCollectionData; } /** * @@ -20397,35 +36639,54 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisLine extends OfficeExtension.ClientObject { - private m_id; - private m_paragraph; - private m_words; - private m__ReferenceId; /** * * Reference to the parent InkAnalysisParagraph. Read-only. * * [Api set: OneNoteApi 1.1] */ - paragraph: OneNote.InkAnalysisParagraph; + readonly paragraph: OneNote.InkAnalysisParagraph; /** * * Gets the ink analysis words in this ink analysis line. Read-only. * * [Api set: OneNoteApi 1.1] */ - words: OneNote.InkAnalysisWordCollection; + readonly words: OneNote.InkAnalysisWordCollection; /** * * Gets the ID of the InkAnalysisLine object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.InkAnalysisLineUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: InkAnalysisLine): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkAnalysisLine; + load(option?: OneNote.Interfaces.InkAnalysisLineLoadOptions): OneNote.InkAnalysisLine; + load(option?: string | string[]): OneNote.InkAnalysisLine; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.InkAnalysisLineData; } /** * @@ -20434,40 +36695,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisLineCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of InkAnalysisLines in the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a InkAnalysisLine object by ID or by its index in the collection. Read-only. * - * @param index The ID of the InkAnalysisLine object, or the index location of the InkAnalysisLine object in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkAnalysisLineCollection; + load(option?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisLineCollection; + load(option?: string | string[]): OneNote.InkAnalysisLineCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.InkAnalysisLineCollectionData; } /** * @@ -20476,51 +36745,68 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisWord extends OfficeExtension.ClientObject { - private m_id; - private m_languageId; - private m_line; - private m_strokePointers; - private m_wordAlternates; - private m__ReferenceId; /** * * Reference to the parent InkAnalysisLine. Read-only. * * [Api set: OneNoteApi 1.1] */ - line: OneNote.InkAnalysisLine; + readonly line: OneNote.InkAnalysisLine; /** * * Gets the ID of the InkAnalysisWord object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * The id of the recognized language in this inkAnalysisWord. Read-only. * * [Api set: OneNoteApi 1.1] */ - languageId: string; + readonly languageId: string; /** * * Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. * * [Api set: OneNoteApi 1.1] */ - strokePointers: Array; + readonly strokePointers: Array; /** * * The words that were recognized in this ink word, in order of likelihood. Read-only. * * [Api set: OneNoteApi 1.1] */ - wordAlternates: Array; + readonly wordAlternates: Array; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.InkAnalysisWordUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: InkAnalysisWord): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkAnalysisWord; + load(option?: OneNote.Interfaces.InkAnalysisWordLoadOptions): OneNote.InkAnalysisWord; + load(option?: string | string[]): OneNote.InkAnalysisWord; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.InkAnalysisWordData; } /** * @@ -20529,40 +36815,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisWordCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of InkAnalysisWords in the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a InkAnalysisWord object by ID or by its index in the collection. Read-only. * - * @param index The ID of the InkAnalysisWord object, or the index location of the InkAnalysisWord object in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkAnalysisWordCollection; + load(option?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisWordCollection; + load(option?: string | string[]): OneNote.InkAnalysisWordCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.InkAnalysisWordCollectionData; } /** * @@ -20571,35 +36865,45 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class FloatingInk extends OfficeExtension.ClientObject { - private m_id; - private m_inkStrokes; - private m_pageContent; - private m__ReferenceId; /** * * Gets the strokes of the FloatingInk object. Read-only. * * [Api set: OneNoteApi 1.1] */ - inkStrokes: OneNote.InkStrokeCollection; + readonly inkStrokes: OneNote.InkStrokeCollection; /** * * Gets the PageContent parent of the FloatingInk object. Read-only. * * [Api set: OneNoteApi 1.1] */ - pageContent: OneNote.PageContent; + readonly pageContent: OneNote.PageContent; /** * * Gets the ID of the FloatingInk object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.FloatingInk; + load(option?: OneNote.Interfaces.FloatingInkLoadOptions): OneNote.FloatingInk; + load(option?: string | string[]): OneNote.FloatingInk; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.FloatingInkData; } /** * @@ -20608,27 +36912,38 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkStroke extends OfficeExtension.ClientObject { - private m_floatingInk; - private m_id; - private m__ReferenceId; /** * * Gets the ID of the InkStroke object. Read-only. * * [Api set: OneNoteApi 1.1] */ - floatingInk: OneNote.FloatingInk; + readonly floatingInk: OneNote.FloatingInk; /** * * Gets the ID of the InkStroke object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkStroke; + load(option?: OneNote.Interfaces.InkStrokeLoadOptions): OneNote.InkStroke; + load(option?: string | string[]): OneNote.InkStroke; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.InkStrokeData; } /** * @@ -20637,40 +36952,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkStrokeCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of InkStrokes in the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a InkStroke object by ID or by its index in the collection. Read-only. * - * @param index The ID of the InkStroke object, or the index location of the InkStroke object in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkStrokeCollection; + load(option?: OneNote.Interfaces.InkStrokeCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkStrokeCollection; + load(option?: string | string[]): OneNote.InkStrokeCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.InkStrokeCollectionData; } /** * @@ -20679,43 +37002,52 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkWord extends OfficeExtension.ClientObject { - private m_id; - private m_languageId; - private m_paragraph; - private m_wordAlternates; - private m__ReferenceId; /** * * The parent paragraph containing the ink word. Read-only. * * [Api set: OneNoteApi 1.1] */ - paragraph: OneNote.Paragraph; + readonly paragraph: OneNote.Paragraph; /** * * Gets the ID of the InkWord object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * The id of the recognized language in this ink word. Read-only. * * [Api set: OneNoteApi 1.1] */ - languageId: string; + readonly languageId: string; /** * * The words that were recognized in this ink word, in order of likelihood. Read-only. * * [Api set: OneNoteApi] */ - wordAlternates: Array; + readonly wordAlternates: Array; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkWord; + load(option?: OneNote.Interfaces.InkWordLoadOptions): OneNote.InkWord; + load(option?: string | string[]): OneNote.InkWord; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.InkWordData; } /** * @@ -20724,40 +37056,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkWordCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of InkWords in the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a InkWord object by ID or by its index in the collection. Read-only. * - * @param index The ID of the InkWord object, or the index location of the InkWord object in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.InkWordCollection; + load(option?: OneNote.Interfaces.InkWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkWordCollection; + load(option?: string | string[]): OneNote.InkWordCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.InkWordCollectionData; } /** * @@ -20766,69 +37106,91 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Notebook extends OfficeExtension.ClientObject { - private m_clientUrl; - private m_id; - private m_name; - private m_sectionGroups; - private m_sections; - private m__ReferenceId; /** * * The section groups in the notebook. Read only * * [Api set: OneNoteApi 1.1] */ - sectionGroups: OneNote.SectionGroupCollection; + readonly sectionGroups: OneNote.SectionGroupCollection; /** * * The the sections of the notebook. Read only * * [Api set: OneNoteApi 1.1] */ - sections: OneNote.SectionCollection; + readonly sections: OneNote.SectionCollection; + /** + * + * The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly baseUrl: string; /** * * The client url of the notebook. Read only * * [Api set: OneNoteApi 1.1] */ - clientUrl: string; + readonly clientUrl: string; /** * * Gets the ID of the notebook. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the name of the notebook. Read-only. * * [Api set: OneNoteApi 1.1] */ - name: string; + readonly name: string; /** * * Adds a new section to the end of the notebook. * - * @param name The name of the new section. - * * [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. * - * @param name The name of the new section. - * * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. */ addSectionGroup(name: string): OneNote.SectionGroup; + /** + * + * Gets the REST API ID. + * + * [Api set: OneNoteApi] + */ + getRestApiId(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Notebook; + load(option?: OneNote.Interfaces.NotebookLoadOptions): OneNote.Notebook; + load(option?: string | string[]): OneNote.Notebook; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.NotebookData; } /** * @@ -20837,49 +37199,57 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class NotebookCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of notebooks in the collection. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets the collection of notebooks with the specified name that are open in the application instance. * - * @param name The name of the notebook. - * * [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. * - * @param index The ID of the notebook, or the index location of the notebook in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.NotebookCollection; + load(option?: OneNote.Interfaces.NotebookCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.NotebookCollection; + load(option?: string | string[]): OneNote.NotebookCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.NotebookCollectionData; } /** * @@ -20888,93 +37258,105 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class SectionGroup extends OfficeExtension.ClientObject { - private m_clientUrl; - private m_id; - private m_name; - private m_notebook; - private m_parentSectionGroup; - private m_parentSectionGroupOrNull; - private m_sectionGroups; - private m_sections; - private m__ReferenceId; /** * * Gets the notebook that contains the section group. Read-only. * * [Api set: OneNoteApi 1.1] */ - notebook: OneNote.Notebook; + 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. * * [Api set: OneNoteApi 1.1] */ - parentSectionGroup: OneNote.SectionGroup; + 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. * * [Api set: OneNoteApi 1.1] */ - parentSectionGroupOrNull: OneNote.SectionGroup; + readonly parentSectionGroupOrNull: OneNote.SectionGroup; /** * * The collection of section groups in the section group. Read only * * [Api set: OneNoteApi 1.1] */ - sectionGroups: OneNote.SectionGroupCollection; + readonly sectionGroups: OneNote.SectionGroupCollection; /** * * The collection of sections in the section group. Read only * * [Api set: OneNoteApi 1.1] */ - sections: OneNote.SectionCollection; + readonly sections: OneNote.SectionCollection; /** * * The client url of the section group. Read only * * [Api set: OneNoteApi 1.1] */ - clientUrl: string; + readonly clientUrl: string; /** * * Gets the ID of the section group. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the name of the section group. Read-only. * * [Api set: OneNoteApi 1.1] */ - name: string; + readonly name: string; /** * * Adds a new section to the end of the section group. * - * @param title The name of the new section. - * * [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. * - * @param name The name of the new section. - * * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. */ addSectionGroup(name: string): OneNote.SectionGroup; + /** + * + * Gets the REST API ID. + * + * [Api set: OneNoteApi] + */ + getRestApiId(): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.SectionGroup; + load(option?: OneNote.Interfaces.SectionGroupLoadOptions): OneNote.SectionGroup; + load(option?: string | string[]): OneNote.SectionGroup; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.SectionGroupData; } /** * @@ -20983,49 +37365,57 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class SectionGroupCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of section groups in the collection. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets the collection of section groups with the specified name. * - * @param name The name of the section group. - * * [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. * - * @param index The ID of the section group, or the index location of the section group in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.SectionGroupCollection; + load(option?: OneNote.Interfaces.SectionGroupCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionGroupCollection; + load(option?: string | string[]): OneNote.SectionGroupCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.SectionGroupCollectionData; } /** * @@ -21034,104 +37424,124 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Section extends OfficeExtension.ClientObject { - private m_clientUrl; - private m_id; - private m_name; - private m_notebook; - private m_pages; - private m_parentSectionGroup; - private m_parentSectionGroupOrNull; - private m__ReferenceId; /** * * Gets the notebook that contains the section. Read-only. * * [Api set: OneNoteApi 1.1] */ - notebook: OneNote.Notebook; + readonly notebook: OneNote.Notebook; /** * * The collection of pages in the section. Read only * * [Api set: OneNoteApi 1.1] */ - pages: OneNote.PageCollection; + 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. * * [Api set: OneNoteApi 1.1] */ - parentSectionGroup: OneNote.SectionGroup; + 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. * * [Api set: OneNoteApi 1.1] */ - parentSectionGroupOrNull: OneNote.SectionGroup; + readonly parentSectionGroupOrNull: OneNote.SectionGroup; /** * * The client url of the section. Read only * * [Api set: OneNoteApi 1.1] */ - clientUrl: string; + readonly clientUrl: string; /** * * Gets the ID of the section. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the name of the section. Read-only. * * [Api set: OneNoteApi 1.1] */ - name: string; + readonly name: string; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly webUrl: string; /** * * Adds a new page to the end of the section. * - * @param title The title of the new page. - * * [Api set: OneNoteApi 1.1] + * + * @param title The title of the new page. */ addPage(title: string): OneNote.Page; /** * * Copies this section to specified notebook. * - * @param destinationNotebook The notebook to copy this section to. - * * [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. * - * @param destinationSectionGroup The section group to copy this section to. - * * [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. + * + * [Api set: OneNoteApi] + */ + getRestApiId(): OfficeExtension.ClientResult; /** * * Inserts a new section before or after the current section. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ insertSectionAsSibling(location: string, 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Section; + load(option?: OneNote.Interfaces.SectionLoadOptions): OneNote.Section; + load(option?: string | string[]): OneNote.Section; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.SectionData; } /** * @@ -21140,49 +37550,57 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class SectionCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of sections in the collection. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets the collection of sections with the specified name. * - * @param name The name of the section. - * * [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. * - * @param index The ID of the section, or the index location of the section in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.SectionCollection; + load(option?: OneNote.Interfaces.SectionCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionCollection; + load(option?: string | string[]): OneNote.SectionCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.SectionCollectionData; } /** * @@ -21191,50 +37609,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Page extends OfficeExtension.ClientObject { - private m_clientUrl; - private m_contents; - private m_id; - private m_inkAnalysisOrNull; - private m_pageLevel; - private m_parentSection; - private m_title; - private m_webUrl; - private m__ReferenceId; /** * * The collection of PageContent objects on the page. Read only * * [Api set: OneNoteApi 1.1] */ - contents: OneNote.PageContentCollection; + readonly contents: OneNote.PageContentCollection; /** * * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. Read only. * * [Api set: OneNoteApi 1.1] */ - inkAnalysisOrNull: OneNote.InkAnalysis; + readonly inkAnalysisOrNull: OneNote.InkAnalysis; /** * * Gets the section that contains the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - parentSection: OneNote.Section; + readonly parentSection: OneNote.Section; + /** + * + * Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + readonly classNotebookPageSource: string; /** * * The client url of the page. Read only * * [Api set: OneNoteApi 1.1] */ - clientUrl: string; + readonly clientUrl: string; /** * * Gets the ID of the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets or sets the indentation level of the page. @@ -21255,41 +37671,101 @@ declare namespace OneNote { * * [Api set: OneNoteApi 1.1] */ - webUrl: string; + readonly webUrl: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.PageUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Page): void; /** * * Adds an Outline to the page at the specified position. * + * [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 [supported HTML](../../docs/onenote/onenote-add-ins-page-content.md#supported-html) for the OneNote add-ins JavaScript API. - * - * [Api set: OneNoteApi 1.1] */ addOutline(left: number, top: number, html: string): OneNote.Outline; /** * - * Copies this page to specified section. + * Return a json string with node id and content in html format. * - * @param destinationSection The section to copy this page to. + * [Api set: OneNoteApi] + */ + analyzePage(): OfficeExtension.ClientResult; + /** + * + * Inserts a new page with translated content. * * [Api set: OneNoteApi 1.1] + * + * @param translatedContent Translated content of the page + */ + applyTranslation(translatedContent: string): void; + /** + * + * Copies this page to specified section. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + copyToSectionAndSetClassNotebookPageSource(destinationSection: OneNote.Section): OneNote.Page; + /** + * + * Gets the REST API ID. + * + * [Api set: OneNoteApi] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * + * Does the page has content title. + * + * [Api set: OneNoteApi] + */ + hasTitleContent(): OfficeExtension.ClientResult; /** * * Inserts a new page before or after the current page. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ insertPageAsSibling(location: string, 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Page; + load(option?: OneNote.Interfaces.PageLoadOptions): OneNote.Page; + load(option?: string | string[]): OneNote.Page; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.PageData; } /** * @@ -21298,49 +37774,57 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class PageCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of pages in the collection. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets the collection of pages with the specified title. * - * @param title The title of the page. - * * [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. * - * @param index The ID of the page, or the index location of the page in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.PageCollection; + load(option?: OneNote.Interfaces.PageCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageCollection; + load(option?: string | string[]): OneNote.PageCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.PageCollectionData; } /** * @@ -21349,50 +37833,41 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class PageContent extends OfficeExtension.ClientObject { - private m_id; - private m_image; - private m_ink; - private m_left; - private m_outline; - private m_parentPage; - private m_top; - private m_type; - private m__ReferenceId; /** * * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. * * [Api set: OneNoteApi 1.1] */ - image: OneNote.Image; + readonly image: OneNote.Image; /** * * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. * * [Api set: OneNoteApi 1.1] */ - ink: OneNote.FloatingInk; + readonly ink: OneNote.FloatingInk; /** * * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. * * [Api set: OneNoteApi 1.1] */ - outline: OneNote.Outline; + readonly outline: OneNote.Outline; /** * * Gets the page that contains the PageContent object. Read-only. * * [Api set: OneNoteApi 1.1] */ - parentPage: OneNote.Page; + readonly parentPage: OneNote.Page; /** * * Gets the ID of the PageContent object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets or sets the left (X-axis) position of the PageContent object. @@ -21413,7 +37888,16 @@ declare namespace OneNote { * * [Api set: OneNoteApi 1.1] */ - type: string; + readonly type: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.PageContentUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: PageContent): void; /** * * Deletes the PageContent object. @@ -21424,7 +37908,21 @@ declare namespace OneNote { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.PageContent; + load(option?: OneNote.Interfaces.PageContentLoadOptions): OneNote.PageContent; + load(option?: string | string[]): OneNote.PageContent; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.PageContentData; } /** * @@ -21433,40 +37931,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class PageContentCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of page contents in the collection. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a PageContent object by ID or by its index in the collection. Read-only. * - * @param index The ID of the PageContent object, or the index location of the PageContent object in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.PageContentCollection; + load(option?: OneNote.Interfaces.PageContentCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageContentCollection; + load(option?: string | string[]): OneNote.PageContentCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.PageContentCollectionData; } /** * @@ -21475,75 +37981,92 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Outline extends OfficeExtension.ClientObject { - private m_id; - private m_pageContent; - private m_paragraphs; - private m__ReferenceId; /** * * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - pageContent: OneNote.PageContent; + readonly pageContent: OneNote.PageContent; /** * * Gets the collection of Paragraph objects in the Outline. Read-only. * * [Api set: OneNoteApi 1.1] */ - paragraphs: OneNote.ParagraphCollection; + readonly paragraphs: OneNote.ParagraphCollection; /** * * Gets the ID of the Outline object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Adds the specified HTML to the bottom of the Outline. * - * @param html The HTML string to append. See [supported HTML](../../docs/onenote/onenote-add-ins-page-content.md#supported-html) for the OneNote add-ins JavaScript API. - * * [Api set: OneNoteApi 1.1] + * + * @param html The HTML string to append. See [supported HTML](../../docs/onenote/onenote-add-ins-page-content.md#supported-html) for the OneNote add-ins JavaScript API. */ appendHtml(html: string): void; /** * * Adds the specified image to the bottom of the Outline. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ appendImage(base64EncodedImage: string, width: number, height: number): OneNote.Image; /** * * Adds the specified text to the bottom of the Outline. * - * @param paragraphText HTML string to append. - * * [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. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ appendTable(rowCount: number, columnCount: number, values?: Array>): OneNote.Table; + /** + * + * Check if the outline is title outline. + * + * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Outline; + load(option?: OneNote.Interfaces.OutlineLoadOptions): OneNote.Outline; + load(option?: string | string[]): OneNote.Outline; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.OutlineData; } /** * @@ -21552,103 +38075,109 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Paragraph extends OfficeExtension.ClientObject { - private m_id; - private m_image; - private m_inkWords; - private m_outline; - private m_paragraphs; - private m_parentParagraph; - private m_parentParagraphOrNull; - private m_parentTableCell; - private m_parentTableCellOrNull; - private m_richText; - private m_table; - private m_type; - private m__ReferenceId; /** * * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. Read-only. * * [Api set: OneNoteApi 1.1] */ - image: OneNote.Image; + readonly image: OneNote.Image; /** * * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. Read-only. * * [Api set: OneNoteApi 1.1] */ - inkWords: OneNote.InkWordCollection; + readonly inkWords: OneNote.InkWordCollection; /** * * Gets the Outline object that contains the Paragraph. Read-only. * * [Api set: OneNoteApi 1.1] */ - outline: OneNote.Outline; + readonly outline: OneNote.Outline; /** * * The collection of paragraphs under this paragraph. Read only * * [Api set: OneNoteApi 1.1] */ - paragraphs: OneNote.ParagraphCollection; + readonly paragraphs: OneNote.ParagraphCollection; /** * * Gets the parent paragraph object. Throws if a parent paragraph does not exist. Read-only. * * [Api set: OneNoteApi 1.1] */ - parentParagraph: OneNote.Paragraph; + readonly parentParagraph: OneNote.Paragraph; /** * * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. Read-only. * * [Api set: OneNoteApi 1.1] */ - parentParagraphOrNull: OneNote.Paragraph; + 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. * * [Api set: OneNoteApi 1.1] */ - parentTableCell: OneNote.TableCell; + 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. * * [Api set: OneNoteApi 1.1] */ - parentTableCellOrNull: OneNote.TableCell; + readonly parentTableCellOrNull: OneNote.TableCell; /** * * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only * * [Api set: OneNoteApi 1.1] */ - richText: OneNote.RichText; + readonly richText: OneNote.RichText; /** * * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. Read-only. * * [Api set: OneNoteApi 1.1] */ - table: OneNote.Table; + readonly table: OneNote.Table; /** * * Gets the ID of the Paragraph object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the type of the Paragraph object. Read-only. * * [Api set: OneNoteApi 1.1] */ - type: string; + readonly type: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.ParagraphUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Paragraph): void; + /** + * + * Add NoteTag to the paragraph. + * + * [Api set: OneNoteApi 1.1] + * + * @param type The type of the NoteTag. + * @param status The status of the NoteTag. + */ + addNoteTag(type: string, status: string): OneNote.NoteTag; /** * * Deletes the paragraph @@ -21656,54 +38185,75 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ delete(): void; + /** + * + * Get list information of paragraph + * + * [Api set: OneNoteApi 1.1] + */ + getParagraphInfo(): OfficeExtension.ClientResult; /** * * Inserts the specified HTML content * + * [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 [supported HTML](../../docs/onenote/onenote-add-ins-page-content.md#supported-html) for the OneNote add-ins JavaScript API. - * - * [Api set: OneNoteApi 1.1] */ insertHtmlAsSibling(insertLocation: string, html: string): void; /** * * Inserts the image at the specified insert location.. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ insertImageAsSibling(insertLocation: string, base64EncodedImage: string, width: number, height: number): OneNote.Image; /** * * Inserts the paragraph text at the specifiec insert location. * + * [Api set: OneNoteApi 1.1] + * * @param insertLocation The location of the table relative to the current Paragraph. * @param paragraphText HTML string to append. - * - * [Api set: OneNoteApi 1.1] */ insertRichTextAsSibling(insertLocation: string, paragraphText: string): OneNote.RichText; /** * * Adds a table with the specified number of rows and columns before or after the current paragraph. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ insertTableAsSibling(insertLocation: string, rowCount: number, columnCount: number, values?: Array>): OneNote.Table; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Paragraph; + load(option?: OneNote.Interfaces.ParagraphLoadOptions): OneNote.Paragraph; + load(option?: string | string[]): OneNote.Paragraph; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.ParagraphData; } /** * @@ -21712,40 +38262,95 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class ParagraphCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of paragraphs in the page. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a Paragraph object by ID or by its index in the collection. Read-only. * - * @param index The ID of the Paragraph object, or the index location of the Paragraph object in the collection. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.ParagraphCollection; + load(option?: OneNote.Interfaces.ParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.ParagraphCollection; + load(option?: string | string[]): OneNote.ParagraphCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.ParagraphCollectionData; + } + /** + * + * A container for the NoteTag in a paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + class NoteTag extends OfficeExtension.ClientObject { + /** + * + * Gets the Id of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the status of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly status: string; + /** + * + * Gets the type of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly type: string; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: OneNote.Interfaces.NoteTagLoadOptions): OneNote.NoteTag; + load(option?: string | string[]): OneNote.NoteTag; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.NoteTagData; } /** * @@ -21754,35 +38359,60 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class RichText extends OfficeExtension.ClientObject { - private m_id; - private m_paragraph; - private m_text; - private m__ReferenceId; /** * * Gets the Paragraph object that contains the RichText object. Read-only. * * [Api set: OneNoteApi 1.1] */ - paragraph: OneNote.Paragraph; + readonly paragraph: OneNote.Paragraph; /** * * Gets the ID of the RichText object. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; + /** + * + * The language id of the text. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; /** * * Gets the text content of the RichText object. Read-only. * * [Api set: OneNoteApi 1.1] */ - text: string; + readonly text: string; + /** + * + * Get the HTML of the rich text + * + * [Api set: OneNoteApi] + * @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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.RichText; + load(option?: OneNote.Interfaces.RichTextLoadOptions): OneNote.RichText; + load(option?: string | string[]): OneNote.RichText; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.RichTextData; } /** * @@ -21791,29 +38421,20 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Image extends OfficeExtension.ClientObject { - private m_description; - private m_height; - private m_hyperlink; - private m_id; - private m_ocrData; - private m_pageContent; - private m_paragraph; - private m_width; - private m__ReferenceId; /** * * 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. * * [Api set: OneNoteApi 1.1] */ - pageContent: OneNote.PageContent; + 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. * * [Api set: OneNoteApi 1.1] */ - paragraph: OneNote.Paragraph; + readonly paragraph: OneNote.Paragraph; /** * * Gets or sets the description of the Image. @@ -21841,14 +38462,14 @@ declare namespace OneNote { * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the data obtained by OCR (Optical Character Recognition) of this Image, such as OCR text and language. * * [Api set: OneNoteApi 1.1] */ - ocrData: OneNote.ImageOcrData; + readonly ocrData: OneNote.ImageOcrData; /** * * Gets or sets the width of the Image layout. @@ -21856,6 +38477,15 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ width: number; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.ImageUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Image): void; /** * * Gets the base64-encoded binary representation of the Image. @@ -21867,7 +38497,21 @@ declare namespace OneNote { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Image; + load(option?: OneNote.Interfaces.ImageLoadOptions): OneNote.Image; + load(option?: string | string[]): OneNote.Image; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.ImageData; } /** * @@ -21876,27 +38520,20 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Table extends OfficeExtension.ClientObject { - private m_borderVisible; - private m_columnCount; - private m_id; - private m_paragraph; - private m_rowCount; - private m_rows; - private m__ReferenceId; /** * * Gets the Paragraph object that contains the Table object. Read-only. * * [Api set: OneNoteApi 1.1] */ - paragraph: OneNote.Paragraph; + readonly paragraph: OneNote.Paragraph; /** * * Gets all of the table rows. Read-only. * * [Api set: OneNoteApi 1.1] */ - rows: OneNote.TableRowCollection; + readonly rows: OneNote.TableRowCollection; /** * * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. @@ -21910,37 +38547,46 @@ declare namespace OneNote { * * [Api set: OneNoteApi 1.1] */ - columnCount: number; + readonly columnCount: number; /** * * Gets the ID of the table. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the number of rows in the table. * * [Api set: OneNoteApi 1.1] */ - rowCount: number; + readonly rowCount: number; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.TableUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: 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. * - * @param values Optional. Strings to insert in the new column, specified as an array. Must not have more values than rows in the table. - * * [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?: Array): void; /** * * Adds a row to the end of the table. Values, if specified, are set in the new row. Otherwise the row is empty. * - * @param values Optional. Strings to insert in the new row, specified as an array. Must not have more values than columns in the table. - * * [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?: Array): OneNote.TableRow; /** @@ -21954,37 +38600,51 @@ declare namespace OneNote { * * Gets the table cell at a specified row and column. * + * [Api set: OneNoteApi 1.1] + * * @param rowIndex The index of the row. * @param cellIndex The index of the cell in the row. - * - * [Api set: OneNoteApi 1.1] */ 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. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ insertColumn(index: number, values?: Array): 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. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ insertRow(index: number, values?: Array): OneNote.TableRow; 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.Table; + load(option?: OneNote.Interfaces.TableLoadOptions): OneNote.Table; + load(option?: string | string[]): OneNote.Table; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.TableData; } /** * @@ -21993,47 +38653,41 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableRow extends OfficeExtension.ClientObject { - private m_cellCount; - private m_cells; - private m_id; - private m_parentTable; - private m_rowIndex; - private m__ReferenceId; /** * * Gets the cells in the row. Read-only. * * [Api set: OneNoteApi 1.1] */ - cells: OneNote.TableCellCollection; + readonly cells: OneNote.TableCellCollection; /** * * Gets the parent table. Read-only. * * [Api set: OneNoteApi 1.1] */ - parentTable: OneNote.Table; + readonly parentTable: OneNote.Table; /** * * Gets the number of cells in the row. Read-only. * * [Api set: OneNoteApi 1.1] */ - cellCount: number; + readonly cellCount: number; /** * * Gets the ID of the row. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the index of the row in its parent table. Read-only. * * [Api set: OneNoteApi 1.1] */ - rowIndex: number; + readonly rowIndex: number; /** * * Clears the contents of the row. @@ -22045,17 +38699,31 @@ declare namespace OneNote { * * Inserts a row before or after the current row. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ insertRowAsSibling(insertLocation: string, values?: Array): OneNote.TableRow; 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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.TableRow; + load(option?: OneNote.Interfaces.TableRowLoadOptions): OneNote.TableRow; + load(option?: string | string[]): OneNote.TableRow; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.TableRowData; } /** * @@ -22064,40 +38732,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableRowCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of table rows in this collection. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a table row object by ID or by its index in the collection. Read-only. * - * @param index A number that identifies the index location of a table row object. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.TableRowCollection; + load(option?: OneNote.Interfaces.TableRowCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableRowCollection; + load(option?: string | string[]): OneNote.TableRowCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.TableRowCollectionData; } /** * @@ -22106,48 +38782,41 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableCell extends OfficeExtension.ClientObject { - private m_cellIndex; - private m_id; - private m_paragraphs; - private m_parentRow; - private m_rowIndex; - private m_shadingColor; - private m__ReferenceId; /** * * Gets the collection of Paragraph objects in the TableCell. Read-only. * * [Api set: OneNoteApi 1.1] */ - paragraphs: OneNote.ParagraphCollection; + readonly paragraphs: OneNote.ParagraphCollection; /** * * Gets the parent row of the cell. Read-only. * * [Api set: OneNoteApi 1.1] */ - parentRow: OneNote.TableRow; + readonly parentRow: OneNote.TableRow; /** * * Gets the index of the cell in its row. Read-only. * * [Api set: OneNoteApi 1.1] */ - cellIndex: number; + readonly cellIndex: number; /** * * Gets the ID of the cell. Read-only. * * [Api set: OneNoteApi 1.1] */ - id: string; + readonly id: string; /** * * Gets the index of the cell's row in the table. Read-only. * * [Api set: OneNoteApi 1.1] */ - rowIndex: number; + readonly rowIndex: number; /** * * Gets and sets the shading color of the cell @@ -22155,44 +38824,53 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ shadingColor: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.TableCellUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: TableCell): void; /** * * Adds the specified HTML to the bottom of the TableCell. * - * @param html The HTML string to append. See [supported HTML](../../docs/onenote/onenote-add-ins-page-content.md#supported-html) for the OneNote add-ins JavaScript API. - * * [Api set: OneNoteApi 1.1] + * + * @param html The HTML string to append. See [supported HTML](../../docs/onenote/onenote-add-ins-page-content.md#supported-html) for the OneNote add-ins JavaScript API. */ appendHtml(html: string): void; /** * * Adds the specified image to table cell. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ appendImage(base64EncodedImage: string, width: number, height: number): OneNote.Image; /** * * Adds the specified text to table cell. * - * @param paragraphText HTML string to append. - * * [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. * + * [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. - * - * [Api set: OneNoteApi 1.1] */ appendTable(rowCount: number, columnCount: number, values?: Array>): OneNote.Table; /** @@ -22205,7 +38883,21 @@ declare namespace OneNote { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.TableCell; + load(option?: OneNote.Interfaces.TableCellLoadOptions): OneNote.TableCell; + load(option?: string | string[]): OneNote.TableCell; + load(option?: { + 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; + toJSON(): OneNote.Interfaces.TableCellData; } /** * @@ -22214,40 +38906,48 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableCellCollection extends OfficeExtension.ClientObject { - private m_count; - private m__ReferenceId; - private m__items; /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Returns the number of tablecells in this collection. Read-only. * * [Api set: OneNoteApi 1.1] */ - count: number; + readonly count: number; /** * * Gets a table cell object by ID or by its index in the collection. Read-only. * - * @param index A number that identifies the index location of a table cell object. - * * [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. * - * @param index Index value of the object to be retrieved. Zero-indexed. - * * [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. */ - load(option?: string | string[] | OfficeExtension.LoadOption): OneNote.TableCellCollection; + load(option?: OneNote.Interfaces.TableCellCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableCellCollection; + load(option?: string | string[]): OneNote.TableCellCollection; + load(option?: 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; + toJSON(): OneNote.Interfaces.TableCellCollectionData; } /** * @@ -22293,17 +38993,208 @@ declare namespace OneNote { */ inkStrokeId: string; } + /** + * + * Service token for Application::_GetServiceToken. + * + * [Api set: OneNoteApi 1.1] + */ + interface ServiceToken { + /** + * + * Account type + * + * [Api set: OneNoteApi 1.1] + */ + accountType: string; + /** + * + * // + Header name of the service token + * + * [Api set: OneNoteApi 1.1] + */ + headerName: string; + /** + * + * Header value of the service token + * + * [Api set: OneNoteApi 1.1] + */ + headerValue: string; + } + /** + * + * Account information. + * + * [Api set: OneNoteApi 1.1] + */ + interface AccountInfo { + /** + * + * Account type + * + * [Api set: OneNoteApi 1.1] + */ + accountType: string; + /** + * + * Account email + * + * [Api set: OneNoteApi 1.1] + */ + email: string; + /** + * + * // + Account user name + * + * [Api set: OneNoteApi 1.1] + */ + userName: string; + } + /** + * + * List information for paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphInfo { + /** + * + * // + Bullet list type of paragraph + * + * [Api set: OneNoteApi 1.1] + */ + bulletType: string; + /** + * + * // + Index of paragraph in list + * + * [Api set: OneNoteApi 1.1] + */ + index: number; + /** + * + * // + Type of list in paragraph + * + * [Api set: OneNoteApi 1.1] + */ + listType: string; + /** + * + * // + number list type of paragraph + * + * [Api set: OneNoteApi 1.1] + */ + numberType: string; + } + /** + * + * Account information. + * + * [Api set: OneNoteApi 1.1] + */ + interface LoggingInfo { + /** + * + * // + Correlation Id + * + * [Api set: OneNoteApi 1.1] + */ + correlationId: string; + /** + * + * // + UI Language + * + * [Api set: OneNoteApi 1.1] + */ + market: string; + /** + * + * // + Session Id + * + * [Api set: OneNoteApi 1.1] + */ + sessionId: string; + /** + * + * // + UI Language + * + * [Api set: OneNoteApi 1.1] + */ + uiLanguage: string; + /** + * + * // + User Id + * + * [Api set: OneNoteApi 1.1] + */ + userId: string; + } + /** + * + * Account information. + * + * [Api set: OneNoteApi 1.1] + */ + interface LogData { + /** + * + * // + None PII + * + * [Api set: OneNoteApi 1.1] + */ + isNonPII: boolean; + /** + * + * // + data tag + * + * [Api set: OneNoteApi 1.1] + */ + tag: string; + /** + * + * // + data value + * + * [Api set: OneNoteApi 1.1] + */ + value: string; + } /** * [Api set: OneNoteApi] */ - module InsertLocation { + namespace InsertLocation { var before: string; var after: string; } /** * [Api set: OneNoteApi] */ - module Alignment { + namespace Platform { + var other: string; + var web: string; + var uwp: string; + var win32: string; + var mac: string; + var ios: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace Alignment { var left: string; var centered: string; var right: string; @@ -22312,7 +39203,7 @@ declare namespace OneNote { /** * [Api set: OneNoteApi] */ - module Selected { + namespace Selected { var notSelected: string; var partialSelected: string; var selected: string; @@ -22320,7 +39211,7 @@ declare namespace OneNote { /** * [Api set: OneNoteApi] */ - module PageContentType { + namespace PageContentType { var outline: string; var image: string; var ink: string; @@ -22329,28 +39220,2957 @@ declare namespace OneNote { /** * [Api set: OneNoteApi] */ - module ParagraphType { + namespace ParagraphType { var richText: string; var image: string; var table: string; var ink: string; var other: string; } - module ErrorCodes { + /** + * [Api set: OneNoteApi] + */ + namespace NoteTagType { + var unknown: string; + var toDo: string; + var important: string; + var question: string; + var contact: string; + var address: string; + var phoneNumber: string; + var website: string; + var idea: string; + var critical: string; + var toDoPriority1: string; + var toDoPriority2: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace NoteTagStatus { + var unknown: string; + var normal: string; + var completed: string; + var disabled: string; + var outlookTask: string; + var taskNotSyncedYet: string; + var taskRemoved: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace ServiceId { + var form: string; + var entity: string; + var graph: string; + var oneService: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace IdentityFilter { + var selection: string; + var activeProfile: string; + var liveId: string; + var orgId: string; + var adal: string; + var notebook: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace ListType { + var none: string; + var number: string; + var bullet: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace AccountType { + var other: string; + var liveId: string; + var orgId: string; + var adal: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace LogLevel { + var trace: string; + var data: string; + var exception: string; + var warning: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace EventFlag { + /** + * + * DefaultEventFlags + * + */ + var defaultFlag: string; + /** + * + * CriticalDataEventFlags + * + */ + var criticalFlag: string; + /** + * + * MeasureDataEventFlags + * + */ + var measureFlag: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace NumberType { + var none: string; + var arabic: string; + var ucroman: string; + var lcroman: string; + var ucletter: string; + var lcletter: string; + var ordinal: string; + var cardtext: string; + var ordtext: string; + var hex: string; + var chiManSty: string; + var dbNum1: string; + var dbNum2: string; + var aiueo: string; + var iroha: string; + var dbChar: string; + var sbChar: string; + var dbNum3: string; + var dbNum4: string; + var circlenum: string; + var darabic: string; + var daiueo: string; + var diroha: string; + var arabicLZ: string; + var bullet: string; + var ganada: string; + var chosung: string; + var gb1: string; + var gb2: string; + var gb3: string; + var gb4: string; + var zodiac1: string; + var zodiac2: string; + var zodiac3: string; + var tpeDbNum1: string; + var tpeDbNum2: string; + var tpeDbNum3: string; + var tpeDbNum4: string; + var chnDbNum1: string; + var chnDbNum2: string; + var chnDbNum3: string; + var chnDbNum4: string; + var korDbNum1: string; + var korDbNum2: string; + var korDbNum3: string; + var korDbNum4: string; + var hebrew1: string; + var arabic1: string; + var hebrew2: string; + var arabic2: string; + var hindi1: string; + var hindi2: string; + var hindi3: string; + var thai1: string; + var thai2: string; + var numInDash: string; + var lcrus: string; + var ucrus: string; + var lcgreek: string; + var ucgreek: string; + var lim: string; + var custom: string; + } + /** + * [Api set: OneNoteApi] + */ + namespace ControlId { + var preinstallClassNotebook: string; + var distributePageId: string; + var distributeSection: string; + var reviewStudentWork: string; + var openTabForCreateClassNotebook: string; + var openTabForManageStudent: string; + var openTabForManageTeacher: string; + var openTabForGetNotebookLink: string; + var openTabForTeacherTraining: string; + var openTabForAddinGuide: string; + var openTabForEducationBlog: string; + var openTabForEducatorCommunity: string; + var openTabToSendFeedback: string; + var openTabForViewKnowledgeBase: string; + var openTabForSuggestingFeature: string; + var createAssignment: string; + var connections: string; + var mapClassNotebooks: string; + var mapStudents: string; + var manageClasses: string; + } + namespace ErrorCodes { var generalException: string; } + namespace Interfaces { + interface CollectionLoadOptions { + $top?: number; + $skip?: number; + } + /** An interface for updating data on the InkAnalysis object, for use in "inkAnalysis.set({ ... })". */ + interface InkAnalysisUpdateData { + /** + * + * Gets the parent page object. + * + * [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. + * + * [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. + * + * [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. + * + * [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 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. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisUpdateData; + /** + * + * Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * + * Gets or sets the title of the page. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * + * Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * + * Gets or sets the height of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * + * Gets or sets the hyperlink of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets or sets the width of the Image layout. + * + * [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. + * + * [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 + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageData; + /** + * + * Gets the ink analysis paragraphs in this page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.InkAnalysisParagraphData[]; + /** + * + * Gets the ID of the InkAnalysis object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisData; + /** + * + * Gets the ink analysis lines in this ink analysis paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineData[]; + /** + * + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphData; + /** + * + * Gets the ink analysis words in this ink analysis line. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordData[]; + /** + * + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineData; + /** + * + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: Array; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: Array; + } + /** 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. + * + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeData[]; + /** + * + * Gets the PageContent parent of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentData; + /** + * + * Gets the ID of the FloatingInk object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkData; + /** + * + * Gets the ID of the InkStroke object. Read-only. + * + * [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 "inkWord.toJSON()". */ + interface InkWordData { + /** + * + * The parent paragraph containing the ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the ID of the InkWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * The id of the recognized language in this ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi] + */ + wordAlternates?: Array; + } + /** 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 + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * + * The the sections of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * + * The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: string; + /** + * + * The client url of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the name of the notebook. Read-only. + * + * [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 { + /** + * + * Gets the notebook that contains the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookData; + /** + * + * Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupData; + /** + * + * Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupData; + /** + * + * The collection of section groups in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * + * The collection of sections in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * + * The client url of the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the name of the section group. Read-only. + * + * [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 { + /** + * + * Gets the notebook that contains the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookData; + /** + * + * The collection of pages in the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + pages?: OneNote.Interfaces.PageData[]; + /** + * + * Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupData; + /** + * + * Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupData; + /** + * + * The client url of the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the name of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: string; + /** + * + * The web url of the page. Read only + * + * [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 + * + * [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. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisData; + /** + * + * Gets the section that contains the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionData; + /** + * + * Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: string; + /** + * + * The client url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * + * Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title?: string; + /** + * + * The web url of the page. Read only + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageData; + /** + * + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkData; + /** + * + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineData; + /** + * + * Gets the page that contains the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageData; + /** + * + * Gets the ID of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + top?: number; + /** + * + * Gets the type of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: string; + } + /** 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 PageContent object that contains the Outline. This object defines the position of the Outline on the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentData; + /** + * + * Gets the collection of Paragraph objects in the Outline. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * + * Gets the ID of the Outline object. Read-only. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordData[]; + /** + * + * Gets the Outline object that contains the Paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineData; + /** + * + * The collection of paragraphs under this paragraph. Read only + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraphOrNull?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCell?: OneNote.Interfaces.TableCellData; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCellOrNull?: OneNote.Interfaces.TableCellData; + /** + * + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableData; + /** + * + * Gets the ID of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the type of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: string; + } + /** 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. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the status of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + status?: string; + /** + * + * Gets the type of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: string; + } + /** An interface describing the data returned by calling "richText.toJSON()". */ + interface RichTextData { + /** + * + * Gets the Paragraph object that contains the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the ID of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * The language id of the text. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * + * Gets the text content of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "image.toJSON()". */ + interface ImageData { + /** + * + * 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. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentData; + /** + * + * Gets the Paragraph object that contains the Image. Throws if the Image is not a direct child of a Paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets or sets the description of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * + * Gets or sets the height of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * + * Gets or sets the hyperlink of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets the ID of the Image object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + ocrData?: OneNote.ImageOcrData; + /** + * + * Gets or sets the width of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling "table.toJSON()". */ + interface TableData { + /** + * + * Gets the Paragraph object that contains the Table object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets all of the table rows. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * + * Gets the number of columns in the table. + * + * [Api set: OneNoteApi 1.1] + */ + columnCount?: number; + /** + * + * Gets the ID of the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the number of rows in the table. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellData[]; + /** + * + * Gets the parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentTable?: OneNote.Interfaces.TableData; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellCount?: number; + /** + * + * Gets the ID of the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentRow?: OneNote.Interfaces.TableRowData; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: number; + /** + * + * Gets the ID of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: number; + /** + * + * Gets and sets the shading color of the cell + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + interface ApplicationLoadOptions { + $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. + * + * [Api set: OneNoteApi 1.1] + */ + notebooks?: OneNote.Interfaces.NotebookCollectionLoadOptions; + } + /** + * + * Represents ink analysis data for a given set of ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLoadOptions { + $all?: boolean; + /** + * + * Gets the parent page object. + * + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageLoadOptions; + /** + * + * Gets the ink analysis paragraphs in this page. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions; + /** + * + * Gets the ID of the InkAnalysis object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents ink analysis data for an identified paragraph formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphLoadOptions { + $all?: boolean; + /** + * + * Reference to the parent InkAnalysisPage. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * + * Gets the ink analysis lines in this ink analysis paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a collection of InkAnalysisParagraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Reference to the parent InkAnalysisPage. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents ink analysis data for an identified text line formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineLoadOptions { + $all?: boolean; + /** + * + * Reference to the parent InkAnalysisParagraph. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions; + /** + * + * Gets the ink analysis words in this ink analysis line. + * + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a collection of InkAnalysisLine objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Reference to the parent InkAnalysisParagraph. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisLine object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents ink analysis data for an identified word formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordLoadOptions { + $all?: boolean; + /** + * + * Reference to the parent InkAnalysisLine. + * + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: boolean; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a collection of InkAnalysisWord objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Reference to the parent InkAnalysisLine. + * + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The id of the recognized language in this inkAnalysisWord. Read-only. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a group of ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface FloatingInkLoadOptions { + $all?: boolean; + /** + * + * Gets the strokes of the FloatingInk object. + * + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeCollectionLoadOptions; + /** + * + * Gets the PageContent parent of the FloatingInk object. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * + * Gets the ID of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a single stroke of ink. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeLoadOptions { + $all?: boolean; + /** + * + * Gets the ID of the InkStroke object. + * + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * + * Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a collection of InkStroke objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. + * + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * A container for the ink in a word in a paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkWordLoadOptions { + $all?: boolean; + /** + * + * The parent paragraph containing the ink word. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the ID of the InkWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * The id of the recognized language in this ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a collection of InkWord objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkWordCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The parent paragraph containing the ink word. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkWord object. Read-only. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a OneNote notebook. Notebooks contain section groups and sections. + * + * [Api set: OneNoteApi 1.1] + */ + interface NotebookLoadOptions { + $all?: boolean; + /** + * + * The section groups in the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * + * The the sections of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * + * The client url of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the name of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a collection of notebooks. + * + * [Api set: OneNoteApi 1.1] + */ + interface NotebookCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The section groups in the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The the sections of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * + * For EACH ITEM in the collection: The client url of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the name of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a OneNote section group. Section groups can contain sections and other section groups. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupLoadOptions { + $all?: boolean; + /** + * + * Gets the notebook that contains the section group. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * The collection of section groups in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * + * The collection of sections in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * The client url of the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the name of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a collection of section groups. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the notebook that contains the section group. + * + * [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. + * + * [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. + * + * [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 + * + * [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 + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The client url of the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the name of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a OneNote section. Sections can contain pages. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionLoadOptions { + $all?: boolean; + /** + * + * Gets the notebook that contains the section. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * + * The collection of pages in the section. Read only + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * The client url of the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the name of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * + * Represents a collection of sections. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the notebook that contains the section. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * + * For EACH ITEM in the collection: The collection of pages in the section. Read only + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * For EACH ITEM in the collection: The client url of the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the name of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * + * Represents a OneNote page. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageLoadOptions { + $all?: boolean; + /** + * + * The collection of PageContent objects on the page. Read only + * + * [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. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * + * Gets the section that contains the page. + * + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * + * Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * + * The client url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * + * Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * + * Represents a collection of pages. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The collection of PageContent objects on the page. Read only + * + * [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. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the section that contains the page. + * + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * + * For EACH ITEM in the collection: The client url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * + * For EACH ITEM in the collection: The web url of the page. Read only + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageContentLoadOptions { + $all?: boolean; + /** + * + * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * Gets the page that contains the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * + * Gets the ID of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left?: boolean; + /** + * + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * + * Gets the type of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents the contents of a page, as a collection of PageContent objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageContentCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the page that contains the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the PageContent object. Read-only. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the type of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a container for Paragraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface OutlineLoadOptions { + $all?: boolean; + /** + * + * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * + * Gets the collection of Paragraph objects in the Outline. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * Gets the ID of the Outline object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphLoadOptions { + $all?: boolean; + /** + * + * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * + * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * + * Gets the Outline object that contains the Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * The collection of paragraphs under this paragraph. Read only + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCellOrNull?: OneNote.Interfaces.TableCellLoadOptions; + /** + * + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. + * + * [Api set: OneNoteApi 1.1] + */ + richText?: OneNote.Interfaces.RichTextLoadOptions; + /** + * + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * + * Gets the ID of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the type of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a collection of Paragraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the Outline object that contains the Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * For EACH ITEM in the collection: The collection of paragraphs under this paragraph. Read only + * + * [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. + * + * [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. + * + * [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. + * + * [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. + * + * [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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the type of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * A container for the NoteTag in a paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface NoteTagLoadOptions { + $all?: boolean; + /** + * + * Gets the Id of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the status of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + status?: boolean; + /** + * + * Gets the type of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a RichText object in a Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface RichTextLoadOptions { + $all?: boolean; + /** + * + * Gets the Paragraph object that contains the RichText object. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the ID of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * The language id of the text. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * + * Gets the text content of the RichText object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + interface ImageLoadOptions { + $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. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets or sets the description of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + description?: boolean; + /** + * + * Gets or sets the height of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + height?: boolean; + /** + * + * Gets or sets the hyperlink of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: boolean; + /** + * + * Gets the ID of the Image object. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + ocrData?: boolean; + /** + * + * Gets or sets the width of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + width?: boolean; + } + /** + * + * Represents a table in a OneNote page. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Gets the Paragraph object that contains the Table object. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets all of the table rows. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * + * Gets the number of columns in the table. + * + * [Api set: OneNoteApi 1.1] + */ + columnCount?: boolean; + /** + * + * Gets the ID of the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the number of rows in the table. + * + * [Api set: OneNoteApi 1.1] + */ + rowCount?: boolean; + } + /** + * + * Represents a row in a table. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableRowLoadOptions { + $all?: boolean; + /** + * + * Gets the cells in the row. + * + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * + * Gets the parent table. + * + * [Api set: OneNoteApi 1.1] + */ + parentTable?: OneNote.Interfaces.TableLoadOptions; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * + * Gets the ID of the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * + * Contains a collection of TableRow objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the cells in the row. + * + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent table. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the row. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * + * Represents a cell in a OneNote table. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableCellLoadOptions { + $all?: boolean; + /** + * + * Gets the collection of Paragraph objects in the TableCell. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * Gets the parent row of the cell. + * + * [Api set: OneNoteApi 1.1] + */ + parentRow?: OneNote.Interfaces.TableRowLoadOptions; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * + * Gets the ID of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * + * Gets and sets the shading color of the cell + * + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: boolean; + } + /** + * + * Contains a collection of TableCell objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableCellCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the collection of Paragraph objects in the TableCell. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the cell. Read-only. + * + * [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. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the shading color of the cell + * + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: boolean; + } + } } declare namespace OneNote { class RequestContext extends OfficeExtension.ClientRequestContext { - private m_onenote; constructor(url?: string); - application: Application; + readonly application: Application; } /** - * Executes a batch script that performs actions on the OneNote object model. 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 OneNote application. Since the Office add-in and the WoOneNote 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + * 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; } @@ -22368,8 +42188,6 @@ declare namespace OneNote { /////////////////////// Begin Visio APIs /////////////////////// //////////////////////////////////////////////////////////////// - - declare namespace Visio { /** * @@ -23560,7 +43378,7 @@ declare namespace Visio { var notImplemented: string; var unsupportedOperation: string; } - module Interfaces { + namespace Interfaces { interface CollectionLoadOptions { $top?: number; $skip?: number; @@ -24576,7 +44394,7 @@ declare namespace Visio { } } } -declare module Visio { +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. */ @@ -24588,29 +44406,28 @@ declare module Visio { * 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + 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 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(contextObject: OfficeExtension.ClientRequestContext, 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) => OfficeExtension.IPromise): OfficeExtension.IPromise; + function run(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise): Promise; } - //////////////////////////////////////////////////////////////// //////////////////////// End Visio APIs //////////////////////// -//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/types/office-js/office-js-tests.ts b/types/office-js/office-js-tests.ts index f96873fe90..f6ebe63a96 100644 --- a/types/office-js/office-js-tests.ts +++ b/types/office-js/office-js-tests.ts @@ -37,7 +37,7 @@ function test_excel() { ["Female", 14] ]; - var chart = sheet.charts.add(Excel.ChartType._3DColumn, range, "auto"); + var chart = sheet.charts.add(Excel.ChartType._3DColumn, range, "Auto"); chart.format.fill.setSolidColor("F8F8FF"); @@ -46,7 +46,7 @@ function test_excel() { chart.title.format.font.size = 18; chart.title.format.font.color = "568568"; - chart.legend.position = "right"; + chart.legend.position = "Right"; chart.legend.format.font.name = "Algerian"; chart.legend.format.font.size = 13; @@ -165,9 +165,9 @@ function test_word() { myContentControl.tag = 'Customer-Address'; myContentControl.title = 'Enter Customer Address Here:'; myContentControl.style = 'Heading 2'; - myContentControl.insertText('One Microsoft Way, Redmond, WA 98052', 'replace'); + myContentControl.insertText('One Microsoft Way, Redmond, WA 98052', 'Replace'); myContentControl.cannotEdit = true; - myContentControl.appearance = 'tags'; + myContentControl.appearance = 'Tags'; // Queue a command to load the id property for the content control you created. context.load(myContentControl, 'id'); @@ -265,3 +265,54 @@ function test_shared() { } ); } + +async function test_visio() { + const url = "someurl"; + + try { + const session = new OfficeExtension.EmbeddedSession(url, { id: "embed-iframe", container: document.getElementById("iframeHost") }); + await session.init(); + await Visio.run(session, async context => { + const eventResult = context.document.onPageLoadComplete.add(async args => { + console.log(Date.now() + ": Page Load Complete Event: " + JSON.stringify(args)); + }); + await context.sync(); + console.log("Success"); + }); + } catch (error) { + if (error instanceof OfficeExtension.Error) { + console.log("Debug info: " + JSON.stringify(error.debugInfo)); + } + } +} + +function test_OfficePromise() { + let p1: Promise = Excel.run(async () => { return 10 }); + let p2: Promise = new OfficeExtension.Promise(resolve => setTimeout(resolve, 1000)); + let p3: Promise = new Office.Promise(resolve => setTimeout(resolve, 1000)); + let p4: OfficeExtension.IPromise = new OfficeExtension.Promise(resolve => setTimeout(resolve, 1000)); +} + +async function test_interfaces() { + await Excel.run(async context => { + let range = context.workbook.getSelectedRange(); + range.set({ + values: [["Hi"]], + format: { + fill: { + color: "red" + } + } + }); + + let rangeSettables: Excel.Interfaces.RangeUpdateData = { + values: [["Hi"]], + format: { + fill: { + color: "red" + } + } + }; + range.set(rangeSettables); + }); +} From 01d6a921e3a17548c0133ec5c738fb8eed5dccde Mon Sep 17 00:00:00 2001 From: Olegs Jeremejevs Date: Fri, 11 May 2018 22:19:24 +0300 Subject: [PATCH 04/15] webpack: Fix some problems introduced in #25566 (#25691) --- types/webpack/index.d.ts | 114 +++++++++++++++------------------ types/webpack/webpack-tests.ts | 34 ++++++++++ 2 files changed, 84 insertions(+), 64 deletions(-) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index 05113ea6d4..5be4abdcbd 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -253,7 +253,7 @@ declare namespace webpack { * Defaults to `["browser", "module", "main"]` or `["module", "main"]`, * depending on the value of the `target` `Configuration` value. */ - mainFields?: string[]; + mainFields?: string[] | string[][]; /** * A list of fields in a package description object to try to parse @@ -264,7 +264,7 @@ declare namespace webpack { * * @see alias */ - aliasFields?: string[]; + aliasFields?: string[] | string[][]; /** * A list of file names to search for when requiring directories that @@ -368,15 +368,16 @@ declare namespace webpack { system?: boolean; } - type RuleSetCondition = string - | { - [k: string]: any; - } + type RuleSetCondition = + | RegExp + | string + | ((path: string) => boolean) + | RuleSetConditions | { /** * Logical AND */ - and?: RuleSetConditions; + and?: RuleSetCondition[]; /** * Exclude all modules matching any of these conditions */ @@ -388,17 +389,19 @@ declare namespace webpack { /** * Logical NOT */ - not?: RuleSetConditions; + not?: RuleSetCondition[]; /** * Logical OR */ - or?: RuleSetConditions; + or?: RuleSetCondition[]; /** * Exclude all modules matching any of these conditions */ test?: RuleSetCondition; }; - type RuleSetConditions = RuleSetCondition[]; + + // A hack around circular type referencing + interface RuleSetConditions extends Array {} interface RuleSetRule { /** @@ -408,25 +411,19 @@ declare namespace webpack { /** * Shortcut for resource.exclude */ - exclude?: RuleSetCondition & { - [k: string]: any; - }; + exclude?: RuleSetCondition; /** * Shortcut for resource.include */ - include?: RuleSetCondition & { - [k: string]: any; - }; + include?: RuleSetCondition; /** * Match the issuer of the module (The module pointing to this module) */ - issuer?: RuleSetCondition & { - [k: string]: any; - }; + issuer?: RuleSetCondition; /** * Shortcut for use.loader */ - loader?: RuleSetLoader | RuleSetUse; + loader?: RuleSetUse; /** * Shortcut for use.loader */ @@ -434,7 +431,7 @@ declare namespace webpack { /** * Only execute the first matching rule in this array */ - oneOf?: RuleSetRules; + oneOf?: RuleSetRule[]; /** * Shortcut for use.options */ @@ -442,9 +439,7 @@ declare namespace webpack { /** * Options for parsing */ - parser?: { - [k: string]: any; - }; + parser?: { [k: string]: any }; /** * Options for the resolver */ @@ -464,9 +459,7 @@ declare namespace webpack { /** * Match the resource path of the module */ - resource?: RuleSetCondition & { - [k: string]: any; - }; + resource?: RuleSetCondition; /** * Match the resource query of the module */ @@ -478,56 +471,49 @@ declare namespace webpack { /** * Match and execute these rules when this rule is matched */ - rules?: RuleSetRules; + rules?: RuleSetRule[]; /** * Shortcut for resource.test */ - test?: RuleSetCondition & { - [k: string]: any; - }; + test?: RuleSetCondition; /** * Modifiers applied to the module when rule is matched */ use?: RuleSetUse; } - type RuleSetLoader = string; + type RuleSetUse = | RuleSetUseItem - | { - [k: string]: any; - } - | RuleSetUseItem[]; + | RuleSetUseItem[] + | ((data: any) => RuleSetUseItem | RuleSetUseItem[]); + + interface RuleSetLoader { + /** + * Loader name + */ + loader?: string; + /** + * Loader options + */ + options?: RuleSetQuery; + /** + * Unique loader identifier + */ + ident?: string; + /** + * Loader query + */ + query?: RuleSetQuery; + } + type RuleSetUseItem = + | string | RuleSetLoader - | { - [k: string]: any; - } - | { - /** - * Loader name - */ - loader?: RuleSetLoader; - /** - * Loader options - */ - options?: RuleSetQuery; - /** - * Unique loader identifier - */ - ident?: string; - /** - * Loader query - */ - query?: RuleSetQuery; - }; + | ((data: any) => string | RuleSetLoader); + type RuleSetQuery = - | { - [k: string]: any; - } - | string; - type CommonArrayOfStringOrStringArrayValues = Array<(string | string[])>; - type CommonArrayOfStringValues = string[]; - type RuleSetRules = RuleSetRule[]; + | string + | { [k: string]: any }; /** * @deprecated Use RuleSetCondition instead diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index 803e227c4a..b42d836c0c 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -698,3 +698,37 @@ configuration = { ] } }; + +configuration = { + module: { + rules: [ + { + test: /\.ts$/, + include: '/foo/bar', + exclude: path => path.startsWith('/foo'), + resourceQuery: ['foo', 'bar'], + resolve: { + mainFields: ['foo'], + aliasFields: [['bar']], + }, + loader: 'foo-loader', + loaders: [ + 'foo-loader', + { + loader: 'bar-loader', + query: 'baz' + } + ], + use: () => ([ + 'foo-loader', + { + loader: 'bar-loader', + query: { + baz: 'qux' + } + }, + ]) + } + ] + } +}; From ca6596df7aa5d3d529666f3874aee232f6f8c635 Mon Sep 17 00:00:00 2001 From: Steven Zeck Date: Fri, 11 May 2018 14:20:42 -0500 Subject: [PATCH 05/15] [cosmiconfig] update definitions for v5 (#25624) * [cosmiconfig] update definitions for v5 * Move v4 files into v4 directory * Make recommended changes, use exported interfaces and functions * Remove sample-config.json file * Change config from type to interface --- types/cosmiconfig/cosmiconfig-tests.ts | 52 +++++--------- types/cosmiconfig/index.d.ts | 87 +++++++++++------------ types/cosmiconfig/v4/cosmiconfig-tests.ts | 41 +++++++++++ types/cosmiconfig/v4/index.d.ts | 63 ++++++++++++++++ types/cosmiconfig/v4/tsconfig.json | 19 +++++ types/cosmiconfig/v4/tslint.json | 1 + 6 files changed, 182 insertions(+), 81 deletions(-) create mode 100644 types/cosmiconfig/v4/cosmiconfig-tests.ts create mode 100644 types/cosmiconfig/v4/index.d.ts create mode 100644 types/cosmiconfig/v4/tsconfig.json create mode 100644 types/cosmiconfig/v4/tslint.json diff --git a/types/cosmiconfig/cosmiconfig-tests.ts b/types/cosmiconfig/cosmiconfig-tests.ts index 2676c58407..632569c6f9 100644 --- a/types/cosmiconfig/cosmiconfig-tests.ts +++ b/types/cosmiconfig/cosmiconfig-tests.ts @@ -1,41 +1,23 @@ -import cosmiconfig = require("cosmiconfig"); +import cosmiconfig, { CosmiconfigResult } from "cosmiconfig"; +import * as path from "path"; -const asyncExplorer = cosmiconfig("yourModuleName", { - packageProp: "yourModuleName", - rc: ".yourModuleNamerc", - js: "yourModuleName.config.js", - rcStrictJson: false, - rcExtensions: false, - stopDir: "someDir", - cache: true, - sync: false, - transform: ({ config, filePath }) => ({ config, filePath }), - format: "js" +const explorer = cosmiconfig("yourModuleName", { + searchPlaces: [], + loaders: {}, + packageProp: "yourModuleName", + stopDir: "someDir", + cache: true, + transform: (result: CosmiconfigResult) => result, + ignoreEmptySearchPlaces: false, }); Promise.all([ - asyncExplorer.load(), - asyncExplorer.load("start/search/here"), - asyncExplorer.load(null, "load/this/file.json") + explorer.search(path.join(__dirname)), + explorer.searchSync(path.join(__dirname)), + explorer.load(path.join(__dirname, "sample-config.json")), + explorer.loadSync(path.join(__dirname, "sample-config.json")), ]).then(result => result); -asyncExplorer.load().then(({ config, filePath }) => ({ config, filePath })); - -asyncExplorer.clearFileCache(); -asyncExplorer.clearDirectoryCache(); -asyncExplorer.clearCaches(); - -const syncExplorer = cosmiconfig("yourModuleName", { - packageProp: "yourModuleName", - rc: ".yourModuleNamerc", - js: "yourModuleName.config.js", - rcStrictJson: false, - rcExtensions: false, - stopDir: "someDir", - cache: true, - sync: true, - transform: ({ config, filePath }) => ({ config, filePath }), - format: "js" -}); - -const { config, filePath } = syncExplorer.load(); +explorer.clearLoadCache(); +explorer.clearSearchCache(); +explorer.clearCaches(); diff --git a/types/cosmiconfig/index.d.ts b/types/cosmiconfig/index.d.ts index 032f570d6f..bdafc922ec 100644 --- a/types/cosmiconfig/index.d.ts +++ b/types/cosmiconfig/index.d.ts @@ -1,63 +1,58 @@ -// Type definitions for cosmiconfig 4.0 +// Type definitions for cosmiconfig 5.0 // Project: https://github.com/davidtheclark/cosmiconfig // Definitions by: ozum +// szeck87 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -interface Result { - config: object; - filePath: string; +/// + +export interface Config { + [key: string]: any; } -interface Options { - packageProp?: string | false; - rc?: string | false; - js?: string | false; - rcStrictJson?: boolean; - rcExtensions?: boolean; - stopDir?: string; - cache?: boolean; - transform?: (result: Result) => Promise | Result; - configPath?: string; - format?: "json" | "yaml" | "js"; +export type CosmiconfigResult = { + config: Config; + filePath: string; + isEmpty?: boolean; +} | null; + +export interface LoaderResult { + config: Config | null; + filepath: string; } -// Default is false and makes load() method async -interface AsyncOptions extends Options { - sync?: false; +export type SyncLoader = (filepath: string, content: string) => Config | null; +export type AsyncLoader = (filepath: string, content: string) => Config | null | Promise; + +export interface LoaderEntry { + sync?: SyncLoader; + async?: AsyncLoader; } -// Makes load() method sync -interface SyncOptions extends Options { - sync: true; +export interface Loaders { + [key: string]: LoaderEntry; } -interface Explorer { - clearFileCache(): void; - clearDirectoryCache(): void; - clearCaches(): void; +export interface Explorer { + search(searchFrom: string): Promise; + searchSync(searchFrom: string): null | CosmiconfigResult; + load(loadPath: string): Promise; + loadSync(loadPath: string): CosmiconfigResult; + clearLoadCache(): void; + clearSearchCache(): void; + clearCaches(): void; } -interface AsyncExplorer extends Explorer { - // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. - load(searchPath?: string): Promise; - load(searchPath: null | undefined, configPath?: string): Promise; +// These are the user options with defaults applied. +export interface ExplorerOptions { + stopDir?: string; + cache?: boolean; + transform?: (result: CosmiconfigResult) => Promise | CosmiconfigResult; + packageProp?: string; + loaders?: Loaders; + searchPlaces?: string[]; + ignoreEmptySearchPlaces?: boolean; } -interface SyncExplorer extends Explorer { - // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. - load(searchPath?: string): Result; - load(searchPath: null | undefined, configPath?: string): Result; -} - -declare function cosmiconfig( - moduleName: string, - options: SyncOptions -): SyncExplorer; - -declare function cosmiconfig( - moduleName: string, - options?: AsyncOptions -): AsyncExplorer; - -export = cosmiconfig; +export default function cosmiconfig(moduleName: string, options: ExplorerOptions): Explorer; diff --git a/types/cosmiconfig/v4/cosmiconfig-tests.ts b/types/cosmiconfig/v4/cosmiconfig-tests.ts new file mode 100644 index 0000000000..2676c58407 --- /dev/null +++ b/types/cosmiconfig/v4/cosmiconfig-tests.ts @@ -0,0 +1,41 @@ +import cosmiconfig = require("cosmiconfig"); + +const asyncExplorer = cosmiconfig("yourModuleName", { + packageProp: "yourModuleName", + rc: ".yourModuleNamerc", + js: "yourModuleName.config.js", + rcStrictJson: false, + rcExtensions: false, + stopDir: "someDir", + cache: true, + sync: false, + transform: ({ config, filePath }) => ({ config, filePath }), + format: "js" +}); + +Promise.all([ + asyncExplorer.load(), + asyncExplorer.load("start/search/here"), + asyncExplorer.load(null, "load/this/file.json") +]).then(result => result); + +asyncExplorer.load().then(({ config, filePath }) => ({ config, filePath })); + +asyncExplorer.clearFileCache(); +asyncExplorer.clearDirectoryCache(); +asyncExplorer.clearCaches(); + +const syncExplorer = cosmiconfig("yourModuleName", { + packageProp: "yourModuleName", + rc: ".yourModuleNamerc", + js: "yourModuleName.config.js", + rcStrictJson: false, + rcExtensions: false, + stopDir: "someDir", + cache: true, + sync: true, + transform: ({ config, filePath }) => ({ config, filePath }), + format: "js" +}); + +const { config, filePath } = syncExplorer.load(); diff --git a/types/cosmiconfig/v4/index.d.ts b/types/cosmiconfig/v4/index.d.ts new file mode 100644 index 0000000000..032f570d6f --- /dev/null +++ b/types/cosmiconfig/v4/index.d.ts @@ -0,0 +1,63 @@ +// Type definitions for cosmiconfig 4.0 +// Project: https://github.com/davidtheclark/cosmiconfig +// Definitions by: ozum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +interface Result { + config: object; + filePath: string; +} + +interface Options { + packageProp?: string | false; + rc?: string | false; + js?: string | false; + rcStrictJson?: boolean; + rcExtensions?: boolean; + stopDir?: string; + cache?: boolean; + transform?: (result: Result) => Promise | Result; + configPath?: string; + format?: "json" | "yaml" | "js"; +} + +// Default is false and makes load() method async +interface AsyncOptions extends Options { + sync?: false; +} + +// Makes load() method sync +interface SyncOptions extends Options { + sync: true; +} + +interface Explorer { + clearFileCache(): void; + clearDirectoryCache(): void; + clearCaches(): void; +} + +interface AsyncExplorer extends Explorer { + // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. + load(searchPath?: string): Promise; + load(searchPath: null | undefined, configPath?: string): Promise; +} + +interface SyncExplorer extends Explorer { + // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. + load(searchPath?: string): Result; + load(searchPath: null | undefined, configPath?: string): Result; +} + +declare function cosmiconfig( + moduleName: string, + options: SyncOptions +): SyncExplorer; + +declare function cosmiconfig( + moduleName: string, + options?: AsyncOptions +): AsyncExplorer; + +export = cosmiconfig; diff --git a/types/cosmiconfig/v4/tsconfig.json b/types/cosmiconfig/v4/tsconfig.json new file mode 100644 index 0000000000..f0c8707c16 --- /dev/null +++ b/types/cosmiconfig/v4/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": ["../../"], + "paths": { + "cosmiconfig": [ "cosmiconfig/v4" ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "cosmiconfig-tests.ts"] +} diff --git a/types/cosmiconfig/v4/tslint.json b/types/cosmiconfig/v4/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cosmiconfig/v4/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 11a43248e5e3469025d164c00e18edf4188b9c39 Mon Sep 17 00:00:00 2001 From: TheAppleFreak Date: Fri, 11 May 2018 15:21:21 -0400 Subject: [PATCH 06/15] @types/snoowrap - Make RedditContent thenable (#25683) * Makes RedditContent derivatives Thenable * Makes RedditContent thenable * Added test --- types/snoowrap/dist/objects/RedditContent.d.ts | 2 +- types/snoowrap/index.d.ts | 3 ++- types/snoowrap/snoowrap-tests.ts | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/snoowrap/dist/objects/RedditContent.d.ts b/types/snoowrap/dist/objects/RedditContent.d.ts index 9efd97822b..30f82ab72b 100644 --- a/types/snoowrap/dist/objects/RedditContent.d.ts +++ b/types/snoowrap/dist/objects/RedditContent.d.ts @@ -1,6 +1,6 @@ import * as Snoowrap from '../..'; -export default class RedditContent { +export default class RedditContent extends Promise { created_utc: number; created: number; id: string; diff --git a/types/snoowrap/index.d.ts b/types/snoowrap/index.d.ts index e80814d6f9..a2a36ff58e 100644 --- a/types/snoowrap/index.d.ts +++ b/types/snoowrap/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for snoowrap 1.14 +// Type definitions for snoowrap 1.15 // Project: https://github.com/not-an-aardvark/snoowrap // Definitions by: Vito Samson +// TheAppleFreak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/snoowrap/snoowrap-tests.ts b/types/snoowrap/snoowrap-tests.ts index afa9a46fa2..dac5233653 100644 --- a/types/snoowrap/snoowrap-tests.ts +++ b/types/snoowrap/snoowrap-tests.ts @@ -50,3 +50,7 @@ export function wiki(subreddit: string, page: string): WikiPage { export function getNewComments(subreddit: string): Listing { return r.getNewComments(subreddit); } + +export function thenable(): Promise { + return r.getMe().then(me => me.name); +} From 3e13aec055cd43183dd0ddc62434389cb376fb45 Mon Sep 17 00:00:00 2001 From: Ifiok Jr Date: Fri, 11 May 2018 20:27:17 +0100 Subject: [PATCH 07/15] add type definition for react-native-indicators (#25612) --- types/react-native-indicators/index.d.ts | 211 ++++++++++++++++++ .../react-native-indicators-tests.tsx | 14 ++ types/react-native-indicators/tsconfig.json | 24 ++ types/react-native-indicators/tslint.json | 1 + 4 files changed, 250 insertions(+) create mode 100644 types/react-native-indicators/index.d.ts create mode 100644 types/react-native-indicators/react-native-indicators-tests.tsx create mode 100644 types/react-native-indicators/tsconfig.json create mode 100644 types/react-native-indicators/tslint.json diff --git a/types/react-native-indicators/index.d.ts b/types/react-native-indicators/index.d.ts new file mode 100644 index 0000000000..ee4a13a4c2 --- /dev/null +++ b/types/react-native-indicators/index.d.ts @@ -0,0 +1,211 @@ +// Type definitions for react-native-indicators 0.13 +// Project: https://github.com/n4kz/react-native-indicators#readme +// Definitions by: Ifiok Jr. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component } from 'react'; +import { Animated, EasingFunction } from 'react-native'; +export interface BaseIndicatorProps { + /** + * Animation easing function + * @default Easing.linear + */ + animationEasing?: EasingFunction; + + /** + * Animation duration in ms + * @default1200 + */ + animationDuration?: number; +} + +export interface UIActivityIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + /** + * Component count + * @default 12 + */ + count?: number; + /** + * Base component size + * @default 40 + */ + size?: number; +} + +export class UIActivityIndicator extends Component< + UIActivityIndicatorProps +> {} + +export interface BallIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + /** + * Component count + * @default 8 + */ + count?: number; + /** + * Base component size + * @default 40 + */ + size?: number; +} + +export class BallIndicator extends Component {} + +export interface BarIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + /** + * Component count + * @default 3 + */ + count?: number; + /** + * Base component size + * @default 40 + */ + size?: number; +} + +export class BarIndicator extends Component {} + +export interface DotIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + /** + * Component count + * @default 4 + */ + count?: number; + /** + * Base component size + * @default 16 + */ + size?: number; +} + +export class DotIndicator extends Component {} + +export interface MaterialIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + + /** + * Base component size + * @default 40 + */ + size?: number; +} + +export class MaterialIndicator extends Component {} + +export interface PulseIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + + /** + * Base component size + * @default 40 + */ + size?: number; +} + +export class PulseIndicator extends Component {} + +export interface PacmanIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + + /** + * Base component size + * @default 48 + */ + size?: number; +} + +export class PacmanIndicator extends Component {} + +export interface SkypeIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + /** + * Component count + * @default 5 + */ + count?: number; + /** + * Base component size + * @default 40 + */ + size?: number; + /** + * Minimum component scale + * @default 0.2 + */ + minScale?: number; + /** + * Maximum component scale + * @default 1.0 + */ + maxScale?: number; +} + +export class SkypeIndicator extends Component {} + +export interface WaveIndicatorProps extends BaseIndicatorProps { + /** + * Component color + * @default 'rgb(0, 0, 0)' + */ + color?: string; + /** + * Component count + * @default 4 + */ + count?: number; + /** + * Base component size + * @default 40 + */ + size?: number; + /** + * Minimum component scale + * @default 0.54 + */ + waveFactor?: number; + /** + * Maximum component scale + * @default 'fill' + */ + waveMode?: 'fill' | 'outline'; +} + +export class WaveIndicator extends Component {} diff --git a/types/react-native-indicators/react-native-indicators-tests.tsx b/types/react-native-indicators/react-native-indicators-tests.tsx new file mode 100644 index 0000000000..c3b11151f3 --- /dev/null +++ b/types/react-native-indicators/react-native-indicators-tests.tsx @@ -0,0 +1,14 @@ +import * as React from 'react'; +import { + DotIndicator, +} from 'react-native-indicators'; + +class Example extends React.Component { + render() { + return ( + + + + ); + } +} diff --git a/types/react-native-indicators/tsconfig.json b/types/react-native-indicators/tsconfig.json new file mode 100644 index 0000000000..ee6af547c4 --- /dev/null +++ b/types/react-native-indicators/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-native-indicators-tests.tsx" + ] +} diff --git a/types/react-native-indicators/tslint.json b/types/react-native-indicators/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-indicators/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9a7ca607f53f7e84c9004ae38a985fb4817f58b6 Mon Sep 17 00:00:00 2001 From: Saffa Shujah Date: Sat, 12 May 2018 00:29:30 +0500 Subject: [PATCH 08/15] Update index.d.ts (#25675) Avatar and Image type are diff but the styling is different and the alt attribute is required for Image type. --- types/rebass/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/rebass/index.d.ts b/types/rebass/index.d.ts index 9a4dbb34e5..53ec01bf87 100644 --- a/types/rebass/index.d.ts +++ b/types/rebass/index.d.ts @@ -48,6 +48,14 @@ export interface AvatarProps extends BaseProps { type AvatarClass = React.StatelessComponent export declare const Avatar: AvatarClass; +export interface ImageProps extends BaseProps { + size?: number; + src?: string; + alt?: string; +} +type ImageClass = React.StatelessComponent +export declare const Image: ImageClass; + export interface BadgeProps extends BaseProps { theme?: "primary" | "secondary" | "default" | "info" | "success" | "warning" | "error"; rounded?: boolean | "top" | "right" | "bottom" | "left"; From 30208d0b82d0f6799d19c625437dfabfc99a268b Mon Sep 17 00:00:00 2001 From: Ika Date: Sat, 12 May 2018 03:41:43 +0800 Subject: [PATCH 09/15] feat(lazy-value): initial commit (#25699) * feat(lazy-value): initial commit * docs: add docs --- types/lazy-value/index.d.ts | 15 +++++++++++++++ types/lazy-value/lazy-value-tests.ts | 8 ++++++++ types/lazy-value/tsconfig.json | 23 +++++++++++++++++++++++ types/lazy-value/tslint.json | 3 +++ 4 files changed, 49 insertions(+) create mode 100644 types/lazy-value/index.d.ts create mode 100644 types/lazy-value/lazy-value-tests.ts create mode 100644 types/lazy-value/tsconfig.json create mode 100644 types/lazy-value/tslint.json diff --git a/types/lazy-value/index.d.ts b/types/lazy-value/index.d.ts new file mode 100644 index 0000000000..4f9ff7b564 --- /dev/null +++ b/types/lazy-value/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for lazy-value 1.0 +// Project: https://github.com/sindresorhus/lazy-value +// Definitions by: Ika +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Create a [lazily evaluated](https://en.wikipedia.org/wiki/Lazy_evaluation) value. + * + * Useful when a value is expensive to generate, so you want to delay the computation until the value is needed. + * For example, improving startup performance by deferring nonessential operations. + * + * @param fn Expected to return a value. + */ +declare function lazyValue any>(fn: T): T; +export = lazyValue; diff --git a/types/lazy-value/lazy-value-tests.ts b/types/lazy-value/lazy-value-tests.ts new file mode 100644 index 0000000000..46413ff915 --- /dev/null +++ b/types/lazy-value/lazy-value-tests.ts @@ -0,0 +1,8 @@ +import lazyValue = require("lazy-value"); + +declare function expensiveComputation(): string; +declare function doSomething(x: string): void; + +const val = lazyValue(expensiveComputation); + +doSomething(val()); diff --git a/types/lazy-value/tsconfig.json b/types/lazy-value/tsconfig.json new file mode 100644 index 0000000000..e2e784e24f --- /dev/null +++ b/types/lazy-value/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "lazy-value-tests.ts" + ] +} diff --git a/types/lazy-value/tslint.json b/types/lazy-value/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/lazy-value/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From cb5a7de8895bb5dd54c1d32c377d3cf4987ed3e0 Mon Sep 17 00:00:00 2001 From: khanhas Date: Sat, 12 May 2018 02:45:05 +0700 Subject: [PATCH 10/15] [@types/proton-native] Add types for proton-native (#25705) * Add types for proton-native * Fixed `export` --- types/proton-native/index.d.ts | 838 +++++++++++++++++++++++++++++ types/proton-native/test/index.tsx | 72 +++ types/proton-native/tsconfig.json | 24 + types/proton-native/tslint.json | 3 + 4 files changed, 937 insertions(+) create mode 100644 types/proton-native/index.d.ts create mode 100644 types/proton-native/test/index.tsx create mode 100644 types/proton-native/tsconfig.json create mode 100644 types/proton-native/tslint.json diff --git a/types/proton-native/index.d.ts b/types/proton-native/index.d.ts new file mode 100644 index 0000000000..bf06ad879c --- /dev/null +++ b/types/proton-native/index.d.ts @@ -0,0 +1,838 @@ +// Type definitions for proton-native 0.55 +// Project: https://github.com/kusti8/proton-native +// Definitions by: Nguyen Xuan Khanh +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import * as React from 'react'; + +export interface AppProps { + /** + * Called when the quit menu item is called, right before the entire app quits. + */ + onShouldQuit?: () => void; +} + +/** + * The app is the container for the entire program and holds Windows and Menus. + */ +export class App extends React.Component { } + +export interface AreaBaseProps { + /** + * The fill color for the component. + */ + fill?: string; + /** + * The opacity of the fill (between 0 and 1). Gets multiplied with the fill colors alpha value. + */ + fillOpacity?: number; + /** + * The stroke (line) color for the component. + */ + stroke?: string; + + strokeLinecap?: 'flat' | 'round' | 'bevel'; + + strokeLinejoin?: 'miter' | 'round' | 'bevel'; + /** + * How far to extend the stroke at a sharp corner when using `strokeLinejoin='miter'` + * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit + * for a more detailed explanation. + */ + strokeMiterlimit?: number; + /** + * The opacity of the stroke (between 0 and 1). Gets multiplied with the stroke colors alpha value. + */ + strokeOpacity?: number; + + strokeWidth?: number; + /** + * List of transformations to apply to the component (are quite similar to SVG transformations). Example for multiple transformations: `transform="translate(100, 100) rotate(90)"`. + * + * All x and y coordinates specified in a transformation are relative _to the component itself_, meaning that `translate(-50%, 0)` will translate the component by 50% of it's own width to left. + */ + transform?: string; +} + +export interface AreaRectangleProps extends AreaBaseProps { + /** + * The height of the rectangle. + */ + height: number | string; + /** + * The width of the rectangle. + */ + width: number | string; + /** + * The x coordinate of the rectangles top left corner. + */ + x: number | string; + /** + * The y coordinate of the rectangles top left corner. + */ + y: number | string; +} + +/** + * A rectangle to be displayed in an Area component. + */ +export class AreaRectangle extends React.Component { } + +export interface AreaLineProps extends AreaBaseProps { + /** + * The x coordinate of the line's start point. + */ + x1: number | string; + /** + * The x coordinate of the line's end point. + */ + x2: number | string; + /** + * The y coordinate of the line's start point. + */ + y1: number | string; + /** + * The y coordinate of the line's end point. + */ + y2: number | string; +} + +export class AreaLine extends React.Component { } + +export interface AreaCircleProps extends AreaBaseProps { + /** + * The circle's radius. Percentage values use the Area's width. + */ + r: number | string; + /** + * The x coordinate of the center of the cirle. + */ + x: number | string; + /** + * The y coordinate of the center of the cirle. + */ + y: number | string; +} + +export class AreaCircle extends React.Component { } + +export interface AreaBezierProps extends AreaBaseProps { + /** + * The x coordinate of the curve's control point at the start. + */ + cx1: number | string; + /** + * The x coordinate of the curve's control point at the end. + */ + cx2: number | string; + /** + * The y coordinate of the curve's control point at the start. + */ + cy1: number | string; + /** + * The y coordinate of the curve's control point at the end. + */ + cy2: number | string; + /** + * The x coordinate of the curve's start point. + */ + x1: number | string; + /** + * The x coordinate of the curve's end point. + */ + x2: number | string; + /** + * The y coordinate of the curve's start point. + */ + y1: number | string; + /** + * The y coordinate of the curve's end point. + */ + y2: number | string; +} + +export class AreaBezier extends React.Component { } + +export interface AreaPathProps extends AreaBaseProps { + /** + * A string describing the path (uses SVG's path syntax, explanation @see https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths). + * + * A warning is displayed whan an unimplemented shaped are used (Quadratic Beziers and Arcs). + */ + d: string; + /** + * Sets the methods how to determine wheter to fill a path. Explanation @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule. + */ + fillMode: 'nonzero' | 'evenodd'; +} + +export class AreaPath extends React.Component { } + +export interface MouseEvent { + button: number; + height: number; + width: number; + x: number; + y: number; +} + +export interface KeyboardEvent { + extKey: number; + key: string; + modifierKey: number; + modifiers: number; +} + +export interface AreaProps extends AreaBaseProps { + /** + * Called when releasing a key. Return `true` to signal that this event got handled (always returning true will disable any menu accelerators). + */ + onKeyDown?: (event: KeyboardEvent) => boolean; + /** + * Called when pressing a key. Return `true` to signal that this event got handled (always returning true will disable any menu accelerators). + */ + onKeyUp?: (event: KeyboardEvent) => boolean; + /** + * Whether the area can be seen. + */ + onMouseDown?: (event: MouseEvent) => void; + /** + * Called when the mouse enters the area. + */ + onMouseEnter?: () => void; + /** + * Called when the mouse leaves the area. + */ + onMouseLeave?: () => void; + /** + * Called when the mouse is moved over the area + */ + onMouseMove?: (event: { + buttons: ReadonlyArray; + height: number; + width: number; + x: number; + y: number; + }) => void; + /** + * **Not working at the moment.** + * + * Called when releasing a mouse button over the area. + */ + onMouseUp?: (event: MouseEvent) => void; + /** + * Whether the area can be seen. + */ + visible?: boolean; +} + +/** + * A component onto which area components like rectangles or circles can be drawn. + * + * Some props can be applied to all area components (including Area itself and children) + * @see https://proton-native.js.org/#/area_props. + */ +export class Area extends React.Component { + /** + * A Bezier curve to be displayed in an Area component. + */ + static Bezier: typeof AreaBezier; + /** + * A circle to be displayed in an Area component. + */ + static Circle: typeof AreaCircle; + /** + * A straigt line to be displayed in an Area component. + */ + static Line: typeof AreaLine; + /** + * A component describing a path to be displayed in an Area component. + * + * To be able to use percentage values in transforms, the props `width` and `height` need to be specified (they have no graphical effect). + */ + static Path: typeof AreaPath; + /** + * A rectangle to be displayed in an Area component. + */ + static Rectangle: typeof AreaRectangle; +} + +/** + * Undocumented + */ +export class AreaInternal extends React.Component { } + +export interface BoxProps { + /** + * Whether the Box is enabled. + */ + enabled?: boolean; + /** + * Whether there is extra space between the children in the Box. + */ + padded?: boolean; + /** + * Whether the Box arranges its children vertically or horizontally. + */ + vertical?: boolean; + /** + * Whether the Box and its children can be seen. + */ + visible?: boolean; +} + +export class Box extends React.Component { } + +export interface ButtonProps { + /** + * Whether the button can be clicked. + */ + enabled?: boolean; + /** + * Called when the button is clicked. + */ + onClick?: () => void; + /** + * Whether the button can be seen. + */ + visible?: boolean; +} + +/** + * A container for multiple components that are ordered vertically or horizontally. Similar to React Native's `View`. + */ +export class Button extends React.Component { } + +export interface CheckboxProps { + /** + * Whether the checkbox can be used. + */ + enabled?: boolean; + /** + * Whether the checkbox is checked or not. + */ + checked?: boolean; + /** + * Called when the checkbox is clicked. The current checkbox state is passed as an argument. + */ + onToggle?: (checked: boolean) => void; + /** + * Whether the checkbox can be seen. + */ + visible?: boolean; +} + +export class Checkbox extends React.Component { } + +export interface ColorButtonProps { + /** + * The initial color for the ColorButton. Can be passed as standard color seen in CSS (a color name, hex, rgb, rgba, hsl, hsla). + */ + color?: string; + /** + * Called when the color is changed for the ColorButton. The current color is passed as an object of RGBA. + */ + onClick?: (color: { + r: number, + g: number, + b: number, + a: number + }) => void; +} + +/** + * A button that allows the user to choose a color. + */ +export class ColorButton extends React.Component { } + +/** + * Undocumented + */ +export class Combobox extends React.Component { } + +/** + * Undocumented + */ +export class ComboboxItem extends React.Component { } + +/** + * Undocumented + */ +export class EditableCombobox extends React.Component { } + +/** + * Undocumented + */ +export class Entry extends React.Component { } + +/** + * Undocumented + */ +export class FontButton extends React.Component { } + +export interface FormProps { + /** + * Whether the Form is enabled. + */ + enabled?: boolean; + /** + * Whether there is padding between the components + */ + padded?: boolean; + /** + * Whether the Form can be seen. + */ + visible?: boolean; +} + +/** + * A container where there is a label on the left and a component on the right. + * + * Each form component has a single prop, `label` which sets the label to its left. It is required. + */ +export class Form extends React.Component { } + +export interface GridChildrenProps { + /** + * Whether the component is aligned with the other components in the column/row. + */ + align?: { + h: boolean; + v: boolean; + }; + /** + * What column the component resides in. + */ + column?: number; + /** + * Whether the component can expand in the direction. + */ + expand?: { + h: boolean; + v: boolean; + }; + /** + * What row the component resides in. + */ + row?: number; +} + +export interface GridProps { + /** + * Whether the Grid is enabled. + */ + enabled?: boolean; + /** + * Whether there is padding between the components + */ + padded?: boolean; + /** + * Whether the Grid can be seen. + */ + visible?: boolean; +} + +/** + * A grid where components can be placed in rows and columns. + */ +export class Grid extends React.Component { } + +export interface GroupProps { + /** + * Whether the Group is enabled. + */ + enabled?: boolean; + /** + * Whether there is a margin inside the group. + */ + margined?: boolean; + /** + * The name of the group. + */ + title?: string; + /** + * Whether the Grid can be seen. + */ + visible?: boolean; +} + +/** + * A named group of components. + */ +export class Group extends React.Component { } + +/** + * Undocumented + */ +export class HorizontalBox extends React.Component { } + +/** + * Undocumented + */ +export class HorizontalSeparator extends React.Component { } + +export interface MenuProps { + /** + * The name of the menu. + */ + label?: string; +} + +export interface MenuItemProps { + /** + * How the menu item is displayed. + * + * - `Check` - a checkable option in the menu. + * - `Quit` - a Quit button. This accepts no text. + * - `About` - an About button. This accepts no text. + * - `Preferences` - a Preferences button. This accepts no text. + * - `Separator` - a Separator between menu items. This accepts no text. + * - `Item` - a normal menu button. This is the default. + */ + type?: 'Check' | 'Quit' | 'About' | 'Preferences' | 'Separator' | 'Item'; + /** + * If the type is `Check`, then set whether it is checked or not. + */ + checked?: boolean; + /** + * Called when the menu item is clicked. If the type is `Check`, then it passes whether it is checked as an argument. + */ + onClick?: (checked: boolean) => void; +} + +export class MenuItem extends React.Component { } + +/** + * The top bar on a window that can have multiple options. + * + * The menu must come outside and before the Window for it to take effect. It is made up of Menu.Items. Menus can be embedded inside eachother to make sub-menus. + */ +export class Menu extends React.Component { + /** + * A single item in a Menu. + */ + static Item: typeof MenuItem; +} + +/** + * Undocumented + */ +export class MenuBar extends React.Component { } + +/** + * Undocumented + */ +export class MenuBarItem extends React.Component { } + +/** + * Undocumented + */ +export class MultilineEntry extends React.Component { } + +/** + * Undocumented + */ +export class PasswordEntry extends React.Component { } + +export interface PickerProps { + /** + * Whether the user can enter their own custom text in addition to the drop down menu. + */ + editable?: boolean; + /** + * Whether the Picker is enabled. + */ + enabled?: boolean; + /** + * When an *editable* Picker is changed. The current text is passed as an argument. + */ + onChange?: (text: string) => void; + /** + * When a *non-editable* Picker is changed. The current selection is passed as an argument. + */ + onSelect?: (selection: string) => void; + /** + * What element is selected if the picker *is not* editable. + */ + selected?: boolean; + /** + * What text is selected/typed if the picker *is* editable. + */ + text?: boolean; + /** + * Whether the Picker can be seen. + */ + visible?: boolean; +} + +/** + * A drop down menu where the user can pick different values. + */ +export class Picker extends React.Component { } + +export interface ProgressBarProps { + /** + * Whether the ProgressBar is enabled. + */ + enabled?: boolean; + /** + * The current value of the ProgressBar (0-100). A value of -1 indicates an indeterminate progressbar. + */ + value?: number; + /** + * Whether the ProgressBar can be seen. + */ + visible?: boolean; +} + +/** + * A bar that shows the progress in a certain task, 0-100. + */ +export class ProgressBar extends React.Component { } + +/** + * Undocumented + */ +export class RadioButton extends React.Component { } + +export class RadioButtonItem extends React.Component { } + +export interface RadioButtonsProps { + /** + * Whether the RadioButtons can be used. + */ + enabled?: boolean; + /** + * Called when a RadioButton is selected. The number selected is passed as an argument. + */ + onSelect?: (selected: boolean) => void; + /** + * What RadioButton is selected, zero-indexed. -1 means nothing is selected. + */ + selected?: number; + /** + * Whether the RadioButtons can be seen. + */ + visible?: boolean; +} + +/** + * A choice between multiple options. + * + * Every child must be a RadioButtons.Item, that requires a string child that is the label to display to the right of the RadioButton. + */ +export class RadioButtons extends React.Component { + static Item: typeof RadioButtonItem; +} + +export interface SeparatorProps { + /** + * Whether the Separator is enabled. + */ + enabled?: boolean; + /** + * Whether the line is vertical or horizontal. + */ + vertical?: boolean; + /** + * Whether the Separator can be seen. + */ + visible?: boolean; +} + +/** + * A line to separate two components, commonly used in a Box. + */ +export class Separator extends React.Component { } + +export interface SliderProps { + /** + * Whether the Slider is enabled. + */ + enabled?: boolean; + /** + * Called when the value of the slider is changed. The current value is passed as an argument. + */ + onChange?: (value: number) => void; + /** + * The current value of the Slider (0-100). + */ + value?: number; + /** + * Whether the Slider can be seen. + */ + visible?: boolean; +} + +/** + * A bar that can be dragged by the user from 0-100. + */ +export class Slider extends React.Component { } + +export interface SpinBoxProps { + /** + * Whether the Spinbox is enabled. + */ + enabled?: boolean; + /** + * When the Spinbox value is changed. The current value is passed as a parameter. + */ + onChange?: (value: number) => void; + /** + * What the value of the Spinbox is set to. + */ + value?: number; + /** + * Whether the Spinbox can be seen. + */ + visible?: boolean; +} + +/** + * A location for the user to choose a number. + */ +export class SpinBox extends React.Component { } + +export interface TabProps { + /** + * Whether the Tab is enabled. + */ + enabled?: boolean; + /** + * Whether the Tab can be seen. + */ + visible?: boolean; +} + +/** + * A component with different named tabs containing other components. + * + * Each child is required to have a label prop that is displayed at the top and names the tab. + */ +export class Tab extends React.Component { } + +/** + * Displays some text. + */ +export class Text extends React.Component { } + +export interface TextInputProps { + /** + * Whether the TextInput can be used. + */ + enabled?: boolean; + /** + * Whether multiple lines can be inputted into the TextInput. + */ + multiline?: boolean; + /** + * Called when the TextInput text is changed. The new text is passed as an argument. + */ + onChange?: (text: string) => void; + /** + * Whether the TextInput can be written to by the user. + */ + readOnly?: boolean; + /** + * Whether characters are hidden in the TextInput. Commonly used for passwords. + */ + secure?: boolean; + /** + * Whether the TextInput can be seen. + */ + visible?: boolean; +} + +/** + * A place for the user to type in a string. + */ +export class TextInput extends React.Component { } + +/** + * Undocumented + */ +export class VerticalBox extends React.Component { } + +/** + * Undocumented + */ +export class VerticalSeparator extends React.Component { } + +export interface WindowProps { + /** + * Whether the window will have a border on the inside. + */ + borderless?: boolean; + /** + * Whether the window is closed. If set to closed, then the window will be closed. + */ + closed?: boolean; + /** + * Whether the window will be fullscreen on start. + */ + fullscreen?: boolean; + /** + * Whether the window is the last window. If set to `true`, then the program will quit once the window is closed. + */ + lastWindow?: boolean; + /** + * Whether all children will have a margin around them and the outer edge of the window. + */ + margined?: boolean; + /** + * Whether a menubar will be shown on the top of the window. + */ + menuBar?: boolean; + /** + * Called when the window is closed. + */ + onClose?: () => void; + /** + * Called when the window size is changed by the user. The new size is passed as an argument, in an object. + */ + onContentSizeChange?: (size: { + h: number, + y: number + }) => void; + /** + * How big the window is when the application is first started. + */ + size?: { + h: number, + w: number + }; + /** + * The title of the window. Will be shown at the top left ribbon. + */ + title?: string; +} + +/** + * The window is the basis where all other components reside. + */ +export class Window extends React.Component { } + +export function render(element: JSX.Element): React.ReactNode; + +/** + * A method to display an alert, or a dialog to save or open a file. + * @param type What type the dialog is. The current types are: + * - Message - a simple message + * - Error - an error message + * - Open - open a file + * - Save - save a file + * @param options Options for the title and description if it is a Message or Error. + * Required one of title and description (if it is Message or Error) + */ +export function Dialog( + type: 'Message' | 'Error' | 'Open' | 'Save', + options?: { + title: string, + description?: string + } + | { + title?: string, + description: string + } +): void; diff --git a/types/proton-native/test/index.tsx b/types/proton-native/test/index.tsx new file mode 100644 index 0000000000..1b12be9894 --- /dev/null +++ b/types/proton-native/test/index.tsx @@ -0,0 +1,72 @@ +import * as React from "react"; +import { + render, + App, + Area, + Group, + Menu, + RadioButtons, + Window, +} from "proton-native"; + +class ExampleApp extends React.Component { + render() { + return ( + + + + ); + } +} + +class MenuTest extends React.Component { + render() { + return ( + + + + + Hi + + + + + + ); + } +} + +class RadioTest extends React.Component { + render() { + return ( + + + + Option 1 + Option 2 + + + + ); + } +} + +class RectangleTest extends React.Component { + render() { + return ( + + + + + + + + ); + } +} diff --git a/types/proton-native/tsconfig.json b/types/proton-native/tsconfig.json new file mode 100644 index 0000000000..4a1d2fd61c --- /dev/null +++ b/types/proton-native/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/index.tsx" + ] +} \ No newline at end of file diff --git a/types/proton-native/tslint.json b/types/proton-native/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/proton-native/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 52aaa6bc5c675a05164bb0722ae0b418b4434916 Mon Sep 17 00:00:00 2001 From: Ifiok Jr Date: Fri, 11 May 2018 21:00:21 +0100 Subject: [PATCH 11/15] react-native-htmlview types added (#25713) --- types/react-native-htmlview/index.d.ts | 83 +++++++++++++++++++ .../react-native-htmlview-tests.tsx | 40 +++++++++ types/react-native-htmlview/tsconfig.json | 24 ++++++ types/react-native-htmlview/tslint.json | 1 + 4 files changed, 148 insertions(+) create mode 100644 types/react-native-htmlview/index.d.ts create mode 100644 types/react-native-htmlview/react-native-htmlview-tests.tsx create mode 100644 types/react-native-htmlview/tsconfig.json create mode 100644 types/react-native-htmlview/tslint.json diff --git a/types/react-native-htmlview/index.d.ts b/types/react-native-htmlview/index.d.ts new file mode 100644 index 0000000000..5bef0c8583 --- /dev/null +++ b/types/react-native-htmlview/index.d.ts @@ -0,0 +1,83 @@ +// Type definitions for react-native-htmlview 0.12 +// Project: https://github.com/jsdf/react-native-htmlview +// Definitions by: Ifiok Jr. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component, ComponentType, ReactNode } from 'react'; +import { StyleProp, TextProperties, TextStyle, ViewStyle, ImageStyle } from 'react-native'; + +export interface HTMLViewNode { + data?: string; + type?: string; + name?: string; + attribs: { [key: string]: string }; +} +export interface HTMLViewProps { + /** + * a string of HTML content to render + */ + value: string; + + stylesheet?: { + [key: string]: StyleProp; + }; + + onLinkPress?(url: string): void; + + onLinkLongPress?(url: string): void; + + /** + * + * A custom function to render HTML nodes however you see fit. If the function returns undefined (not null), the + * default renderer will be used for that node. The function takes the following arguments: + * + * - defaultRenderer the default rendering implementation, so you can use the normal rendering logic for some subtree. defaultRenderer takes the following arguments: + * - node the node to render with the default rendering logic + * - parent the parent of node of node + * + * @param node the html node as parsed by htmlparser2 + * @param index position of the node in parent node's children + * @param siblings parent node's children (including current node) + * @param parent parent node + * @param defaultRenderer the default rendering implementation, so you can use the normal rendering logic for some subtree: + */ + renderNode?( + node: HTMLViewNode, + index: number, + siblings: HTMLViewNode, + parent: HTMLViewNode, + defaultRenderer: (node: HTMLViewNode, parent: HTMLViewNode) => ReactNode, + ): ReactNode; + + /** + * Text which is rendered before every li inside a ul + */ + bullet?: string; + + /** + * Text which appears after every p element + */ + paragraphBreak?: string; + + /** + * Text which appears after text elements which create a new line (br, headings) + */ + lineBreak?: string; + + /** + * When explicitly false, effectively sets paragraphBreak and lineBreak to null + */ + addLineBreaks?: boolean; + + /* + * TODO Add futher customisization props + * https://github.com/jsdf/react-native-htmlview#customizing-things-even-further + */ + + TextComponent?: ComponentType; + + textComponentProps?: TextProperties; +} + +export default class HTMLView extends Component {} diff --git a/types/react-native-htmlview/react-native-htmlview-tests.tsx b/types/react-native-htmlview/react-native-htmlview-tests.tsx new file mode 100644 index 0000000000..086b1287e9 --- /dev/null +++ b/types/react-native-htmlview/react-native-htmlview-tests.tsx @@ -0,0 +1,40 @@ +import * as React from 'react'; +import { Text, StyleSheet } from 'react-native'; +import HTMLView from 'react-native-htmlview'; + +const styles = StyleSheet.create({ + strong: {}, + a: {}, + p: {}, + h1: {}, + h2: {}, + h3: {}, + h4: {}, + h5: {}, + h6: {}, +}); + +const defaultTextProps = { + style: { + fontSize: 14, + }, +}; + +class Simple extends React.Component { + onPressLink = () => { + // Do someting + } + + render() { + return ( + + ); + } +} diff --git a/types/react-native-htmlview/tsconfig.json b/types/react-native-htmlview/tsconfig.json new file mode 100644 index 0000000000..bf651665bd --- /dev/null +++ b/types/react-native-htmlview/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-native-htmlview-tests.tsx" + ] +} diff --git a/types/react-native-htmlview/tslint.json b/types/react-native-htmlview/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-htmlview/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 2909ac3accf4982cb7fdceadcb7e16c7bae76ca4 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sat, 12 May 2018 00:22:21 +0300 Subject: [PATCH 12/15] Split activex-interop from windows-script-host; replace activex-iwshruntimelibrary (#25695) * Interop definitions - https://github.com/Microsoft/TypeScript/issues/21440 * WSH definitions * Merge IWshRuntimeLibrary; -Object methods use ActiveXObjectNameMap * WshNamed, WshUnnamed and default properties * Merge activex-iwshruntimelibrary into windows-script-host * WScript.Echo optional parameter * Deleted package.json --- .../activex-interop/activex-interop-tests.ts | 49 +++ types/activex-interop/index.d.ts | 111 +++++++ types/activex-interop/tsconfig.json | 21 ++ .../tslint.json | 0 types/activex-iwshruntimelibrary/package.json | 6 - .../index.d.ts | 306 ++++++++++++++++-- .../tsconfig.json | 7 +- types/windows-script-host/tslint.json | 6 + .../windows-script-host-tests.ts} | 31 ++ 9 files changed, 493 insertions(+), 44 deletions(-) create mode 100644 types/activex-interop/activex-interop-tests.ts create mode 100644 types/activex-interop/index.d.ts create mode 100644 types/activex-interop/tsconfig.json rename types/{activex-iwshruntimelibrary => activex-interop}/tslint.json (100%) delete mode 100644 types/activex-iwshruntimelibrary/package.json rename types/{activex-iwshruntimelibrary => windows-script-host}/index.d.ts (61%) rename types/{activex-iwshruntimelibrary => windows-script-host}/tsconfig.json (82%) create mode 100644 types/windows-script-host/tslint.json rename types/{activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts => windows-script-host/windows-script-host-tests.ts} (67%) diff --git a/types/activex-interop/activex-interop-tests.ts b/types/activex-interop/activex-interop-tests.ts new file mode 100644 index 0000000000..e2ece7401e --- /dev/null +++ b/types/activex-interop/activex-interop-tests.ts @@ -0,0 +1,49 @@ +// copied from the definitions in activex-scripting +interface Dictionary { + /** Add a new key and item to the dictionary. */ + Add(Key: TKey, Item: TItem): void; + + /** Get the number of items in the dictionary. */ + readonly Count: number; + + /** Determine if a given key is in the dictionary. */ + Exists(Key: TKey): boolean; + HashVal(Key: TKey): any; + + /** Set or get the item for a given key */ + Item(Key: TKey): TItem; + + /** Get an array containing all items in the dictionary. */ + Items(): SafeArray; + + /** Change a key to a different key. */ + Key(Key: TKey): TKey; + + /** Get an array containing all keys in the dictionary. */ + Keys(): SafeArray; + + /** Remove a given key from the dictionary. */ + Remove(Key: TKey): void; + + /** Remove all information from the dictionary. */ + RemoveAll(): void; + + /** Set or get the item for a given key */ + (Key: TKey): TItem; +} + +interface ActiveXObjectNameMap { + 'Scripting.Dictionary': Dictionary; +} + +const dict: Dictionary = new ActiveXObject('Scripting.Dictionary'); +dict.Add('one', 1); +dict.Add('two', 2); +dict.Add('three', 3); + +const keyEnumerator = new Enumerator(dict.Keys()); +keyEnumerator.moveFirst(); +while (!keyEnumerator.atEnd()) { + const item = dict(keyEnumerator.item()); + const power = Math.pow(item, 2); +} diff --git a/types/activex-interop/index.d.ts b/types/activex-interop/index.d.ts new file mode 100644 index 0000000000..caa74fff38 --- /dev/null +++ b/types/activex-interop/index.d.ts @@ -0,0 +1,111 @@ +// Type definitions for Javascript Automation interop 0.0 +// Project: https://msdn.microsoft.com/en-us/library/ff521046(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// tslint:disable-next-line no-empty-interface +interface ActiveXObjectNameMap { } + +interface ActiveXObject { + new (progid: K): ActiveXObjectNameMap[K]; + new(s: string): any; +} +declare var ActiveXObject: ActiveXObject; + +/** + * Represents an Automation SAFEARRAY + */ +declare class SafeArray { + private constructor(); + private SafeArray_typekey: SafeArray; +} + +/** + * Allows enumerating over a COM collection, which may not have indexed item access. + */ +interface Enumerator { + /** + * Returns true if the current item is the last one in the collection, or the collection is empty, + * or the current item is undefined. + */ + atEnd(): boolean; + + /** + * Returns the current item in the collection + */ + item(): T; + + /** + * Resets the current item in the collection to the first item. If there are no items in the collection, + * the current item is set to undefined. + */ + moveFirst(): void; + + /** + * Moves the current item to the next item in the collection. If the enumerator is at the end of + * the collection or the collection is empty, the current item is set to undefined. + */ + moveNext(): void; +} + +interface EnumeratorConstructor { + new (collection: SafeArray | { Item(index: any): T }): Enumerator; + new (collection: any): Enumerator; +} + +declare var Enumerator: EnumeratorConstructor; + +/** + * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions. + */ +interface VBArray { + /** + * Returns the number of dimensions (1-based). + */ + dimensions(): number; + + /** + * Takes an index for each dimension in the array, and returns the item at the corresponding location. + */ + getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T; + + /** + * Returns the smallest available index for a given dimension. + * @param dimension 1-based dimension (defaults to 1) + */ + lbound(dimension?: number): number; + + /** + * Returns the largest available index for a given dimension. + * @param dimension 1-based dimension (defaults to 1) + */ + ubound(dimension?: number): number; + + /** + * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions, + * each successive dimension is appended to the end of the array. + * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6] + */ + toArray(): T[]; +} + +interface VBArrayConstructor { + new (safeArray: SafeArray): VBArray; +} + +declare var VBArray: VBArrayConstructor; + +/** Automation date (VT_DATE) */ +declare class VarDate { + private constructor(); + private VarDate_typekey: VarDate; +} + +interface DateConstructor { + new(vd: VarDate): Date; +} + +interface Date { + getVarDate: () => VarDate; +} diff --git a/types/activex-interop/tsconfig.json b/types/activex-interop/tsconfig.json new file mode 100644 index 0000000000..49c7698384 --- /dev/null +++ b/types/activex-interop/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ "../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-interop-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-iwshruntimelibrary/tslint.json b/types/activex-interop/tslint.json similarity index 100% rename from types/activex-iwshruntimelibrary/tslint.json rename to types/activex-interop/tslint.json diff --git a/types/activex-iwshruntimelibrary/package.json b/types/activex-iwshruntimelibrary/package.json deleted file mode 100644 index d9b1031263..0000000000 --- a/types/activex-iwshruntimelibrary/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "dependencies": { - "activex-helpers": "*" - } -} \ No newline at end of file diff --git a/types/activex-iwshruntimelibrary/index.d.ts b/types/windows-script-host/index.d.ts similarity index 61% rename from types/activex-iwshruntimelibrary/index.d.ts rename to types/windows-script-host/index.d.ts index d5b052eaae..50f0c52216 100644 --- a/types/activex-iwshruntimelibrary/index.d.ts +++ b/types/windows-script-host/index.d.ts @@ -1,14 +1,15 @@ -// Type definitions for Windows Script Host Object Model - IWshRuntimeLibrary 1.0 -// Project: https://msdn.microsoft.com/en-us/library/9bbdkx3k(v=vs.84).aspx +// Type definitions for Windows Script Host 5.8 +// Project: https://msdn.microsoft.com/en-us/library/9bbdkx3k.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.3 + +/// declare namespace IWshRuntimeLibrary { type WindowStyle = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; type ShortcutWindowStyle = 1 | 3 | 7; - // tslint:disable-next-line no-const-enum const enum ButtonType { OK, OKCancel, @@ -19,7 +20,6 @@ declare namespace IWshRuntimeLibrary { CancelTryagainContinue } - // tslint:disable-next-line no-const-enum const enum EventType { AuditFailure = 5, AuditSuccess = 4, @@ -29,7 +29,6 @@ declare namespace IWshRuntimeLibrary { Warning = 2 } - // tslint:disable-next-line no-const-enum const enum IconType { Stop = 16, QuestionMark = 32, @@ -37,7 +36,6 @@ declare namespace IWshRuntimeLibrary { InformationMark = 64, } - // tslint:disable-next-line no-const-enum const enum PopupType { SecondButtonDefault = 256, ThirdButtonDefault = 512, @@ -46,7 +44,6 @@ declare namespace IWshRuntimeLibrary { RTL = 1048576, } - // tslint:disable-next-line no-const-enum const enum PopupSelection { NoButton = -1, OK = 1, @@ -60,14 +57,12 @@ declare namespace IWshRuntimeLibrary { Continue = 11, } - // tslint:disable-next-line no-const-enum const enum WshExecStatus { WshFailed = 2, WshFinished = 1, WshRunning = 0, } - // tslint:disable-next-line no-const-enum const enum WshWindowStyle { WshHide = 0, WshMaximizedFocus = 3, @@ -77,24 +72,108 @@ declare namespace IWshRuntimeLibrary { WshNormalNoFocus = 4, } - class TextStream { - private 'IWshRuntimeLibrary.TextStream_typekey': TextStream; - private constructor(); - readonly AtEndOfLine: boolean; - readonly AtEndOfStream: boolean; - Close(): void; - readonly Column: number; - readonly Line: number; - Read(Characters: number): string; - ReadAll(): string; - ReadLine(): string; - Skip(Characters: number): void; - SkipLine(): void; - Write(Text: string): void; - WriteBlankLines(Lines: number): void; + class TextStreamBase { + /** + * The column number of the current character position in an input stream. + */ + Column: number; - /** @param string [Text=''] */ - WriteLine(Text?: string): void; + /** + * The current line number in an input stream. + */ + Line: number; + + /** + * Closes a text stream. + * It is not necessary to close standard streams; they close automatically when the process ends. If + * you close a standard stream, be aware that any other pointers to that standard stream become invalid. + */ + Close(): void; + } + + class TextStreamWriter extends TextStreamBase { + private 'IWshRuntimeLibrary.TextStreamWriter_typekey': TextStreamWriter; + private constructor(); + + /** + * Sends a string to an output stream. + */ + Write(s: string): void; + + /** + * Sends a specified number of blank lines (newline characters) to an output stream. + */ + WriteBlankLines(intLines: number): void; + + /** + * Sends a string followed by a newline character to an output stream. + */ + WriteLine(s: string): void; + } + + class TextStreamReader extends TextStreamBase { + private 'IWshRuntimeLibrary.TextStreamReader_typekey': TextStreamReader; + private constructor(); + + /** + * Returns a specified number of characters from an input stream, starting at the current pointer position. + * Does not return until the ENTER key is pressed. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + */ + Read(characters: number): string; + + /** + * Returns all characters from an input stream. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + */ + ReadAll(): string; + + /** + * Returns an entire line from an input stream. + * Although this method extracts the newline character, it does not add it to the returned string. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + */ + ReadLine(): string; + + /** + * Skips a specified number of characters when reading from an input text stream. + * Can only be used on a stream in reading mode; causes an error in writing or appending mode. + * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.) + */ + Skip(characters: number): void; + + /** + * Skips the next line when reading from an input text stream. + * Can only be used on a stream in reading mode, not writing or appending mode. + */ + SkipLine(): void; + + /** + * Indicates whether the stream pointer position is at the end of a line. + */ + AtEndOfLine: boolean; + + /** + * Indicates whether the stream pointer position is at the end of a stream. + */ + AtEndOfStream: boolean; + } + + /** Provides access to the entire collection of command-line parameters, in the order in which they were originally entered. */ + interface WshArguments { + Count(): number; + Item(index: number): string; + Length: number; + Named: WshNamed; + + /** + * When you run the **ShowUsage** method, a help screen (referred to as the usage) appears and displays details about the script's command line options. + * This information comes from the runtime section of the `*.WSF` file. Everything written between the `` and `` tags is pieced together + * to produce what is called a "usage statement." The usage statement tells the user how to use the script. + */ + ShowUsage(): void; + Unnamed: WshUnnamed; + (index: number): string; } /** Generic Collection Object */ @@ -109,7 +188,7 @@ declare namespace IWshRuntimeLibrary { interface WshEnvironment { Count(): number; Item(Name: string): string; - readonly length: number; + readonly Length: number; Remove(Name: string): void; (Name: string): string; } @@ -121,12 +200,25 @@ declare namespace IWshRuntimeLibrary { readonly ExitCode: number; readonly ProcessID: number; readonly Status: WshExecStatus; - readonly StdErr: TextStream; - readonly StdIn: TextStream; - readonly StdOut: TextStream; + readonly StdErr: TextStreamWriter; + readonly StdIn: TextStreamReader; + readonly StdOut: TextStreamWriter; Terminate(): void; } + /** + * Provides access to the named command-line arguments + * + * Note that enumerating over this object returns the **names** of the arguments, not the values + */ + interface WshNamed { + Count(): number; + Exists(Key: string): boolean; + Item(name: string): string; + Length: number; + (name: string): string; + } + /** Network Object */ class WshNetwork { private 'IWshRuntimeLibrary.WshNetwork_typekey': WshNetwork; @@ -326,6 +418,14 @@ declare namespace IWshRuntimeLibrary { WorkingDirectory: string; } + /** Provides access to the unnamed command-line arguments */ + interface WshUnnamed { + Count(): number; + Item(index: number): string; + Length: number; + (index: number): string; + } + /** URLShortcut Object */ class WshURLShortcut { private 'IWshRuntimeLibrary.WshURLShortcut_typekey': WshURLShortcut; @@ -337,12 +437,150 @@ declare namespace IWshRuntimeLibrary { } } -interface ActiveXObject { - set(obj: IWshRuntimeLibrary.WshEnvironment, propertyName: 'Item', parameterTypes: [string], newValue: string): void; - new (progid: K): ActiveXObjectNameMap[K]; +declare var WScript: { + /** + * Outputs text to either a message box (under WScript.exe) or the command console window followed by + * a newline (under CScript.exe). + */ + Echo(s?: any): void; + + /** + * Exposes the write-only error output stream for the current script. + * Can be accessed only while using CScript.exe. + */ + StdErr: IWshRuntimeLibrary.TextStreamWriter; + + /** + * Exposes the write-only output stream for the current script. + * Can be accessed only while using CScript.exe. + */ + StdOut: IWshRuntimeLibrary.TextStreamWriter; + Arguments: IWshRuntimeLibrary.WshArguments; + + /** + * The full path of the currently running script. + */ + ScriptFullName: string; + + /** + * Forces the script to stop immediately, with an optional exit code. + */ + Quit(exitCode?: number): number; + + /** + * The Windows Script Host build version number. + */ + BuildVersion: number; + + /** + * Fully qualified path of the host executable. + */ + FullName: string; + + /** + * Gets/sets the script mode - interactive(true) or batch(false). + */ + Interactive: boolean; + + /** + * The name of the host executable (WScript.exe or CScript.exe). + */ + Name: string; + + /** + * Path of the directory containing the host executable. + */ + Path: string; + + /** + * The filename of the currently running script. + */ + ScriptName: string; + + /** + * Exposes the read-only input stream for the current script. + * Can be accessed only while using CScript.exe. + */ + StdIn: IWshRuntimeLibrary.TextStreamReader; + + /** + * Windows Script Host version + */ + Version: string; + + /** + * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event. + */ + ConnectObject(objEventSource: any, strPrefix: string): void; + + /** + * Creates a COM object. + * @param strProgiID + * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. + */ + CreateObject(strProgID: K, strPrefix?: string): ActiveXObjectNameMap[K]; + + /** + * Disconnects a COM object from its event sources. + */ + DisconnectObject(obj: any): void; + + /** + * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file. + * @param strPathname Fully qualified path to the file containing the object persisted to disk. + * For objects in memory, pass a zero-length string. + * @param strProgID + * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. + */ + GetObject(strPathname: string, strProgID: K, strPrefix?: string): ActiveXObjectNameMap[K]; + GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any; + + /** + * Suspends script execution for a specified length of time, then continues execution. + * @param intTime Interval (in milliseconds) to suspend script execution. + */ + Sleep(intTime: number): void; +}; + +/** + * WSH is an alias for WScript under Windows Script Host + */ +declare var WSH: typeof WScript; + +declare namespace WSHControllerLibrary { + class WSHController { + private 'WSHControllerLibrary.WSHController_typekey': WSHController; + private constructor(); + CreateScript(Command: string, Server?: any): any; + } +} + +declare namespace ScriptSigner { + class Signer { + private 'ScriptSigner.Signer_typekey': Signer; + private constructor(); + + /** @param Store [Store='my'] */ + Sign(FileExtension: string, Text: string, Certificate: string, Store?: string): string; + + /** @param Store [Store='my'] */ + SignFile(FileName: string, Certificate: string, Store?: string): void; + + /** @param ShowUI [ShowUI=false] */ + Verify(FileExtension: string, Text: string, ShowUI?: boolean): boolean; + + /** @param ShowUI [ShowUI=false] */ + VerifyFile(FileName: string, ShowUI?: boolean): boolean; + } } interface ActiveXObjectNameMap { + 'WSHController': WSHControllerLibrary.WSHController; + 'Scripting.Signer': ScriptSigner.Signer; 'WScript.Network': IWshRuntimeLibrary.WshNetwork; 'WScript.Shell': IWshRuntimeLibrary.WshShell; } + +interface ActiveXObject { + set(obj: IWshRuntimeLibrary.WshEnvironment, propertyName: 'Item', parameterTypes: [string], newValue: string): void; +} diff --git a/types/activex-iwshruntimelibrary/tsconfig.json b/types/windows-script-host/tsconfig.json similarity index 82% rename from types/activex-iwshruntimelibrary/tsconfig.json rename to types/windows-script-host/tsconfig.json index 1fa5abc39b..d53dad8a20 100644 --- a/types/activex-iwshruntimelibrary/tsconfig.json +++ b/types/windows-script-host/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "scripthost" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, @@ -19,6 +18,6 @@ }, "files": [ "index.d.ts", - "activex-iwshruntimelibrary-tests.ts" + "windows-script-host-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/windows-script-host/tslint.json b/types/windows-script-host/tslint.json new file mode 100644 index 0000000000..ed91c31f9c --- /dev/null +++ b/types/windows-script-host/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-const-enum": false + } +} \ No newline at end of file diff --git a/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts b/types/windows-script-host/windows-script-host-tests.ts similarity index 67% rename from types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts rename to types/windows-script-host/windows-script-host-tests.ts index 14a90f9a8a..c6b3449482 100644 --- a/types/activex-iwshruntimelibrary/activex-iwshruntimelibrary-tests.ts +++ b/types/windows-script-host/windows-script-host-tests.ts @@ -1,3 +1,34 @@ +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +// Show all of the arguments. +WScript.Echo(`${WScript.Arguments.Length} arguments`); + +for (const arg of collectionToArray(WScript.Arguments)) { + WScript.Echo(` ${arg}`); +} + +// Show the unnamed arguments. +WScript.Echo(`${WScript.Arguments.Unnamed.Length} unnamed arguments`); + +for (const unnamed of collectionToArray(WScript.Arguments.Unnamed)) { + WScript.Echo(` ${unnamed}`); +} + +// Show the named arguments. +WScript.Echo(`${WScript.Arguments.Named.Length} named arguments`); +for (const key of collectionToArray(WScript.Arguments.Named)) { + WScript.Echo(` ${key}=${WScript.Arguments.Named(key)}`); +} + const wshn = new ActiveXObject('WScript.Network'); // https://msdn.microsoft.com/en-us/library/s6wt333f(v=vs.84).aspx From af5dd8fe0f69f1a9f5c714dd682fbb93c6c641d3 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Fri, 11 May 2018 14:49:57 -0700 Subject: [PATCH 13/15] Change node 6 to target es5 (#25719) --- types/node/v6/index.d.ts | 15 +++++++++++++++ types/node/v6/tsconfig.json | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/types/node/v6/index.d.ts b/types/node/v6/index.d.ts index 92e6fe75ad..9d2ea9ea00 100644 --- a/types/node/v6/index.d.ts +++ b/types/node/v6/index.d.ts @@ -56,6 +56,21 @@ interface WeakMapConstructor { } interface SetConstructor { } interface WeakSetConstructor { } +// Forward-declare needed types from lib.es2015.d.ts (in case users are using `--lib es5`) +interface Iterable { } +interface Iterator { + next(value?: any): IteratorResult; +} + +interface IteratorResult { } +interface AsyncIterableIterator {} +interface SymbolConstructor { + readonly iterator: symbol; + readonly asyncIterator: symbol; +} + +declare var Symbol: SymbolConstructor; + /************************************************ * * * GLOBAL * diff --git a/types/node/v6/tsconfig.json b/types/node/v6/tsconfig.json index 8fc9488eac..3ebee98552 100644 --- a/types/node/v6/tsconfig.json +++ b/types/node/v6/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es5" ], "noImplicitAny": true, "noImplicitThis": true, From a68f617d89e164fd042ca08029f6efa2df3ab818 Mon Sep 17 00:00:00 2001 From: Nate Mara Date: Fri, 11 May 2018 18:01:23 -0400 Subject: [PATCH 14/15] fix(unzipper): update promise and buffer to be functions, not properties (#25685) --- types/unzipper/index.d.ts | 154 ++++++++++++++++--------------- types/unzipper/unzipper-tests.ts | 77 ++++++++-------- 2 files changed, 118 insertions(+), 113 deletions(-) diff --git a/types/unzipper/index.d.ts b/types/unzipper/index.d.ts index 5af7bbddf7..865660bd76 100644 --- a/types/unzipper/index.d.ts +++ b/types/unzipper/index.d.ts @@ -1,109 +1,115 @@ // Type definitions for unzipper 0.8 // Project: https://github.com/ZJONSSON/node-unzipper#readme // Definitions by: s73obrien +// Nate // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// import { Readable, Stream, PassThrough, Duplex } from "stream"; import { ClientRequest, RequestOptions } from "http"; export interface PullStream extends Duplex { - stream(eof: number | string, includeEof: boolean): PassThrough; - pull(eof: number | string, includeEof: boolean): Promise; + stream(eof: number | string, includeEof: boolean): PassThrough; + pull(eof: number | string, includeEof: boolean): Promise; } export interface Entry extends PassThrough { - autodrain(): Promise; - buffer: Promise; - path: string; + autodrain(): Promise; + buffer(): Promise; + path: string; - props: { - path: string; - }; + props: { + path: string; + }; - type: string; - vars: { - signature?: number; - versionsNeededToExtract: number; - flags: number; - compressionMethod: number; - lastModifiedTime: number; - crc32: number; - compressedSize: number; - fileNameLength: number; - extraFieldLength: number; - }; + type: string; + vars: { + signature?: number; + versionsNeededToExtract: number; + flags: number; + compressionMethod: number; + lastModifiedTime: number; + crc32: number; + compressedSize: number; + fileNameLength: number; + extraFieldLength: number; + }; - extra: { - signature: number; - partsize: number; - uncompressedSize: number; - compressedSize: number; - offset: number; - disknum: number; - }; + extra: { + signature: number; + partsize: number; + uncompressedSize: number; + compressedSize: number; + offset: number; + disknum: number; + }; } export function unzip( - source: { - stream: Readable; - size: Promise - }, - offset: number, - _password: string): Entry; + source: { + stream: Readable; + size: Promise; + }, + offset: number, + _password: string +): Entry; export namespace Open { - function file(filename: string): CentralDirectory; - function url(request: ClientRequest, opt: string | RequestOptions): CentralDirectory; - function s3(client: any, params: any): CentralDirectory; + function file(filename: string): CentralDirectory; + function url( + request: ClientRequest, + opt: string | RequestOptions + ): CentralDirectory; + function s3(client: any, params: any): CentralDirectory; } export function BufferStream(entry: Entry): Promise; export interface CentralDirectory { - signature: number; - diskNumber: number; - diskStart: number; - numberOfRecordsOnDisk: number; - numberOfRecords: number; - sizeOfCentralDirectory: number; - offsetToStartOfCentralDirectory: number; - commentLength: number; - files: [ - { - signature: number; - versionMadeBy: number; - versionsNeededToExtract: number; - flags: number; - compressionMethod: number; - lastModifiedTime: number; - lastModifiedDate: number; - crc32: number; - compressedSize: number; - uncompressedSize: number; - fileNameLength: number; - extraFieldLength: number; - fileCommentLength: number; - diskNumber: number; - internalFileAttributes: number; - externalFileAttributes: number; - offsetToLocalFileHeader: number; - path: string; - comment: string; - stream: Entry; - buffer: Promise; - } - ]; + signature: number; + diskNumber: number; + diskStart: number; + numberOfRecordsOnDisk: number; + numberOfRecords: number; + sizeOfCentralDirectory: number; + offsetToStartOfCentralDirectory: number; + commentLength: number; + files: [ + { + signature: number; + versionMadeBy: number; + versionsNeededToExtract: number; + flags: number; + compressionMethod: number; + lastModifiedTime: number; + lastModifiedDate: number; + crc32: number; + compressedSize: number; + uncompressedSize: number; + fileNameLength: number; + extraFieldLength: number; + fileCommentLength: number; + diskNumber: number; + internalFileAttributes: number; + externalFileAttributes: number; + offsetToLocalFileHeader: number; + path: string; + comment: string; + stream: Entry; + buffer: Promise; + } + ]; } export class ParseOptions { - verbose?: boolean; - path?: string; - // more options? + verbose?: boolean; + path?: string; + // more options? } export type ParseStream = PullStream & { - promise: Promise + promise(): Promise; }; export function Parse(opts?: ParseOptions): ParseStream; diff --git a/types/unzipper/unzipper-tests.ts b/types/unzipper/unzipper-tests.ts index 295b5541db..e5d06f6055 100644 --- a/types/unzipper/unzipper-tests.ts +++ b/types/unzipper/unzipper-tests.ts @@ -1,44 +1,43 @@ -import { - Parse, - Open, - Entry, - CentralDirectory -} from 'unzipper'; +import { Parse, Open, Entry, CentralDirectory } from "unzipper"; -import { createReadStream } from 'fs'; +import { createReadStream } from "fs"; -import { get } from 'http'; +import { get } from "http"; -createReadStream( - 'http://example.org/path/to/archive.zip' -).pipe( - Parse() -).on('entry', (entry: Entry) => { - entry.buffer.then((b1: Buffer) => {}); - const s1: string = entry.path; - const s2: string = entry.type; - const o1: { - signature?: number; - versionsNeededToExtract: number; - flags: number; - compressionMethod: number; - lastModifiedTime: number; - crc32: number; - compressedSize: number; - fileNameLength: number; - extraFieldLength: number; - } = entry.vars; +createReadStream("http://example.org/path/to/archive.zip") + .pipe(Parse()) + .on("entry", (entry: Entry) => { + entry.buffer().then((b1: Buffer) => {}); + const s1: string = entry.path; + const s2: string = entry.type; + const o1: { + signature?: number; + versionsNeededToExtract: number; + flags: number; + compressionMethod: number; + lastModifiedTime: number; + crc32: number; + compressedSize: number; + fileNameLength: number; + extraFieldLength: number; + } = + entry.vars; - const o2: { - signature: number; - partsize: number; - uncompressedSize: number; - compressedSize: number; - offset: number; - disknum: number; - } = entry.extra; -}); + const o2: { + signature: number; + partsize: number; + uncompressedSize: number; + compressedSize: number; + offset: number; + disknum: number; + } = + entry.extra; + }) + .promise() + .then(() => { + console.log("Finished reading stream"); + }); -const dir1: CentralDirectory = Open.file('Z:\\path\\to\\archive.zip'); -const dir2: CentralDirectory = Open.url(get('url/to/archive.zip'), {}); -const dir3: CentralDirectory = Open.s3('any', 'any'); +const dir1: CentralDirectory = Open.file("Z:\\path\\to\\archive.zip"); +const dir2: CentralDirectory = Open.url(get("url/to/archive.zip"), {}); +const dir3: CentralDirectory = Open.s3("any", "any"); From 9028a63234ef076b85dfabe89607e898ce720947 Mon Sep 17 00:00:00 2001 From: Dominique Rau Date: Sat, 12 May 2018 22:58:25 +0200 Subject: [PATCH 15/15] state can be typed (#25640) --- types/noble/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/noble/index.d.ts b/types/noble/index.d.ts index ee4fbf1654..41704bef05 100644 --- a/types/noble/index.d.ts +++ b/types/noble/index.d.ts @@ -42,7 +42,7 @@ export declare class Peripheral extends events.EventEmitter { advertisement: Advertisement; rssi: number; services: Service[]; - state: string; + state: 'error' | 'connecting' | 'connected' | 'disconnecting' | 'disconnected'; connect(callback?: (error: string) => void): void; disconnect(callback?: () => void): void;