Skip to content

Commit 6feb3e1

Browse files
authored
[office-js][office-js-preview] (Excel) Updates from CDN (DefinitelyTyped#74137)
1 parent e6ddfc8 commit 6feb3e1

2 files changed

Lines changed: 150 additions & 34 deletions

File tree

types/office-js-preview/index.d.ts

Lines changed: 117 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32093,7 +32093,7 @@ declare namespace Excel {
3209332093
* Represents the value of a cell containing a number with a format string. Number format strings must conform to Excel guidelines. To learn more, see {@link https://support.microsoft.com/office/c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}.
3209432094
* In this scenario, the format is applied to the value and not to the cell, so the value retains its format string throughout calculation.
3209532095
*
32096-
* @deprecated As of [Api set: ExcelApi 1.19], use {@link https://learn.microsoft.com/javascript/api/excel/excel.doublecellvalue | DoubleCellValue} instead.
32096+
* @deprecated As of ExcelApi 1.19, use {@link https://learn.microsoft.com/javascript/api/excel/excel.doublecellvalue | DoubleCellValue} instead.
3209732097
*
3209832098
* @remarks
3209932099
* [Api set: ExcelApi 1.16]
@@ -32102,7 +32102,7 @@ declare namespace Excel {
3210232102
/**
3210332103
* Represents the type of this cell value.
3210432104
*
32105-
* @deprecated Deprecated since [Api set: ExcelApi 1.19].
32105+
* @deprecated Deprecated since ExcelApi 1.19.
3210632106
*
3210732107
* @remarks
3210832108
* [Api set: ExcelApi 1.16]
@@ -32111,7 +32111,7 @@ declare namespace Excel {
3211132111
/**
3211232112
* Represents the value that would be returned by `Range.values` for a cell with this value.
3211332113
*
32114-
* @deprecated Deprecated since [Api set: ExcelApi 1.19].
32114+
* @deprecated Deprecated since ExcelApi 1.19.
3211532115
*
3211632116
* @remarks
3211732117
* [Api set: ExcelApi 1.16]
@@ -32120,7 +32120,7 @@ declare namespace Excel {
3212032120
/**
3212132121
* Represents the value that would be returned by `Range.valueTypes` for a cell with this value.
3212232122
*
32123-
* @deprecated Deprecated since [Api set: ExcelApi 1.19].
32123+
* @deprecated Deprecated since ExcelApi 1.19.
3212432124
*
3212532125
* @remarks
3212632126
* [Api set: ExcelApi 1.16]
@@ -32132,7 +32132,7 @@ declare namespace Excel {
3213232132
* Number format strings must conform to Excel guidelines.
3213332133
* To learn more, see {@link https://support.microsoft.com/office/c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}.
3213432134
*
32135-
* @deprecated Deprecated since [Api set: ExcelApi 1.19].
32135+
* @deprecated Deprecated since ExcelApi 1.19.
3213632136
*
3213732137
* @remarks
3213832138
* [Api set: ExcelApi 1.16]
@@ -34625,10 +34625,17 @@ declare namespace Excel {
3462534625
}
3462634626
/**
3462734627
*
34628-
* Creates and opens a new workbook. Optionally, the workbook can be pre-populated with a Base64-encoded .xlsx file.
34629-
* The `extensionHardening` Windows registry key affects the `base64File` param. The file extension defined by the param must match the real file type of the file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy."
34630-
* Note: Macros can be a security risk. If this API is used to create a workbook that includes a macro, the add-in user will be prompted with a "Trust this add-in?" dialog in the Excel UI. The user must select the "Trust add-in" button to proceed.
34631-
*
34628+
* Creates and opens a new workbook. Optionally, the workbook can be pre-populated
34629+
* with a Base64-encoded .xlsx file.
34630+
34631+
* Note: Macros can be a security risk. If this API is used to create a workbook that
34632+
* includes a macro, the add-in user will be prompted with a "Trust this add-in?" dialog
34633+
* in the Excel UI. The user must select the "Trust add-in" button to proceed.
34634+
*
34635+
* Note: The `extensionHardening` Windows registry key affects the `base64File` param.
34636+
* The file extension defined by the param must match the real file type of the file.
34637+
* If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error:
34638+
* "This operation is not allowed due to the extension hardening policy."
3463234639
* [Api set: ExcelApi 1.8]
3463334640
*
3463434641
* @param base64File Optional. The Base64-encoded .xlsx file. The default value is null.
@@ -34800,11 +34807,11 @@ declare namespace Excel {
3480034807
class RequestContext extends OfficeCore.RequestContext {
3480134808
constructor(url?: string | Session, invocation?: {
3480234809
invocationId: number;
34803-
isInCFSyncScenario: boolean;
34810+
isInSyncExecution: boolean;
3480434811
});
3480534812
setInvocation(invocation: {
3480634813
invocationId: number;
34807-
isInCFSyncScenario: boolean;
34814+
isInSyncExecution: boolean;
3480834815
}): void;
3480934816
readonly workbook: Workbook;
3481034817
readonly application: Application;
@@ -34827,7 +34834,6 @@ declare namespace Excel {
3482734834
*
3482834835
* When false, each `context.sync()` call creates an undo record.
3482934836
* When true, all `context.sync()` calls in a single `Excel.run` are merged into one `undo` group.
34830-
*
3483134837
* @remarks
3483234838
* [Api set: ExcelApi 1.20]
3483334839
*/
@@ -39860,6 +39866,66 @@ declare namespace Excel {
3986039866
*/
3986139867
toJSON(): Excel.Interfaces.IterativeCalculationData;
3986239868
}
39869+
/**
39870+
* Specifies the type of autorun event.
39871+
*
39872+
* @remarks
39873+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39874+
* @beta
39875+
*/
39876+
enum AutorunEventType {
39877+
/**
39878+
* The autorun event type is unknown.
39879+
* @remarks
39880+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39881+
*/
39882+
unknown = "Unknown",
39883+
/**
39884+
* The autorun event type is triggered when the document is saved.
39885+
* @remarks
39886+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39887+
*/
39888+
onDocumentSave = "OnDocumentSave",
39889+
/**
39890+
* The autorun event type is triggered when the document is saved as a new file.
39891+
* @remarks
39892+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39893+
*/
39894+
onDocumentSaveAs = "OnDocumentSaveAs"
39895+
}
39896+
/**
39897+
* Specifies the options for completing an autorun event.
39898+
*
39899+
* @remarks
39900+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39901+
* @beta
39902+
*/
39903+
interface AutorunEventCompletedOptions {
39904+
/**
39905+
* Specifies whether to allow the event to proceed. The default value is `false`.
39906+
*
39907+
* @remarks
39908+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39909+
* @beta
39910+
*/
39911+
allowEvent: boolean;
39912+
/**
39913+
* Specifies the type of autorun event to be completed if allowed. The default value is `unknown`.
39914+
*
39915+
* @remarks
39916+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39917+
* @beta
39918+
*/
39919+
autorunEventType: Excel.AutorunEventType | "Unknown" | "OnDocumentSave" | "OnDocumentSaveAs";
39920+
/**
39921+
* If provided, specifies an optional error message if the event isn't allowed to proceed. The default value is "" (empty string).
39922+
*
39923+
* @remarks
39924+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
39925+
* @beta
39926+
*/
39927+
message?: string;
39928+
}
3986339929
/**
3986439930
* Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges.
3986539931
To learn more about the workbook object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}.
@@ -40139,6 +40205,16 @@ declare namespace Excel {
4013940205
set(properties: Interfaces.WorkbookUpdateData, options?: OfficeExtension.UpdateOptions): void;
4014040206
/** Sets multiple properties on the object at the same time, based on an existing loaded object. */
4014140207
set(properties: Excel.Workbook): void;
40208+
/**
40209+
* Notifies the host application that the add-in's code has finished running in an autorun event.
40210+
*
40211+
* @remarks
40212+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
40213+
* @beta
40214+
*
40215+
* @param AutorunEventCompletedOptions Required. Options for completing the autorun event.
40216+
*/
40217+
autorunEventCompleted(AutorunEventCompletedOptions: Excel.AutorunEventCompletedOptions): void;
4014240218
/**
4014340219
* Close current workbook.
4014440220
*
@@ -40158,8 +40234,7 @@ declare namespace Excel {
4015840234
*/
4015940235
close(closeBehavior?: "Save" | "SkipSave"): void;
4016040236
/**
40161-
* Sets focus on the workbook. This will cause the grid or the currently active object
40162-
to receive keyboard events.
40237+
* Sets focus on the workbook. This causes the Excel grid or the currently active object to receive keyboard events.
4016340238
*
4016440239
* @remarks
4016540240
* [Api set: ExcelApiDesktop 1.1]
@@ -40254,7 +40329,10 @@ declare namespace Excel {
4025440329
getSelectedRanges(): Excel.RangeAreas;
4025540330
/**
4025640331
* Inserts the specified worksheets from a source workbook into the current workbook.
40257-
* The `extensionHardening` Windows registry key affects this API. The file extension defined by the `base64File` param must match the real file type of the inserted file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy."
40332+
40333+
The `extensionHardening` Windows registry key affects this API. The file extension defined by the `base64File` param must match the real file type of the inserted file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy."
40334+
40335+
**Note**: This API is currently only supported for Office on Windows, Mac, and the web.
4025840336
*
4025940337
* @remarks
4026040338
* [Api set: ExcelApi 1.13]
@@ -45290,35 +45368,35 @@ declare namespace Excel {
4529045368
*/
4529145369
enum TableSource {
4529245370
/**
45293-
* External data source (such as Microsoft SharePoint Foundation).
45371+
* An external data source, such as Microsoft SharePoint Foundation.
4529445372
* @remarks
4529545373
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
4529645374
* @beta
4529745375
*/
4529845376
external = "External",
4529945377
/**
45300-
* An Excel range object.
45378+
* A range object in this worksheet.
4530145379
* @remarks
4530245380
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
4530345381
* @beta
4530445382
*/
4530545383
range = "Range",
4530645384
/**
45307-
* XML data source.
45385+
* An XML data source.
4530845386
* @remarks
4530945387
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
4531045388
* @beta
4531145389
*/
4531245390
xml = "Xml",
4531345391
/**
45314-
* Query data source.
45392+
* A Power Query query data source.
4531545393
* @remarks
4531645394
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
4531745395
* @beta
4531845396
*/
4531945397
query = "Query",
4532045398
/**
45321-
* Power Pivot model.
45399+
* A Power Pivot model.
4532245400
* @remarks
4532345401
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
4532445402
* @beta
@@ -66334,7 +66412,13 @@ declare namespace Excel {
6633466412
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
6633566413
* @beta
6633666414
*/
66337-
externalCodeServiceDiffResultReceived = "ExternalCodeServiceDiffResultReceived"
66415+
externalCodeServiceDiffResultReceived = "ExternalCodeServiceDiffResultReceived",
66416+
/**
66417+
* AugmentationLoopUploadStatusChanged represents the type of event registered when the upload status of the augmentation loop changes.
66418+
* @remarks
66419+
* [Api set: ExcelApi BETA (PREVIEW ONLY)]
66420+
*/
66421+
augmentationLoopUploadStatusChanged = "AugmentationLoopUploadStatusChanged"
6633866422
}
6633966423
/**
6634066424
* @remarks
@@ -69276,20 +69360,23 @@ declare namespace Excel {
6927669360
content: string;
6927769361
/**
6927869362
* Specifies the height of the note.
69363+
* Note: This property is not supported in Excel on the web.
6927969364
*
6928069365
* @remarks
6928169366
* [Api set: ExcelApi 1.18]
6928269367
*/
6928369368
height: number;
6928469369
/**
6928569370
* Specifies the visibility of the note. A value of `true` means the note is shown.
69371+
* Note: This property is not supported in Excel on the web.
6928669372
*
6928769373
* @remarks
6928869374
* [Api set: ExcelApi 1.18]
6928969375
*/
6929069376
visible: boolean;
6929169377
/**
6929269378
* Specifies the width of the note.
69379+
* Note: This property is not supported in Excel on the web.
6929369380
*
6929469381
* @remarks
6929569382
* [Api set: ExcelApi 1.18]
@@ -79271,20 +79358,23 @@ declare namespace Excel {
7927179358
content?: string;
7927279359
/**
7927379360
* Specifies the height of the note.
79361+
* Note: This property is not supported in Excel on the web.
7927479362
*
7927579363
* @remarks
7927679364
* [Api set: ExcelApi 1.18]
7927779365
*/
7927879366
height?: number;
7927979367
/**
7928079368
* Specifies the visibility of the note. A value of `true` means the note is shown.
79369+
* Note: This property is not supported in Excel on the web.
7928179370
*
7928279371
* @remarks
7928379372
* [Api set: ExcelApi 1.18]
7928479373
*/
7928579374
visible?: boolean;
7928679375
/**
7928779376
* Specifies the width of the note.
79377+
* Note: This property is not supported in Excel on the web.
7928879378
*
7928979379
* @remarks
7929079380
* [Api set: ExcelApi 1.18]
@@ -86969,20 +87059,23 @@ declare namespace Excel {
8696987059
content?: string;
8697087060
/**
8697187061
* Specifies the height of the note.
87062+
* Note: This property is not supported in Excel on the web.
8697287063
*
8697387064
* @remarks
8697487065
* [Api set: ExcelApi 1.18]
8697587066
*/
8697687067
height?: number;
8697787068
/**
8697887069
* Specifies the visibility of the note. A value of `true` means the note is shown.
87070+
* Note: This property is not supported in Excel on the web.
8697987071
*
8698087072
* @remarks
8698187073
* [Api set: ExcelApi 1.18]
8698287074
*/
8698387075
visible?: boolean;
8698487076
/**
8698587077
* Specifies the width of the note.
87078+
* Note: This property is not supported in Excel on the web.
8698687079
*
8698787080
* @remarks
8698887081
* [Api set: ExcelApi 1.18]
@@ -99738,20 +99831,23 @@ declare namespace Excel {
9973899831
content?: boolean;
9973999832
/**
9974099833
* For EACH ITEM in the collection: Specifies the height of the note.
99834+
* Note: This property is not supported in Excel on the web.
9974199835
*
9974299836
* @remarks
9974399837
* [Api set: ExcelApi 1.18]
9974499838
*/
9974599839
height?: boolean;
9974699840
/**
9974799841
* For EACH ITEM in the collection: Specifies the visibility of the note. A value of `true` means the note is shown.
99842+
* Note: This property is not supported in Excel on the web.
9974899843
*
9974999844
* @remarks
9975099845
* [Api set: ExcelApi 1.18]
9975199846
*/
9975299847
visible?: boolean;
9975399848
/**
9975499849
* For EACH ITEM in the collection: Specifies the width of the note.
99850+
* Note: This property is not supported in Excel on the web.
9975599851
*
9975699852
* @remarks
9975799853
* [Api set: ExcelApi 1.18]

0 commit comments

Comments
 (0)