Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .openpublishing.publish.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"word-js-desktop-1.2",
"word-js-desktop-1.3",
"word-js-desktop-1.4",
"word-js-desktop-1.5",
"word-js-online"
],
"open_to_public_contributors": true,
Expand Down Expand Up @@ -416,6 +417,10 @@
"ReferenceTOC": "docs/docs-ref-autogen/word_desktop_1_4/toc.yml",
"ConceptualTOCUrl": "/office/dev/add-ins/toc.json"
},
{
"ReferenceTOC": "docs/docs-ref-autogen/word_desktop_1_5/toc.yml",
"ConceptualTOCUrl": "/office/dev/add-ins/toc.json"
},
{
"ReferenceTOC": "docs/docs-ref-autogen/word_online/toc.yml",
"ConceptualTOCUrl": "/office/dev/add-ins/toc.json"
Expand Down
16 changes: 16 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,18 @@
"src": "docs-ref-autogen/word_desktop_1_4",
"dest": "api"
},
{
"files": ["**/toc.yml"],
"group": "word-js-desktop-1.5",
"src": "docs-ref-autogen/word_desktop_1_5",
"dest": "api/office-js-docs-reference"
},
{
"files": ["**/*.md", "**/*.yml"],
"group": "word-js-desktop-1.5",
"src": "docs-ref-autogen/word_desktop_1_5",
"dest": "api"
},
{
"files": ["**/toc.yml"],
"group": "word-js-online",
Expand Down Expand Up @@ -1245,6 +1257,10 @@
"dest": "word-js-desktop-1.4",
"moniker_range": "word-js-desktop-1.4"
},
"word-js-desktop-1.5": {
"dest": "word-js-desktop-1.5",
"moniker_range": "word-js-desktop-1.5"
},
"word-js-online": {
"dest": "word-js-online",
"moniker_range": "word-js-online"
Expand Down
4 changes: 4 additions & 0 deletions docs/docs-ref-autogen/common/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,10 @@ items:
- name: WordApi online-only requirement set
href: ../../requirement-sets/word/word-api-online-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.5 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-5-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.4 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-4-requirement-set.md
Expand Down
4 changes: 4 additions & 0 deletions docs/docs-ref-autogen/common_preview/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,10 @@ items:
- name: WordApi online-only requirement set
href: ../../requirement-sets/word/word-api-online-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.5 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-5-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.4 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-4-requirement-set.md
Expand Down
4 changes: 2 additions & 2 deletions docs/docs-ref-autogen/excel/excel/excel.datavalidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ properties:
commentsRange.dataValidation.errorAlert = {
message: "It is redundant to include the baby name in the comment.",
showAlert: true,
style: "Information",
style: Excel.DataValidationAlertStyle.information,
title: "Baby Name in Comment"
};

Expand Down Expand Up @@ -147,7 +147,7 @@ properties:
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,50 @@ remarks: >-
\[ [API set: ExcelApi
1.8](/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/22-data-validation/data-validation.yaml


await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Decision");
const rankingRange = sheet.tables.getItem("NameOptionsTable").columns.getItem("Ranking").getDataBodyRange();

// When you are developing, it is a good practice to
// clear the dataValidation object with each run of your code.
rankingRange.dataValidation.clear();

let greaterThanZeroRule = {
wholeNumber: {
formula1: 0,
operator: Excel.DataValidationOperator.greaterThan
}
};
rankingRange.dataValidation.rule = greaterThanZeroRule;

rankingRange.dataValidation.prompt = {
message: "Please enter a positive number.",
showPrompt: true,
title: "Positive numbers only."
};

rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

await context.sync();
});

```

isPreview: false
isDeprecated: false
fields:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ remarks: >-
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ remarks: >-
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ properties:
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
6 changes: 3 additions & 3 deletions docs/docs-ref-autogen/excel/excel/excel.functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3084,16 +3084,16 @@ methods:
isDeprecated: false
syntax:
content: >-
datevalue(dateText: string | number | Excel.Range | Excel.RangeReference
| Excel.FunctionResult<any>): FunctionResult<number>;
datevalue(dateText: string | Excel.Range | Excel.RangeReference |
Excel.FunctionResult<any>): FunctionResult<number>;
parameters:
- id: dateText
description: >-
Is text that represents a date in a Microsoft Excel date format,
between 1/1/1900 or 1/1/1904 (depending on the workbook's date
system) and 12/31/9999.
type: >-
string | number | <xref uid="excel!Excel.Range:class" /> | <xref
string | <xref uid="excel!Excel.Range:class" /> | <xref
uid="excel!Excel.RangeReference:interface" /> | <xref
uid="excel!Excel.FunctionResult:class" />&lt;any&gt;
return:
Expand Down
4 changes: 4 additions & 0 deletions docs/docs-ref-autogen/excel/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1913,6 +1913,10 @@ items:
- name: WordApi online-only requirement set
href: ../../requirement-sets/word/word-api-online-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.5 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-5-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.4 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-4-requirement-set.md
Expand Down
4 changes: 4 additions & 0 deletions docs/docs-ref-autogen/excel_1_1/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,10 @@ items:
- name: WordApi online-only requirement set
href: ../../requirement-sets/word/word-api-online-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.5 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-5-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.4 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-4-requirement-set.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ properties:
commentsRange.dataValidation.errorAlert = {
message: "It is redundant to include the baby name in the comment.",
showAlert: true,
style: "Information",
style: Excel.DataValidationAlertStyle.information,
title: "Baby Name in Comment"
};

Expand Down Expand Up @@ -147,7 +147,7 @@ properties:
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,50 @@ remarks: >-
\[ [API set: ExcelApi
1.8](/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/22-data-validation/data-validation.yaml


await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Decision");
const rankingRange = sheet.tables.getItem("NameOptionsTable").columns.getItem("Ranking").getDataBodyRange();

// When you are developing, it is a good practice to
// clear the dataValidation object with each run of your code.
rankingRange.dataValidation.clear();

let greaterThanZeroRule = {
wholeNumber: {
formula1: 0,
operator: Excel.DataValidationOperator.greaterThan
}
};
rankingRange.dataValidation.rule = greaterThanZeroRule;

rankingRange.dataValidation.prompt = {
message: "Please enter a positive number.",
showPrompt: true,
title: "Positive numbers only."
};

rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

await context.sync();
});

```

isPreview: false
isDeprecated: false
fields:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ remarks: >-
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ remarks: >-
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ properties:
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
6 changes: 3 additions & 3 deletions docs/docs-ref-autogen/excel_1_10/excel/excel.functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3084,16 +3084,16 @@ methods:
isDeprecated: false
syntax:
content: >-
datevalue(dateText: string | number | Excel.Range | Excel.RangeReference
| Excel.FunctionResult<any>): FunctionResult<number>;
datevalue(dateText: string | Excel.Range | Excel.RangeReference |
Excel.FunctionResult<any>): FunctionResult<number>;
parameters:
- id: dateText
description: >-
Is text that represents a date in a Microsoft Excel date format,
between 1/1/1900 or 1/1/1904 (depending on the workbook's date
system) and 12/31/9999.
type: >-
string | number | <xref uid="excel!Excel.Range:class" /> | <xref
string | <xref uid="excel!Excel.Range:class" /> | <xref
uid="excel!Excel.RangeReference:interface" /> | <xref
uid="excel!Excel.FunctionResult:class" />&lt;any&gt;
return:
Expand Down
4 changes: 4 additions & 0 deletions docs/docs-ref-autogen/excel_1_10/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,10 @@ items:
- name: WordApi online-only requirement set
href: ../../requirement-sets/word/word-api-online-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.5 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-5-requirement-set.md
displayName: Word
- name: WordApiDesktop 1.4 requirement set
href: >-
../../requirement-sets/word/word-api-desktop-1-4-requirement-set.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ properties:
commentsRange.dataValidation.errorAlert = {
message: "It is redundant to include the baby name in the comment.",
showAlert: true,
style: "Information",
style: Excel.DataValidationAlertStyle.information,
title: "Baby Name in Comment"
};

Expand Down Expand Up @@ -147,7 +147,7 @@ properties:
rankingRange.dataValidation.errorAlert = {
message: "Sorry, only positive numbers are allowed",
showAlert: true,
style: "Stop",
style: Excel.DataValidationAlertStyle.stop,
title: "Negative Number Entered"
};

Expand Down
Loading
Loading