Skip to content

Commit b69a1d0

Browse files
AlexJerabekgithub-actions
andauthored
Automatically generated docs (#393)
Co-authored-by: github-actions <[email protected]>
1 parent 3351ca0 commit b69a1d0

File tree

4 files changed

+54
-6
lines changed

4 files changed

+54
-6
lines changed

docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarnegativeformat.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,32 @@ uid: ExcelScript!ExcelScript.ConditionalDataBarNegativeFormat:interface
44
package: ExcelScript!
55
fullName: ExcelScript.ConditionalDataBarNegativeFormat
66
summary: Represents a conditional format for the negative side of the data bar.
7-
remarks: ''
7+
remarks: |-
8+
9+
10+
#### Examples
11+
12+
```TypeScript
13+
/**
14+
* This script applies data bar conditional formatting to a range.
15+
* It sets the data bar colors to be green when positive and red when negative.
16+
*/
17+
function main(workbook: ExcelScript.Workbook) {
18+
// Get the "Sales" data column range in a table named "SalesTable".
19+
const table = workbook.getTable("SalesTable");
20+
const salesRange = table.getColumnByName("Sales").getRangeBetweenHeaderAndTotal();
21+
22+
// Add data bar conditional formatting to the range.
23+
const cf = salesRange.addConditionalFormat(ExcelScript.ConditionalFormatType.dataBar);
24+
25+
// Have the bar show green when positive and red when negative.
26+
const dataBarConditionalFormat = cf.getDataBar();
27+
const positiveFormat: ExcelScript.ConditionalDataBarPositiveFormat = dataBarConditionalFormat.getPositiveFormat();
28+
positiveFormat .setFillColor("green");
29+
const negativeFormat: ExcelScript.ConditionalDataBarNegativeFormat = dataBarConditionalFormat.getNegativeFormat();
30+
negativeFormat.setFillColor("red");
31+
}
32+
```
833
934
isPreview: false
1035
isDeprecated: false

docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarpositiveformat.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,32 @@ uid: ExcelScript!ExcelScript.ConditionalDataBarPositiveFormat:interface
44
package: ExcelScript!
55
fullName: ExcelScript.ConditionalDataBarPositiveFormat
66
summary: Represents a conditional format for the positive side of the data bar.
7-
remarks: ''
7+
remarks: |-
8+
9+
10+
#### Examples
11+
12+
```TypeScript
13+
/**
14+
* This script applies data bar conditional formatting to a range.
15+
* It sets the data bar colors to be green when positive and red when negative.
16+
*/
17+
function main(workbook: ExcelScript.Workbook) {
18+
// Get the "Sales" data column range in a table named "SalesTable".
19+
const table = workbook.getTable("SalesTable");
20+
const salesRange = table.getColumnByName("Sales").getRangeBetweenHeaderAndTotal();
21+
22+
// Add data bar conditional formatting to the range.
23+
const cf = salesRange.addConditionalFormat(ExcelScript.ConditionalFormatType.dataBar);
24+
25+
// Have the bar show green when positive and red when negative.
26+
const dataBarConditionalFormat = cf.getDataBar();
27+
const positiveFormat: ExcelScript.ConditionalDataBarPositiveFormat = dataBarConditionalFormat.getPositiveFormat();
28+
positiveFormat .setFillColor("green");
29+
const negativeFormat: ExcelScript.ConditionalDataBarNegativeFormat = dataBarConditionalFormat.getNegativeFormat();
30+
negativeFormat.setFillColor("red");
31+
}
32+
```
833
934
isPreview: false
1035
isDeprecated: false

docs/docs-ref-autogen/toc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ items:
33
items:
44
- name: API reference overview
55
href: overview.md
6-
- name: Preview APIs
7-
href: preview-apis.md
86
- name: ExcelScript
97
uid: ExcelScript!
108
items:

generate-docs/API Coverage Report.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ ExcelScript.ConditionalDataBarDirection,N/A,Enum,Missing,false
11621162
ExcelScript.ConditionalDataBarDirection,"context",EnumField,Missing,false
11631163
ExcelScript.ConditionalDataBarDirection,"leftToRight",EnumField,Missing,false
11641164
ExcelScript.ConditionalDataBarDirection,"rightToLeft",EnumField,Missing,false
1165-
ExcelScript.ConditionalDataBarNegativeFormat,N/A,Interface,Unknown,false
1165+
ExcelScript.ConditionalDataBarNegativeFormat,N/A,Interface,Unknown,true
11661166
ExcelScript.ConditionalDataBarNegativeFormat,"getBorderColor()",Method,Excellent,false
11671167
ExcelScript.ConditionalDataBarNegativeFormat,"getFillColor()",Method,Fine,false
11681168
ExcelScript.ConditionalDataBarNegativeFormat,"getMatchPositiveBorderColor()",Method,Great,false
@@ -1171,7 +1171,7 @@ ExcelScript.ConditionalDataBarNegativeFormat,"setBorderColor(borderColor)",Metho
11711171
ExcelScript.ConditionalDataBarNegativeFormat,"setFillColor(fillColor)",Method,Fine,false
11721172
ExcelScript.ConditionalDataBarNegativeFormat,"setMatchPositiveBorderColor(matchPositiveBorderColor)",Method,Great,false
11731173
ExcelScript.ConditionalDataBarNegativeFormat,"setMatchPositiveFillColor(matchPositiveFillColor)",Method,Great,false
1174-
ExcelScript.ConditionalDataBarPositiveFormat,N/A,Interface,Unknown,false
1174+
ExcelScript.ConditionalDataBarPositiveFormat,N/A,Interface,Unknown,true
11751175
ExcelScript.ConditionalDataBarPositiveFormat,"getBorderColor()",Method,Excellent,false
11761176
ExcelScript.ConditionalDataBarPositiveFormat,"getFillColor()",Method,Fine,false
11771177
ExcelScript.ConditionalDataBarPositiveFormat,"getGradientFill()",Method,Good,false

0 commit comments

Comments
 (0)