diff --git a/docs/docs-ref-autogen/common/toc.yml b/docs/docs-ref-autogen/common/toc.yml index e8d6673fb4..95db75649f 100644 --- a/docs/docs-ref-autogen/common/toc.yml +++ b/docs/docs-ref-autogen/common/toc.yml @@ -291,10 +291,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/common_preview/toc.yml b/docs/docs-ref-autogen/common_preview/toc.yml index def77c42ef..fd30909bed 100644 --- a/docs/docs-ref-autogen/common_preview/toc.yml +++ b/docs/docs-ref-autogen/common_preview/toc.yml @@ -293,10 +293,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel/excel/excel.cellcontroltype.yml b/docs/docs-ref-autogen/excel/excel/excel.cellcontroltype.yml index bc627df535..0b38b8930f 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.cellcontroltype.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.cellcontroltype.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.CellControlType:enum' package: excel! fullName: Excel.CellControlType summary: Represents the type of cell control. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false fields: diff --git a/docs/docs-ref-autogen/excel/excel/excel.checkboxcellcontrol.yml b/docs/docs-ref-autogen/excel/excel/excel.checkboxcellcontrol.yml index cc5c189999..3ffe3e1526 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.checkboxcellcontrol.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.checkboxcellcontrol.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.CheckboxCellControl:interface' package: excel! fullName: Excel.CheckboxCellControl summary: Represents a checkbox. This is a cell control that allows a user to toggle the boolean value in a cell. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: interface diff --git a/docs/docs-ref-autogen/excel/excel/excel.comment.yml b/docs/docs-ref-autogen/excel/excel/excel.comment.yml index 309cedb812..9eae9016dc 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -221,7 +221,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -329,7 +329,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel/excel/excel.commentcollection.yml index 2bd2cb7857..c31af6093a 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel/excel/excel.commentreply.yml index 9f01656401..2df5074cde 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -194,7 +194,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel/excel/excel.commentreplycollection.yml index 790f9415c1..c41e74a4f5 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel/excel/excel.note.yml b/docs/docs-ref-autogen/excel/excel/excel.note.yml index a514e978b8..0b092260de 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.note.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.note.yml @@ -4,7 +4,30 @@ uid: 'excel!Excel.Note:class' package: excel! fullName: Excel.Note summary: Represents a note in the workbook or worksheet. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -26,7 +49,29 @@ properties: package: excel! fullName: content summary: Gets or sets the text of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -52,7 +97,30 @@ properties: package: excel! fullName: height summary: Specifies the height of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -64,7 +132,32 @@ properties: package: excel! fullName: visible summary: Specifies the visibility of the note. A value of `true` means the note is shown. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -76,7 +169,30 @@ properties: package: excel! fullName: width summary: Specifies the width of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -89,7 +205,30 @@ methods: package: excel! fullName: delete() summary: Deletes the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function deletes the note from cell A2. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItem("A2"); + note.delete(); + + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel/excel/excel.notecollection.yml b/docs/docs-ref-autogen/excel/excel/excel.notecollection.yml index 51f8025ee7..ec8d8b0fdb 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.notecollection.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.notecollection.yml @@ -4,7 +4,30 @@ uid: 'excel!Excel.NoteCollection:class' package: excel! fullName: Excel.NoteCollection summary: Represents a collection of note objects that are part of the workbook. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -41,7 +64,30 @@ methods: package: excel! fullName: 'add(cellAddress, content)' summary: Adds a new note with the given content on the given cell. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -76,7 +122,32 @@ methods: package: excel! fullName: getItem(key) summary: Gets a note by its cell address. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -95,7 +166,29 @@ methods: package: excel! fullName: getItemAt(index) summary: Gets a note from the collection based on its position. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel/excel/excel.range.yml b/docs/docs-ref-autogen/excel/excel/excel.range.yml index 7722d87404..34cf2f0fd3 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.range.yml @@ -140,7 +140,35 @@ properties: summary: >- Accesses the cell control applied to this range. If the range has multiple cell controls, this returns `EmptyCellControl`. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -591,7 +619,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -868,7 +919,33 @@ methods: range contains only blank values and controls set to their default value, then the values and control formatting are removed. Otherwise, this sets the cells with controls to their default value and clears the values of the other cells in the range. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel/excel/excel.tablecollection.yml index 8b972e0496..c7dd1bf92b 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel/excel/excel.tablecolumn.yml index 977e25f863..14d46a4e8c 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.tablecolumn.yml @@ -153,12 +153,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -168,6 +171,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel/excel/excel.tablecolumncollection.yml index 2772221510..6ae89c66ad 100644 --- a/docs/docs-ref-autogen/excel/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -141,18 +169,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel/toc.yml b/docs/docs-ref-autogen/excel/toc.yml index b7f7f48c56..52acd75a9d 100644 --- a/docs/docs-ref-autogen/excel/toc.yml +++ b/docs/docs-ref-autogen/excel/toc.yml @@ -1487,10 +1487,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_1/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_1/excel/excel.range.yml index 7d48f0e189..3c1db43834 100644 --- a/docs/docs-ref-autogen/excel_1_1/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_1/excel/excel.range.yml @@ -227,7 +227,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecollection.yml index 5f214ed114..9e5e26d040 100644 --- a/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -96,12 +124,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -110,6 +141,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumn.yml index cc992767c8..024f35de0e 100644 --- a/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumn.yml @@ -107,12 +107,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -122,6 +125,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumncollection.yml index 3ba3fef043..a54ce603d1 100644 --- a/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_1/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -101,18 +129,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_1/toc.yml b/docs/docs-ref-autogen/excel_1_1/toc.yml index 2d2f27a0d9..69e02d62f9 100644 --- a/docs/docs-ref-autogen/excel_1_1/toc.yml +++ b/docs/docs-ref-autogen/excel_1_1/toc.yml @@ -433,10 +433,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.comment.yml index c9eecb5d23..938ac1b53b 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -133,7 +133,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -208,7 +208,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.commentcollection.yml index 57a3eadec0..3469b49798 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreply.yml index 19869ee9d3..2e6a4effb4 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -125,7 +125,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreplycollection.yml index f805ce3519..f2e7b85e1f 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.range.yml index 945d9c57d5..7395ed14d6 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.range.yml @@ -535,7 +535,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_10/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_10/toc.yml b/docs/docs-ref-autogen/excel_1_10/toc.yml index 9639d1a216..a7be71d470 100644 --- a/docs/docs-ref-autogen/excel_1_10/toc.yml +++ b/docs/docs-ref-autogen/excel_1_10/toc.yml @@ -1117,10 +1117,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.comment.yml index 7cec2e0b23..ec513809b6 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -144,7 +144,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -190,7 +190,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -265,7 +265,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentcollection.yml index 767f93921b..7dd6c98387 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreply.yml index c82c7052eb..81cb50d121 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -163,7 +163,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreplycollection.yml index 49788139c3..dc01a65989 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.range.yml index 9542540895..2544a483af 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.range.yml @@ -535,7 +535,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_11/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_11/toc.yml b/docs/docs-ref-autogen/excel_1_11/toc.yml index 442ae46b90..9fa2a902a8 100644 --- a/docs/docs-ref-autogen/excel_1_11/toc.yml +++ b/docs/docs-ref-autogen/excel_1_11/toc.yml @@ -1129,10 +1129,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentcollection.yml index 6a247aec66..11a051e863 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreplycollection.yml index 49788139c3..dc01a65989 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.range.yml index e1dd96b4c3..6067a2766c 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.range.yml @@ -577,7 +577,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_12/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_12/toc.yml b/docs/docs-ref-autogen/excel_1_12/toc.yml index 6a88dabc01..15cbc46fc7 100644 --- a/docs/docs-ref-autogen/excel_1_12/toc.yml +++ b/docs/docs-ref-autogen/excel_1_12/toc.yml @@ -1175,10 +1175,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentcollection.yml index 6a247aec66..11a051e863 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreplycollection.yml index 49788139c3..dc01a65989 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.range.yml index 6cdc670c66..b9fdfda3ee 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.range.yml @@ -577,7 +577,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_13/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_13/toc.yml b/docs/docs-ref-autogen/excel_1_13/toc.yml index 96c32d7e73..0bfb319f0f 100644 --- a/docs/docs-ref-autogen/excel_1_13/toc.yml +++ b/docs/docs-ref-autogen/excel_1_13/toc.yml @@ -1185,10 +1185,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentcollection.yml index 2bd2cb7857..c31af6093a 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreplycollection.yml index 790f9415c1..c41e74a4f5 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.range.yml index 20282cfaa0..a16e58d5e5 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.range.yml @@ -577,7 +577,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_14/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_14/toc.yml b/docs/docs-ref-autogen/excel_1_14/toc.yml index 0dba7a59a3..7564e17bf3 100644 --- a/docs/docs-ref-autogen/excel_1_14/toc.yml +++ b/docs/docs-ref-autogen/excel_1_14/toc.yml @@ -1203,10 +1203,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentcollection.yml index 2bd2cb7857..c31af6093a 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreplycollection.yml index 790f9415c1..c41e74a4f5 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.range.yml index c1a4167904..eb465a9bee 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.range.yml @@ -577,7 +577,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_15/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_15/toc.yml b/docs/docs-ref-autogen/excel_1_15/toc.yml index f34152585e..27697fba01 100644 --- a/docs/docs-ref-autogen/excel_1_15/toc.yml +++ b/docs/docs-ref-autogen/excel_1_15/toc.yml @@ -1207,10 +1207,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentcollection.yml index 2bd2cb7857..c31af6093a 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreplycollection.yml index 790f9415c1..c41e74a4f5 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.range.yml index a1b5d5a501..ab2d9cdc90 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.range.yml @@ -577,7 +577,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumn.yml index 977e25f863..14d46a4e8c 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumn.yml @@ -153,12 +153,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -168,6 +171,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumncollection.yml index 2772221510..6ae89c66ad 100644 --- a/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_16/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -141,18 +169,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_16/toc.yml b/docs/docs-ref-autogen/excel_1_16/toc.yml index d69bad5809..c626c3b5ba 100644 --- a/docs/docs-ref-autogen/excel_1_16/toc.yml +++ b/docs/docs-ref-autogen/excel_1_16/toc.yml @@ -1337,10 +1337,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentcollection.yml index 2bd2cb7857..c31af6093a 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreplycollection.yml index 790f9415c1..c41e74a4f5 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.range.yml index a1b5d5a501..ab2d9cdc90 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.range.yml @@ -577,7 +577,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumn.yml index 977e25f863..14d46a4e8c 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumn.yml @@ -153,12 +153,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -168,6 +171,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumncollection.yml index 2772221510..6ae89c66ad 100644 --- a/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_17/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -141,18 +169,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_17/toc.yml b/docs/docs-ref-autogen/excel_1_17/toc.yml index f621b71614..a044c0873e 100644 --- a/docs/docs-ref-autogen/excel_1_17/toc.yml +++ b/docs/docs-ref-autogen/excel_1_17/toc.yml @@ -1343,10 +1343,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.cellcontroltype.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.cellcontroltype.yml index dce9826b84..e09373c891 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.cellcontroltype.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.cellcontroltype.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.CellControlType:enum' package: excel! fullName: Excel.CellControlType summary: Represents the type of cell control. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false fields: diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.checkboxcellcontrol.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.checkboxcellcontrol.yml index cc5c189999..3ffe3e1526 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.checkboxcellcontrol.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.checkboxcellcontrol.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.CheckboxCellControl:interface' package: excel! fullName: Excel.CheckboxCellControl summary: Represents a checkbox. This is a cell control that allows a user to toggle the boolean value in a cell. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: interface diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentcollection.yml index 2bd2cb7857..c31af6093a 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreplycollection.yml index 790f9415c1..c41e74a4f5 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.note.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.note.yml index a514e978b8..0b092260de 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.note.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.note.yml @@ -4,7 +4,30 @@ uid: 'excel!Excel.Note:class' package: excel! fullName: Excel.Note summary: Represents a note in the workbook or worksheet. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -26,7 +49,29 @@ properties: package: excel! fullName: content summary: Gets or sets the text of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -52,7 +97,30 @@ properties: package: excel! fullName: height summary: Specifies the height of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -64,7 +132,32 @@ properties: package: excel! fullName: visible summary: Specifies the visibility of the note. A value of `true` means the note is shown. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -76,7 +169,30 @@ properties: package: excel! fullName: width summary: Specifies the width of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -89,7 +205,30 @@ methods: package: excel! fullName: delete() summary: Deletes the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function deletes the note from cell A2. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItem("A2"); + note.delete(); + + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.notecollection.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.notecollection.yml index 51f8025ee7..ec8d8b0fdb 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.notecollection.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.notecollection.yml @@ -4,7 +4,30 @@ uid: 'excel!Excel.NoteCollection:class' package: excel! fullName: Excel.NoteCollection summary: Represents a collection of note objects that are part of the workbook. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -41,7 +64,30 @@ methods: package: excel! fullName: 'add(cellAddress, content)' summary: Adds a new note with the given content on the given cell. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -76,7 +122,32 @@ methods: package: excel! fullName: getItem(key) summary: Gets a note by its cell address. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -95,7 +166,29 @@ methods: package: excel! fullName: getItemAt(index) summary: Gets a note from the collection based on its position. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.range.yml index aa6e979732..afbadc4f3d 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.range.yml @@ -140,7 +140,35 @@ properties: summary: >- Accesses the cell control applied to this range. If the range has multiple cell controls, this returns `EmptyCellControl`. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -591,7 +619,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -868,7 +919,33 @@ methods: range contains only blank values and controls set to their default value, then the values and control formatting are removed. Otherwise, this sets the cells with controls to their default value and clears the values of the other cells in the range. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumn.yml index 977e25f863..14d46a4e8c 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumn.yml @@ -153,12 +153,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -168,6 +171,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumncollection.yml index 2772221510..6ae89c66ad 100644 --- a/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_18/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -141,18 +169,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_18/toc.yml b/docs/docs-ref-autogen/excel_1_18/toc.yml index cf56e55d32..8609bff627 100644 --- a/docs/docs-ref-autogen/excel_1_18/toc.yml +++ b/docs/docs-ref-autogen/excel_1_18/toc.yml @@ -1361,10 +1361,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_2/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_2/excel/excel.range.yml index 9302b8e918..3f953eeb29 100644 --- a/docs/docs-ref-autogen/excel_1_2/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_2/excel/excel.range.yml @@ -334,7 +334,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecollection.yml index 5f214ed114..9e5e26d040 100644 --- a/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -96,12 +124,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -110,6 +141,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumncollection.yml index 3ba3fef043..a54ce603d1 100644 --- a/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_2/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -101,18 +129,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_2/toc.yml b/docs/docs-ref-autogen/excel_1_2/toc.yml index be544bb6f5..ffd9d315d1 100644 --- a/docs/docs-ref-autogen/excel_1_2/toc.yml +++ b/docs/docs-ref-autogen/excel_1_2/toc.yml @@ -530,10 +530,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_3/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_3/excel/excel.range.yml index 7d9970e7ed..f94b647c38 100644 --- a/docs/docs-ref-autogen/excel_1_3/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_3/excel/excel.range.yml @@ -334,7 +334,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecollection.yml index 5f214ed114..9e5e26d040 100644 --- a/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -96,12 +124,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -110,6 +141,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumncollection.yml index 3ba3fef043..a54ce603d1 100644 --- a/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_3/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -101,18 +129,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_3/toc.yml b/docs/docs-ref-autogen/excel_1_3/toc.yml index f228e585bc..4c990eb58f 100644 --- a/docs/docs-ref-autogen/excel_1_3/toc.yml +++ b/docs/docs-ref-autogen/excel_1_3/toc.yml @@ -538,10 +538,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_4/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_4/excel/excel.range.yml index 883ca16132..3bb78c53ef 100644 --- a/docs/docs-ref-autogen/excel_1_4/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_4/excel/excel.range.yml @@ -334,7 +334,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecollection.yml index 50d37fafc2..b8a977a2f1 100644 --- a/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_4/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_4/toc.yml b/docs/docs-ref-autogen/excel_1_4/toc.yml index 97d7b0ce6b..8d6185c41a 100644 --- a/docs/docs-ref-autogen/excel_1_4/toc.yml +++ b/docs/docs-ref-autogen/excel_1_4/toc.yml @@ -546,10 +546,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_5/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_5/excel/excel.range.yml index 883ca16132..3bb78c53ef 100644 --- a/docs/docs-ref-autogen/excel_1_5/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_5/excel/excel.range.yml @@ -334,7 +334,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecollection.yml index 50d37fafc2..b8a977a2f1 100644 --- a/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_5/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_5/toc.yml b/docs/docs-ref-autogen/excel_1_5/toc.yml index 9cf99dd72f..18aa499786 100644 --- a/docs/docs-ref-autogen/excel_1_5/toc.yml +++ b/docs/docs-ref-autogen/excel_1_5/toc.yml @@ -554,10 +554,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_6/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_6/excel/excel.range.yml index 7cde519e2c..e05e5fe387 100644 --- a/docs/docs-ref-autogen/excel_1_6/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_6/excel/excel.range.yml @@ -346,7 +346,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecollection.yml index 50d37fafc2..b8a977a2f1 100644 --- a/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_6/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_6/toc.yml b/docs/docs-ref-autogen/excel_1_6/toc.yml index d3add97d35..b2fe47d633 100644 --- a/docs/docs-ref-autogen/excel_1_6/toc.yml +++ b/docs/docs-ref-autogen/excel_1_6/toc.yml @@ -636,10 +636,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_7/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_7/excel/excel.range.yml index 7e29f12ad2..aa12c6a227 100644 --- a/docs/docs-ref-autogen/excel_1_7/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_7/excel/excel.range.yml @@ -475,7 +475,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecollection.yml index 81338d10d2..b360ffdaf0 100644 --- a/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_7/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_7/toc.yml b/docs/docs-ref-autogen/excel_1_7/toc.yml index 20e4e83c14..4e9046eef1 100644 --- a/docs/docs-ref-autogen/excel_1_7/toc.yml +++ b/docs/docs-ref-autogen/excel_1_7/toc.yml @@ -738,10 +738,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_8/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_8/excel/excel.range.yml index f540b57e35..5920f712c5 100644 --- a/docs/docs-ref-autogen/excel_1_8/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_8/excel/excel.range.yml @@ -487,7 +487,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecollection.yml index 81338d10d2..b360ffdaf0 100644 --- a/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_8/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_8/toc.yml b/docs/docs-ref-autogen/excel_1_8/toc.yml index ff4d7b7432..c730e78390 100644 --- a/docs/docs-ref-autogen/excel_1_8/toc.yml +++ b/docs/docs-ref-autogen/excel_1_8/toc.yml @@ -832,10 +832,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_1_9/excel/excel.range.yml b/docs/docs-ref-autogen/excel_1_9/excel/excel.range.yml index 64c42741ea..264ebb235c 100644 --- a/docs/docs-ref-autogen/excel_1_9/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_1_9/excel/excel.range.yml @@ -499,7 +499,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumn.yml index 1e886ba9e8..09d62a7325 100644 --- a/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumn.yml @@ -119,12 +119,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -134,6 +137,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumncollection.yml index d39b1f0e8c..97041d7437 100644 --- a/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_1_9/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -114,18 +142,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_1_9/toc.yml b/docs/docs-ref-autogen/excel_1_9/toc.yml index fe1bc9f7b0..0fcf30d87c 100644 --- a/docs/docs-ref-autogen/excel_1_9/toc.yml +++ b/docs/docs-ref-autogen/excel_1_9/toc.yml @@ -1073,10 +1073,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.cellcontroltype.yml b/docs/docs-ref-autogen/excel_online/excel/excel.cellcontroltype.yml index dce9826b84..e09373c891 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.cellcontroltype.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.cellcontroltype.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.CellControlType:enum' package: excel! fullName: Excel.CellControlType summary: Represents the type of cell control. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false fields: diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.checkboxcellcontrol.yml b/docs/docs-ref-autogen/excel_online/excel/excel.checkboxcellcontrol.yml index cc5c189999..3ffe3e1526 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.checkboxcellcontrol.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.checkboxcellcontrol.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.CheckboxCellControl:interface' package: excel! fullName: Excel.CheckboxCellControl summary: Represents a checkbox. This is a cell control that allows a user to toggle the boolean value in a cell. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: interface diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.comment.yml b/docs/docs-ref-autogen/excel_online/excel/excel.comment.yml index 907f7323af..12d8ea6be4 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.comment.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.comment.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -156,7 +156,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -202,7 +202,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -277,7 +277,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.commentcollection.yml b/docs/docs-ref-autogen/excel_online/excel/excel.commentcollection.yml index 2bd2cb7857..c31af6093a 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.commentcollection.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.commentcollection.yml @@ -53,7 +53,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.commentreply.yml b/docs/docs-ref-autogen/excel_online/excel/excel.commentreply.yml index bac9704c3e..ac68781d4b 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.commentreply.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.commentreply.yml @@ -48,7 +48,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -175,7 +175,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.commentreplycollection.yml b/docs/docs-ref-autogen/excel_online/excel/excel.commentreplycollection.yml index 790f9415c1..c41e74a4f5 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.commentreplycollection.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.commentreplycollection.yml @@ -51,7 +51,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.commentrichcontent.yml b/docs/docs-ref-autogen/excel_online/excel/excel.commentrichcontent.yml index 8f3a6f8315..8ae3fe2997 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.commentrichcontent.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.commentrichcontent.yml @@ -26,7 +26,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.contenttype.yml b/docs/docs-ref-autogen/excel_online/excel/excel.contenttype.yml index 6d45e75568..b4899fe2cc 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.contenttype.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.contenttype.yml @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.note.yml b/docs/docs-ref-autogen/excel_online/excel/excel.note.yml index a514e978b8..0b092260de 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.note.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.note.yml @@ -4,7 +4,30 @@ uid: 'excel!Excel.Note:class' package: excel! fullName: Excel.Note summary: Represents a note in the workbook or worksheet. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -26,7 +49,29 @@ properties: package: excel! fullName: content summary: Gets or sets the text of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -52,7 +97,30 @@ properties: package: excel! fullName: height summary: Specifies the height of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -64,7 +132,32 @@ properties: package: excel! fullName: visible summary: Specifies the visibility of the note. A value of `true` means the note is shown. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -76,7 +169,30 @@ properties: package: excel! fullName: width summary: Specifies the width of the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -89,7 +205,30 @@ methods: package: excel! fullName: delete() summary: Deletes the note. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function deletes the note from cell A2. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItem("A2"); + note.delete(); + + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.notecollection.yml b/docs/docs-ref-autogen/excel_online/excel/excel.notecollection.yml index 51f8025ee7..ec8d8b0fdb 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.notecollection.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.notecollection.yml @@ -4,7 +4,30 @@ uid: 'excel!Excel.NoteCollection:class' package: excel! fullName: Excel.NoteCollection summary: Represents a collection of note objects that are part of the workbook. -remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -41,7 +64,30 @@ methods: package: excel! fullName: 'add(cellAddress, content)' summary: Adds a new note with the given content on the given cell. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -76,7 +122,32 @@ methods: package: excel! fullName: getItem(key) summary: Gets a note by its cell address. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -95,7 +166,29 @@ methods: package: excel! fullName: getItemAt(index) summary: Gets a note from the collection based on its position. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.range.yml b/docs/docs-ref-autogen/excel_online/excel/excel.range.yml index aa6e979732..afbadc4f3d 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.range.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.range.yml @@ -140,7 +140,35 @@ properties: summary: >- Accesses the cell control applied to this range. If the range has multiple cell controls, this returns `EmptyCellControl`. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -591,7 +619,30 @@ properties: Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. - remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: @@ -868,7 +919,33 @@ methods: range contains only blank values and controls set to their default value, then the values and control formatting are removed. Otherwise, this sets the cells with controls to their default value and clears the values of the other cells in the range. - remarks: '\[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' + remarks: >- + \[ [API set: ExcelApi 1.18](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.tablecollection.yml b/docs/docs-ref-autogen/excel_online/excel/excel.tablecollection.yml index c18f2aa890..cd49ca931d 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.tablecollection.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.tablecollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableCollection:class' package: excel! fullName: Excel.TableCollection summary: 'Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached.' -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -109,12 +137,15 @@ methods: package: excel! fullName: getItem(key) summary: Gets a table by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const table = context.workbook.tables.getItem(tableName); @@ -123,6 +154,30 @@ methods: console.log(table.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumn.yml b/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumn.yml index 977e25f863..14d46a4e8c 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumn.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumn.yml @@ -153,12 +153,15 @@ methods: package: excel! fullName: getDataBodyRange() summary: Gets the range object associated with the data body of the column. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableName = 'Table1'; const column = context.workbook.tables.getItem(tableName).columns.getItemAt(0); @@ -168,6 +171,30 @@ methods: console.log(dataBodyRange.address); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumncollection.yml b/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumncollection.yml index 2772221510..6ae89c66ad 100644 --- a/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumncollection.yml +++ b/docs/docs-ref-autogen/excel_online/excel/excel.tablecolumncollection.yml @@ -4,7 +4,35 @@ uid: 'excel!Excel.TableColumnCollection:class' package: excel! fullName: Excel.TableColumnCollection summary: Represents a collection of all the columns that are part of the table. -remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]' +remarks: >- + \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); + + ``` isPreview: false isDeprecated: false type: class @@ -141,18 +169,43 @@ methods: package: excel! fullName: getItem(key) summary: Gets a column object by name or ID. - remarks: |- + remarks: >- \[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \] + #### Examples + ```TypeScript + await Excel.run(async (context) => { const tableColumn = context.workbook.tables.getItem('Table1').columns.getItem(0); tableColumn.load('name'); await context.sync(); console.log(tableColumn.name); }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excel_online/toc.yml b/docs/docs-ref-autogen/excel_online/toc.yml index ac1aa12d26..23e5661d98 100644 --- a/docs/docs-ref-autogen/excel_online/toc.yml +++ b/docs/docs-ref-autogen/excel_online/toc.yml @@ -1377,10 +1377,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/onenote/toc.yml b/docs/docs-ref-autogen/onenote/toc.yml index 3ab6b75b53..9ae25bef1e 100644 --- a/docs/docs-ref-autogen/onenote/toc.yml +++ b/docs/docs-ref-autogen/onenote/toc.yml @@ -395,10 +395,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..64f80de234 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook/outlook/office.notificationmessageaction.yml index 78289ef7fe..a02c2f77b9 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.notificationmessageaction.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.notificationmessageaction.yml @@ -114,6 +114,12 @@ properties: - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + + + - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml b/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml index aff7a65062..0bc15e22e2 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml @@ -279,6 +279,12 @@ properties: - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + + + - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for + the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook/outlook/office.spamreportingeventcompletedoptions.yml b/docs/docs-ref-autogen/outlook/outlook/office.spamreportingeventcompletedoptions.yml index 469bb5eb33..bc0d81c0d2 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.spamreportingeventcompletedoptions.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.spamreportingeventcompletedoptions.yml @@ -192,6 +192,12 @@ properties: occurs, any task pane that's open or pinned is closed. + - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. + + - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the diff --git a/docs/docs-ref-autogen/outlook/toc.yml b/docs/docs-ref-autogen/outlook/toc.yml index d55f54671e..eba038f489 100644 --- a/docs/docs-ref-autogen/outlook/toc.yml +++ b/docs/docs-ref-autogen/outlook/toc.yml @@ -501,10 +501,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_1/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_1/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_1/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_1/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_1/toc.yml b/docs/docs-ref-autogen/outlook_1_1/toc.yml index 9e99ce0763..4518693310 100644 --- a/docs/docs-ref-autogen/outlook_1_1/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_1/toc.yml @@ -365,10 +365,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_10/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_10/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook_1_10/outlook/office.notificationmessageaction.yml index 78289ef7fe..a02c2f77b9 100644 --- a/docs/docs-ref-autogen/outlook_1_10/outlook/office.notificationmessageaction.yml +++ b/docs/docs-ref-autogen/outlook_1_10/outlook/office.notificationmessageaction.yml @@ -114,6 +114,12 @@ properties: - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + + + - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_10/toc.yml b/docs/docs-ref-autogen/outlook_1_10/toc.yml index 55633bd168..72dcd57c0c 100644 --- a/docs/docs-ref-autogen/outlook_1_10/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_10/toc.yml @@ -455,10 +455,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_11/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_11/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook_1_11/outlook/office.notificationmessageaction.yml index 78289ef7fe..a02c2f77b9 100644 --- a/docs/docs-ref-autogen/outlook_1_11/outlook/office.notificationmessageaction.yml +++ b/docs/docs-ref-autogen/outlook_1_11/outlook/office.notificationmessageaction.yml @@ -114,6 +114,12 @@ properties: - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + + + - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_11/toc.yml b/docs/docs-ref-autogen/outlook_1_11/toc.yml index 1f768b1b20..be89889e57 100644 --- a/docs/docs-ref-autogen/outlook_1_11/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_11/toc.yml @@ -457,10 +457,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_12/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_12/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook_1_12/outlook/office.notificationmessageaction.yml index 78289ef7fe..a02c2f77b9 100644 --- a/docs/docs-ref-autogen/outlook_1_12/outlook/office.notificationmessageaction.yml +++ b/docs/docs-ref-autogen/outlook_1_12/outlook/office.notificationmessageaction.yml @@ -114,6 +114,12 @@ properties: - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + + + - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_12/toc.yml b/docs/docs-ref-autogen/outlook_1_12/toc.yml index 6ef876e0a9..4c24f08ddb 100644 --- a/docs/docs-ref-autogen/outlook_1_12/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_12/toc.yml @@ -459,10 +459,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_13/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_13/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook_1_13/outlook/office.notificationmessageaction.yml index 78289ef7fe..a02c2f77b9 100644 --- a/docs/docs-ref-autogen/outlook_1_13/outlook/office.notificationmessageaction.yml +++ b/docs/docs-ref-autogen/outlook_1_13/outlook/office.notificationmessageaction.yml @@ -114,6 +114,12 @@ properties: - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + + + - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_13/toc.yml b/docs/docs-ref-autogen/outlook_1_13/toc.yml index 52e27aca17..a2bc55d54c 100644 --- a/docs/docs-ref-autogen/outlook_1_13/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_13/toc.yml @@ -471,10 +471,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_14/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_14/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook_1_14/outlook/office.notificationmessageaction.yml index 78289ef7fe..a02c2f77b9 100644 --- a/docs/docs-ref-autogen/outlook_1_14/outlook/office.notificationmessageaction.yml +++ b/docs/docs-ref-autogen/outlook_1_14/outlook/office.notificationmessageaction.yml @@ -114,6 +114,12 @@ properties: - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + + + - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_14/outlook/office.smartalertseventcompletedoptions.yml b/docs/docs-ref-autogen/outlook_1_14/outlook/office.smartalertseventcompletedoptions.yml index a87c453aa4..559861f313 100644 --- a/docs/docs-ref-autogen/outlook_1_14/outlook/office.smartalertseventcompletedoptions.yml +++ b/docs/docs-ref-autogen/outlook_1_14/outlook/office.smartalertseventcompletedoptions.yml @@ -279,6 +279,12 @@ properties: - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + + + - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for + the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_14/toc.yml b/docs/docs-ref-autogen/outlook_1_14/toc.yml index d9192e3957..19b54381f2 100644 --- a/docs/docs-ref-autogen/outlook_1_14/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_14/toc.yml @@ -485,10 +485,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessageaction.yml index 78289ef7fe..a02c2f77b9 100644 --- a/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessageaction.yml +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessageaction.yml @@ -114,6 +114,12 @@ properties: - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + + + - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.smartalertseventcompletedoptions.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.smartalertseventcompletedoptions.yml index afdb26c1ba..19ad937f67 100644 --- a/docs/docs-ref-autogen/outlook_1_15/outlook/office.smartalertseventcompletedoptions.yml +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.smartalertseventcompletedoptions.yml @@ -279,6 +279,12 @@ properties: - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + + + - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for + the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventcompletedoptions.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventcompletedoptions.yml index 962492a7f5..da117ba948 100644 --- a/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventcompletedoptions.yml +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventcompletedoptions.yml @@ -191,6 +191,12 @@ properties: occurs, any task pane that's open or pinned is closed. + - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler + for the `Office.EventType.InitializationContextChanged` event. You can then pass the [event + arguments](https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true) + to the `contextData` property. + + - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the diff --git a/docs/docs-ref-autogen/outlook_1_15/toc.yml b/docs/docs-ref-autogen/outlook_1_15/toc.yml index 216616455d..8f3a1986da 100644 --- a/docs/docs-ref-autogen/outlook_1_15/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_15/toc.yml @@ -491,10 +491,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_2/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_2/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_2/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_2/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_2/toc.yml b/docs/docs-ref-autogen/outlook_1_2/toc.yml index 3288ccb714..b2afa0e55c 100644 --- a/docs/docs-ref-autogen/outlook_1_2/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_2/toc.yml @@ -367,10 +367,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_3/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_3/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_3/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_3/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_3/toc.yml b/docs/docs-ref-autogen/outlook_1_3/toc.yml index 754a4fea30..1bf756cc80 100644 --- a/docs/docs-ref-autogen/outlook_1_3/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_3/toc.yml @@ -375,10 +375,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_4/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_4/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_4/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_4/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_4/toc.yml b/docs/docs-ref-autogen/outlook_1_4/toc.yml index 754a4fea30..1bf756cc80 100644 --- a/docs/docs-ref-autogen/outlook_1_4/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_4/toc.yml @@ -375,10 +375,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_5/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_5/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_5/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_5/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_5/toc.yml b/docs/docs-ref-autogen/outlook_1_5/toc.yml index 754a4fea30..1bf756cc80 100644 --- a/docs/docs-ref-autogen/outlook_1_5/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_5/toc.yml @@ -375,10 +375,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_6/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_6/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_6/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_6/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_6/toc.yml b/docs/docs-ref-autogen/outlook_1_6/toc.yml index 754a4fea30..1bf756cc80 100644 --- a/docs/docs-ref-autogen/outlook_1_6/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_6/toc.yml @@ -375,10 +375,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_7/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_7/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_7/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_7/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_7/toc.yml b/docs/docs-ref-autogen/outlook_1_7/toc.yml index 1b8679c57f..0f5300dda3 100644 --- a/docs/docs-ref-autogen/outlook_1_7/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_7/toc.yml @@ -405,10 +405,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_8/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_8/toc.yml b/docs/docs-ref-autogen/outlook_1_8/toc.yml index 96db797493..c9e606b0cc 100644 --- a/docs/docs-ref-autogen/outlook_1_8/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_8/toc.yml @@ -439,10 +439,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetails.yml index b4721f33a4..359a864ef2 100644 --- a/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetails.yml +++ b/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetails.yml @@ -116,13 +116,10 @@ properties: uid: 'outlook!Office.AttachmentDetails#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. - - - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + summary: Gets the name of the attachment. + remarks: >- + **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name + extension in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetailscompose.yml index 62efcf5af9..1def736a13 100644 --- a/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetailscompose.yml +++ b/docs/docs-ref-autogen/outlook_1_9/outlook/office.attachmentdetailscompose.yml @@ -28,7 +28,25 @@ properties: package: outlook! fullName: attachmentType summary: Gets a value that indicates the attachment's type. - remarks: '' + remarks: >- + **Important**: + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + File**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: @@ -65,13 +83,30 @@ properties: uid: 'outlook!Office.AttachmentDetailsCompose#name:member' package: outlook! fullName: name - summary: >- - Gets the name of the attachment. + summary: Gets the name of the attachment. + remarks: >- + **Important**: - **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` - includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. - remarks: '' + - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the + `name` property. + + + - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached + using drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. However, a message or appointment that's attached + using the **Forward as Attachment** option is of type `Office.MailboxEnums.AttachmentType.Item`. In + this case, an extension isn't returned in the `name` property. + + + - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach + Item**, or **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file + name extension isn't returned in the `name` property. A calendar item that's attached + + + - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.File`. The file name + extension is returned in the `name` property. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/outlook_1_9/toc.yml b/docs/docs-ref-autogen/outlook_1_9/toc.yml index 96db797493..c9e606b0cc 100644 --- a/docs/docs-ref-autogen/outlook_1_9/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_9/toc.yml @@ -439,10 +439,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint/toc.yml b/docs/docs-ref-autogen/powerpoint/toc.yml index 9ee553a862..06f62eac10 100644 --- a/docs/docs-ref-autogen/powerpoint/toc.yml +++ b/docs/docs-ref-autogen/powerpoint/toc.yml @@ -435,10 +435,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint_1_1/toc.yml b/docs/docs-ref-autogen/powerpoint_1_1/toc.yml index 84dfa78ecd..d89cb79938 100644 --- a/docs/docs-ref-autogen/powerpoint_1_1/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_1/toc.yml @@ -303,10 +303,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint_1_2/toc.yml b/docs/docs-ref-autogen/powerpoint_1_2/toc.yml index 67d552c17e..b628680516 100644 --- a/docs/docs-ref-autogen/powerpoint_1_2/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_2/toc.yml @@ -311,10 +311,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint_1_3/toc.yml b/docs/docs-ref-autogen/powerpoint_1_3/toc.yml index cb95ccc3b8..5fe31ecc08 100644 --- a/docs/docs-ref-autogen/powerpoint_1_3/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_3/toc.yml @@ -329,10 +329,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint_1_4/toc.yml b/docs/docs-ref-autogen/powerpoint_1_4/toc.yml index 7e51025989..c4a07d0878 100644 --- a/docs/docs-ref-autogen/powerpoint_1_4/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_4/toc.yml @@ -365,10 +365,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint_1_5/toc.yml b/docs/docs-ref-autogen/powerpoint_1_5/toc.yml index aedc717d32..e3da4762fa 100644 --- a/docs/docs-ref-autogen/powerpoint_1_5/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_5/toc.yml @@ -369,10 +369,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint_1_6/toc.yml b/docs/docs-ref-autogen/powerpoint_1_6/toc.yml index 8d789a06f8..fd3a2e1caf 100644 --- a/docs/docs-ref-autogen/powerpoint_1_6/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_6/toc.yml @@ -373,10 +373,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/powerpoint_1_7/toc.yml b/docs/docs-ref-autogen/powerpoint_1_7/toc.yml index cf213bf186..ffcd8dfaf0 100644 --- a/docs/docs-ref-autogen/powerpoint_1_7/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_7/toc.yml @@ -387,10 +387,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/visio/toc.yml b/docs/docs-ref-autogen/visio/toc.yml index ba216b00ce..c74e9f8039 100644 --- a/docs/docs-ref-autogen/visio/toc.yml +++ b/docs/docs-ref-autogen/visio/toc.yml @@ -143,10 +143,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word/toc.yml b/docs/docs-ref-autogen/word/toc.yml index 6a52016243..4ce7fccdba 100644 --- a/docs/docs-ref-autogen/word/toc.yml +++ b/docs/docs-ref-autogen/word/toc.yml @@ -615,10 +615,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_1/toc.yml b/docs/docs-ref-autogen/word_1_1/toc.yml index bd7c48645a..bde522a341 100644 --- a/docs/docs-ref-autogen/word_1_1/toc.yml +++ b/docs/docs-ref-autogen/word_1_1/toc.yml @@ -345,10 +345,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_2/toc.yml b/docs/docs-ref-autogen/word_1_2/toc.yml index bd7c48645a..bde522a341 100644 --- a/docs/docs-ref-autogen/word_1_2/toc.yml +++ b/docs/docs-ref-autogen/word_1_2/toc.yml @@ -345,10 +345,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_3/toc.yml b/docs/docs-ref-autogen/word_1_3/toc.yml index 0c1f433b39..8409e892d1 100644 --- a/docs/docs-ref-autogen/word_1_3/toc.yml +++ b/docs/docs-ref-autogen/word_1_3/toc.yml @@ -401,10 +401,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml index 0c1f433b39..8409e892d1 100644 --- a/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml @@ -401,10 +401,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_4/toc.yml b/docs/docs-ref-autogen/word_1_4/toc.yml index e444870078..2cee1c66ef 100644 --- a/docs/docs-ref-autogen/word_1_4/toc.yml +++ b/docs/docs-ref-autogen/word_1_4/toc.yml @@ -429,10 +429,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml index e444870078..2cee1c66ef 100644 --- a/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml @@ -429,10 +429,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_5/toc.yml b/docs/docs-ref-autogen/word_1_5/toc.yml index 57102e6492..b945ec83b7 100644 --- a/docs/docs-ref-autogen/word_1_5/toc.yml +++ b/docs/docs-ref-autogen/word_1_5/toc.yml @@ -471,10 +471,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml index 57102e6492..b945ec83b7 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml @@ -471,10 +471,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_6/toc.yml b/docs/docs-ref-autogen/word_1_6/toc.yml index c277b4dff4..467b452581 100644 --- a/docs/docs-ref-autogen/word_1_6/toc.yml +++ b/docs/docs-ref-autogen/word_1_6/toc.yml @@ -487,10 +487,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_7/toc.yml b/docs/docs-ref-autogen/word_1_7/toc.yml index 205798cb87..bb074f6b88 100644 --- a/docs/docs-ref-autogen/word_1_7/toc.yml +++ b/docs/docs-ref-autogen/word_1_7/toc.yml @@ -513,10 +513,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_8/toc.yml b/docs/docs-ref-autogen/word_1_8/toc.yml index 82d2f3ba27..41ef6764e8 100644 --- a/docs/docs-ref-autogen/word_1_8/toc.yml +++ b/docs/docs-ref-autogen/word_1_8/toc.yml @@ -517,10 +517,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_1_9/toc.yml b/docs/docs-ref-autogen/word_1_9/toc.yml index 1853c88282..89904bc157 100644 --- a/docs/docs-ref-autogen/word_1_9/toc.yml +++ b/docs/docs-ref-autogen/word_1_9/toc.yml @@ -525,10 +525,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_desktop_1_1/toc.yml b/docs/docs-ref-autogen/word_desktop_1_1/toc.yml index a207de4fdb..77b59265f1 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/toc.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/toc.yml @@ -543,10 +543,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_desktop_1_2/toc.yml b/docs/docs-ref-autogen/word_desktop_1_2/toc.yml index 77bfe8d85f..04cc06b406 100644 --- a/docs/docs-ref-autogen/word_desktop_1_2/toc.yml +++ b/docs/docs-ref-autogen/word_desktop_1_2/toc.yml @@ -597,10 +597,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/docs/docs-ref-autogen/word_online/toc.yml b/docs/docs-ref-autogen/word_online/toc.yml index 1853c88282..89904bc157 100644 --- a/docs/docs-ref-autogen/word_online/toc.yml +++ b/docs/docs-ref-autogen/word_online/toc.yml @@ -525,10 +525,6 @@ items: href: ../../manifest/disableentityhighlighting.md - name: DisplayName href: ../../manifest/displayname.md - - name: EquivalentAddin - href: ../../manifest/equivalentaddin.md - - name: EquivalentAddins - href: ../../manifest/equivalentaddins.md - name: ExtendedOverrides href: ../../manifest/extendedoverrides.md - name: FileName diff --git a/generate-docs/API Coverage Report.csv b/generate-docs/API Coverage Report.csv index 8c1a8a33be..75c769b030 100644 --- a/generate-docs/API Coverage Report.csv +++ b/generate-docs/API Coverage Report.csv @@ -561,7 +561,7 @@ Excel.CellBorderCollection,"right",Property,Fine,false Excel.CellBorderCollection,"top",Property,Fine,false Excel.CellBorderCollection,"vertical",Property,Fine,false Excel.CellControl,N/A,TypeAlias,Fine,false -Excel.CellControlType,N/A,Enum,Unknown,false +Excel.CellControlType,N/A,Enum,Unknown,true Excel.CellControlType,"checkbox",EnumField,Fine,false Excel.CellControlType,"dropdown",EnumField,Fine,false Excel.CellControlType,"empty",EnumField,Fine,false @@ -1778,7 +1778,7 @@ Excel.ChartType,"xyscatterSmoothNoMarkers",EnumField,Fine,false Excel.ChartUnderlineStyle,N/A,Enum,Fine,false Excel.ChartUnderlineStyle,"none",EnumField,Fine,false Excel.ChartUnderlineStyle,"single",EnumField,Fine,false -Excel.CheckboxCellControl,N/A,Interface,Missing,false +Excel.CheckboxCellControl,N/A,Interface,Missing,true Excel.CheckboxCellControl,"type",Property,Missing,false Excel.ClearApplyTo,N/A,Enum,Unknown,true Excel.ClearApplyTo,"all",EnumField,Fine,false @@ -4632,14 +4632,14 @@ Excel.NotAvailableErrorCellValueSubType,"stockHistoryInvalidProperty",EnumField, Excel.NotAvailableErrorCellValueSubType,"stockHistoryNoData",EnumField,Great,false Excel.NotAvailableErrorCellValueSubType,"unknown",EnumField,Good,false Excel.NotAvailableErrorCellValueSubType,"vlookupValueNotFound",EnumField,Excellent,false -Excel.Note,N/A,Class,Unknown,false +Excel.Note,N/A,Class,Unknown,true Excel.Note,"authorName",Property,Poor,false -Excel.Note,"content",Property,Poor,false +Excel.Note,"content",Property,Poor,true Excel.Note,"context",Property,Excellent,false -Excel.Note,"height",Property,Good,false -Excel.Note,"visible",Property,Excellent,false -Excel.Note,"width",Property,Good,false -Excel.Note,"delete()",Method,Poor,false +Excel.Note,"height",Property,Good,true +Excel.Note,"visible",Property,Excellent,true +Excel.Note,"width",Property,Good,true +Excel.Note,"delete()",Method,Poor,true Excel.Note,"getLocation()",Method,Poor,false Excel.Note,"load(options)",Method,Excellent,false Excel.Note,"load(propertyNames)",Method,Excellent,false @@ -4647,13 +4647,13 @@ Excel.Note,"load(propertyNamesAndPaths)",Method,Excellent,false Excel.Note,"set(properties, options)",Method,Good,false Excel.Note,"set(properties)",Method,Good,false Excel.Note,"toJSON()",Method,Excellent,false -Excel.NoteCollection,N/A,Class,Unknown,false +Excel.NoteCollection,N/A,Class,Unknown,true Excel.NoteCollection,"context",Property,Excellent,false Excel.NoteCollection,"items",Property,Poor,false -Excel.NoteCollection,"add(cellAddress, content)",Method,Fine,false +Excel.NoteCollection,"add(cellAddress, content)",Method,Fine,true Excel.NoteCollection,"getCount()",Method,Poor,false -Excel.NoteCollection,"getItem(key)",Method,Poor,false -Excel.NoteCollection,"getItemAt(index)",Method,Fine,false +Excel.NoteCollection,"getItem(key)",Method,Poor,true +Excel.NoteCollection,"getItemAt(index)",Method,Fine,true Excel.NoteCollection,"getItemOrNullObject(key)",Method,Excellent,false Excel.NoteCollection,"load(options)",Method,Excellent,false Excel.NoteCollection,"load(propertyNames)",Method,Excellent,false @@ -5152,7 +5152,7 @@ Excel.Range,"columnHidden",Property,Excellent,false Excel.Range,"columnIndex",Property,Great,false Excel.Range,"conditionalFormats",Property,Good,false Excel.Range,"context",Property,Excellent,false -Excel.Range,"control",Property,Great,false +Excel.Range,"control",Property,Great,true Excel.Range,"dataValidation",Property,Good,false Excel.Range,"format",Property,Great,false Excel.Range,"formulas",Property,Great,false @@ -5177,7 +5177,7 @@ Excel.Range,"sort",Property,Poor,true Excel.Range,"style",Property,Excellent,true Excel.Range,"text",Property,Great,false Excel.Range,"top",Property,Good,false -Excel.Range,"values",Property,Excellent,false +Excel.Range,"values",Property,Excellent,true Excel.Range,"valuesAsJson",Property,Excellent,true Excel.Range,"valuesAsJsonLocal",Property,Excellent,false Excel.Range,"valueTypes",Property,Good,false @@ -5188,7 +5188,7 @@ Excel.Range,"autoFill(destinationRange, autoFillTypeString)",Method,Good,false Excel.Range,"calculate()",Method,Fine,false Excel.Range,"clear(applyTo)",Method,Good,true Excel.Range,"clear(applyToString)",Method,Good,false -Excel.Range,"clearOrResetContents()",Method,Excellent,false +Excel.Range,"clearOrResetContents()",Method,Excellent,true Excel.Range,"convertDataTypeToText()",Method,Fine,false Excel.Range,"convertToLinkedDataType(serviceID, languageCulture)",Method,Fine,false Excel.Range,"copyFrom(sourceRange, copyType, skipBlanks, transpose)",Method,Great,true @@ -6181,7 +6181,7 @@ Excel.TableChangedEventArgs,"type",Property,Fine,false Excel.TableChangedEventArgs,"worksheetId",Property,Fine,true Excel.TableChangedEventArgs,"getRange(ctx)",Method,Good,false Excel.TableChangedEventArgs,"getRangeOrNullObject(ctx)",Method,Great,false -Excel.TableCollection,N/A,Class,Unknown,false +Excel.TableCollection,N/A,Class,Unknown,true Excel.TableCollection,"context",Property,Excellent,false Excel.TableCollection,"count",Property,Fine,false Excel.TableCollection,"items",Property,Poor,false @@ -6214,7 +6214,7 @@ Excel.TableColumn,"load(propertyNamesAndPaths)",Method,Excellent,false Excel.TableColumn,"set(properties, options)",Method,Good,false Excel.TableColumn,"set(properties)",Method,Good,false Excel.TableColumn,"toJSON()",Method,Excellent,false -Excel.TableColumnCollection,N/A,Class,Unknown,false +Excel.TableColumnCollection,N/A,Class,Unknown,true Excel.TableColumnCollection,"context",Property,Excellent,false Excel.TableColumnCollection,"count",Property,Fine,false Excel.TableColumnCollection,"items",Property,Poor,false @@ -8937,18 +8937,18 @@ Office.AppointmentTimeChangedEventArgs,"type",Property,Fine,false Office.AttachmentContent,N/A,Interface,Good,false Office.AttachmentContent,"content",Property,Fine,false Office.AttachmentContent,"format",Property,Excellent,true -Office.AttachmentDetails,N/A,Interface,Good,true +Office.AttachmentDetails,N/A,Interface,Unknown,true Office.AttachmentDetails,"attachmentType",Property,Fine,false Office.AttachmentDetails,"contentType",Property,Deprecated,false Office.AttachmentDetails,"id",Property,Good,false Office.AttachmentDetails,"isInline",Property,Good,false -Office.AttachmentDetails,"name",Property,Fine,false +Office.AttachmentDetails,"name",Property,Poor,false Office.AttachmentDetails,"size",Property,Poor,false Office.AttachmentDetailsCompose,N/A,Interface,Unknown,false Office.AttachmentDetailsCompose,"attachmentType",Property,Fine,false Office.AttachmentDetailsCompose,"id",Property,Poor,false Office.AttachmentDetailsCompose,"isInline",Property,Good,false -Office.AttachmentDetailsCompose,"name",Property,Fine,false +Office.AttachmentDetailsCompose,"name",Property,Poor,false Office.AttachmentDetailsCompose,"size",Property,Poor,false Office.AttachmentDetailsCompose,"url",Property,Good,false Office.AttachmentsChangedEventArgs,N/A,Interface,Unknown,true diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts index fa256ca440..cae135859c 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts @@ -1435,8 +1435,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts index 5dbf5586f4..9ac997aee3 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts @@ -3786,6 +3786,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -3799,8 +3814,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -3851,8 +3881,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -9590,6 +9621,10 @@ export declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts index a67a02a339..83b99b5a41 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts @@ -3798,6 +3798,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -3811,8 +3826,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -3863,8 +3893,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -9614,6 +9645,10 @@ export declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts index 8d00d462e4..b87c6c855d 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts @@ -3798,6 +3798,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -3811,8 +3826,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -3863,8 +3893,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -9614,6 +9645,10 @@ export declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts index 32f82f6ccf..15905787f7 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts @@ -3813,6 +3813,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -3826,8 +3841,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -3878,8 +3908,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -9882,6 +9913,10 @@ export declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts index 3de06752b1..19fdb6c4ff 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts @@ -3924,6 +3924,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -3937,8 +3952,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -3989,8 +4019,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -10248,6 +10279,10 @@ export declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } @@ -12327,6 +12362,10 @@ export declare namespace Office { * * - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. * Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + * + * - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData?: any; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/outlook.d.ts index 26eea8ad24..451833a595 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/outlook.d.ts @@ -3999,6 +3999,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -4012,8 +4027,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -4064,8 +4094,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -12275,6 +12306,10 @@ export declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } @@ -14361,6 +14396,10 @@ export declare namespace Office { * * - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. * Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + * + * - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData?: any; /** @@ -14540,6 +14579,10 @@ export declare namespace Office { * * - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed. * + * - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. + * * - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation * of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using * `JSON.parse()` once you retrieve it. diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts index 404be25a42..b9dd0e4798 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts @@ -1558,8 +1558,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts index 0aa0a0ce97..9495355e8d 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts @@ -1733,8 +1733,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts index 129ce43fb9..364de547ea 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts @@ -1733,8 +1733,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts index c4fd0e561b..1da227790c 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts @@ -1733,8 +1733,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts index 0226e43953..938b023675 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts @@ -1786,8 +1786,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts index 89d093b456..473df1f54a 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts @@ -2775,8 +2775,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts index 05d3b0c3d1..f3cdc2f570 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts @@ -3512,6 +3512,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -3525,8 +3540,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -3577,8 +3607,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts index e91a157bb9..13d1aafebc 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts @@ -3618,6 +3618,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -3631,8 +3646,23 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -3683,8 +3713,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** diff --git a/generate-docs/api-extractor-inputs-outlook/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook/outlook.d.ts index b9f43934aa..1e19f6230e 100644 --- a/generate-docs/api-extractor-inputs-outlook/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook/outlook.d.ts @@ -4034,6 +4034,21 @@ export declare namespace Office { export interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -4047,8 +4062,22 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -4099,8 +4128,9 @@ export declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -12689,6 +12719,10 @@ export declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } @@ -14834,6 +14868,10 @@ export declare namespace Office { * * - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. * Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + * + * - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData?: any; /** @@ -15013,6 +15051,10 @@ export declare namespace Office { * * - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed. * + * - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. + * * - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation * of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using * `JSON.parse()` once you retrieve it. diff --git a/generate-docs/script-inputs/office.d.ts b/generate-docs/script-inputs/office.d.ts index 6e35732cbd..c4ad7c38e1 100644 --- a/generate-docs/script-inputs/office.d.ts +++ b/generate-docs/script-inputs/office.d.ts @@ -12757,6 +12757,21 @@ declare namespace Office { interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -12770,8 +12785,23 @@ declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * A calendar item that's attached + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -12822,8 +12852,9 @@ declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -21033,6 +21064,10 @@ declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } @@ -23119,6 +23154,10 @@ declare namespace Office { * * - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. * Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + * + * - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData?: any; /** @@ -23298,6 +23337,10 @@ declare namespace Office { * * - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed. * + * - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. + * * - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation * of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using * `JSON.parse()` once you retrieve it. diff --git a/generate-docs/script-inputs/office_preview.d.ts b/generate-docs/script-inputs/office_preview.d.ts index c66096b76b..86fe6d3883 100644 --- a/generate-docs/script-inputs/office_preview.d.ts +++ b/generate-docs/script-inputs/office_preview.d.ts @@ -12844,6 +12844,21 @@ declare namespace Office { interface AttachmentDetailsCompose { /** * Gets a value that indicates the attachment's type. + * + * @remarks + * + * **Important**: + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ attachmentType: MailboxEnums.AttachmentType | string; /** @@ -12857,8 +12872,22 @@ declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: + * + * - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. + * + * - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using + * drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is + * returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option + * is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property. + * + * - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or + * **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property. + * + * - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type + * `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property. */ name: string; /** @@ -12909,8 +12938,9 @@ declare namespace Office { /** * Gets the name of the attachment. * - * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", - * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + * @remarks + * + * **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property. */ name: string; /** @@ -21499,6 +21529,10 @@ declare namespace Office { * * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + * + * - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData: any; } @@ -23644,6 +23678,10 @@ declare namespace Office { * * - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. * Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + * + * - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. */ contextData?: any; /** @@ -23823,6 +23861,10 @@ declare namespace Office { * * - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed. * + * - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event. + * You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments} + * to the `contextData` property. + * * - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation * of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using * `JSON.parse()` once you retrieve it. diff --git a/generate-docs/script-inputs/script-lab-snippets.yaml b/generate-docs/script-inputs/script-lab-snippets.yaml index 0ce86d48eb..504cc0a91a 100644 --- a/generate-docs/script-inputs/script-lab-snippets.yaml +++ b/generate-docs/script-inputs/script-lab-snippets.yaml @@ -445,6 +445,46 @@ context.application.calculate(Excel.CalculationType.recalculate); await context.sync(); }); +'Excel.CellControl:class': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); +'Excel.CellControlType:enum': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); 'Excel.CellPropertiesFill#color:member': - >- // Link to full sample: @@ -1669,6 +1709,26 @@ chart.dataLabels.format.font.color = "black"; chart.title.text = "Bicycle Parts Quarterly Sales"; + await context.sync(); + }); +'Excel.CheckboxCellControl:interface': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; await context.sync(); }); 'Excel.ClearApplyTo:enum': @@ -1732,7 +1792,7 @@ 'Excel.Comment#content:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -1744,7 +1804,7 @@ 'Excel.Comment#delete:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -1754,7 +1814,7 @@ 'Excel.Comment#load:member(2)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -1768,7 +1828,7 @@ 'Excel.Comment#resolved:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-resolution.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-resolution.yaml await Excel.run(async (context) => { @@ -1779,7 +1839,7 @@ 'Excel.CommentCollection#add:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-basics.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-basics.yaml await Excel.run(async (context) => { @@ -1907,7 +1967,7 @@ 'Excel.CommentReply#content:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -1925,7 +1985,7 @@ 'Excel.CommentReply#delete:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -1938,7 +1998,7 @@ 'Excel.CommentReplyCollection#add:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-replies.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml await Excel.run(async (context) => { @@ -1951,7 +2011,7 @@ 'Excel.CommentRichContent#mentions:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { @@ -2688,7 +2748,7 @@ 'Excel.ContentType:enum': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-mentions.yaml await Excel.run(async (context) => { @@ -4145,6 +4205,158 @@ await context.sync(); }); +'Excel.Note:class': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); +'Excel.Note#content:member': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); +'Excel.Note#height:member': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); +'Excel.Note#visible:member': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); +'Excel.Note#width:member': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the height and width of the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.height = 200; + note.width = 400; + await context.sync(); + }); +'Excel.Note#delete:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function deletes the note from cell A2. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItem("A2"); + note.delete(); + + await context.sync(); + }); +'Excel.NoteCollection:class': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); +'Excel.NoteCollection#add:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function adds a note to the selected cell. + + await Excel.run(async (context) => { + const selectedRange = context.workbook.getSelectedRange(); + + // Note that an InvalidArgument error is thrown if multiple cells are selected. + context.workbook.notes.add(selectedRange, "The first note."); + await context.sync(); + }); +'Excel.NoteCollection#getItem:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function sets the note on cell A1 to visible. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const firstNote = sheet.notes.getItem("A1"); + + firstNote.load(); + await context.sync(); + + firstNote.visible = true; + }); +'Excel.NoteCollection#getItemAt:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/excel-note-basics.yaml + + + // This function changes the content in the first note. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getItem("Notes"); + const note = sheet.notes.getItemAt(0); + note.content = "Changing the content of the first note."; + await context.sync(); + }); 'Excel.NumberFormatInfo#numberDecimalSeparator:member': - >- // Link to full sample: @@ -4904,6 +5116,24 @@ sumCell.format.autofitColumns(); await context.sync(); }); +'Excel.Range#clearOrResetContents:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); 'Excel.Range#copyFrom:member(1)': - >- // Link to full sample: @@ -4920,6 +5150,26 @@ sheet.getRange("G2").copyFrom("A1:E1", Excel.RangeCopyType.formulas); await context.sync(); }); +'Excel.Range#control:member': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); 'Excel.Range#find:member(1)': - >- // Link to full sample: @@ -5669,6 +5919,21 @@ sheet.getRange("A1:R10").ungroup(Excel.GroupOption.byColumns); await context.sync(); }); +'Excel.Range#values:member': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Change the value of the checkbox in B3. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + const range = sheet.getRange("B3"); + + range.values = [["TRUE"]]; + await context.sync(); + }); 'Excel.Range#valuesAsJson:member': - >- // Link to full sample: @@ -6907,6 +7172,46 @@ console.log("Worksheet Id : " + worksheet.name); }); } +'Excel.TableCollection:class': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); +'Excel.TableCollection#getItem:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove checkboxes from the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the checkboxes back to boolean values. + range.control = { + type: Excel.CellControlType.empty + }; + await context.sync(); + }); 'Excel.TableCollection#onChanged:member': - >- // Link to full sample: @@ -6920,6 +7225,64 @@ await context.sync(); console.log("A handler has been registered for the table collection onChanged event"); }); +'Excel.TableColumn#getDataBodyRange:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); +'Excel.TableColumnCollection:class': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Add checkboxes to the table. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Change the boolean values to checkboxes. + range.control = { + type: Excel.CellControlType.checkbox + }; + await context.sync(); + }); +'Excel.TableColumnCollection#getItem:member(1)': + - >- + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml + + + // Remove all content from the Analysis column. + + await Excel.run(async (context) => { + const sheet = context.workbook.worksheets.getActiveWorksheet(); + + // Get the second column in the table, without the header. + const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange(); + + // Clear all the data from the second column. + range.clearOrResetContents(); + await context.sync(); + }); 'Excel.TableSelectionChangedEventArgs#address:member': - >- // Link to full sample: