From 9a639df194111796d45a0e5b2ac011aae1898596 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 4 Sep 2025 10:50:02 +0000 Subject: [PATCH] Automatically generated docs --- ...cript.conditionaldatabarnegativeformat.yml | 27 ++++++++++++++++++- ...cript.conditionaldatabarpositiveformat.yml | 27 ++++++++++++++++++- docs/docs-ref-autogen/toc.yml | 2 -- generate-docs/API Coverage Report.csv | 4 +-- 4 files changed, 54 insertions(+), 6 deletions(-) diff --git a/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarnegativeformat.yml b/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarnegativeformat.yml index 760b1944..1059d789 100644 --- a/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarnegativeformat.yml +++ b/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarnegativeformat.yml @@ -4,7 +4,32 @@ uid: ExcelScript!ExcelScript.ConditionalDataBarNegativeFormat:interface package: ExcelScript! fullName: ExcelScript.ConditionalDataBarNegativeFormat summary: Represents a conditional format for the negative side of the data bar. -remarks: '' +remarks: |- + + + #### Examples + + ```TypeScript + /** + * This script applies data bar conditional formatting to a range. + * It sets the data bar colors to be green when positive and red when negative. + */ + function main(workbook: ExcelScript.Workbook) { + // Get the "Sales" data column range in a table named "SalesTable". + const table = workbook.getTable("SalesTable"); + const salesRange = table.getColumnByName("Sales").getRangeBetweenHeaderAndTotal(); + + // Add data bar conditional formatting to the range. + const cf = salesRange.addConditionalFormat(ExcelScript.ConditionalFormatType.dataBar); + + // Have the bar show green when positive and red when negative. + const dataBarConditionalFormat = cf.getDataBar(); + const positiveFormat: ExcelScript.ConditionalDataBarPositiveFormat = dataBarConditionalFormat.getPositiveFormat(); + positiveFormat .setFillColor("green"); + const negativeFormat: ExcelScript.ConditionalDataBarNegativeFormat = dataBarConditionalFormat.getNegativeFormat(); + negativeFormat.setFillColor("red"); + } + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarpositiveformat.yml b/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarpositiveformat.yml index e19af1c7..354b8c50 100644 --- a/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarpositiveformat.yml +++ b/docs/docs-ref-autogen/excelscript/excelscript.conditionaldatabarpositiveformat.yml @@ -4,7 +4,32 @@ uid: ExcelScript!ExcelScript.ConditionalDataBarPositiveFormat:interface package: ExcelScript! fullName: ExcelScript.ConditionalDataBarPositiveFormat summary: Represents a conditional format for the positive side of the data bar. -remarks: '' +remarks: |- + + + #### Examples + + ```TypeScript + /** + * This script applies data bar conditional formatting to a range. + * It sets the data bar colors to be green when positive and red when negative. + */ + function main(workbook: ExcelScript.Workbook) { + // Get the "Sales" data column range in a table named "SalesTable". + const table = workbook.getTable("SalesTable"); + const salesRange = table.getColumnByName("Sales").getRangeBetweenHeaderAndTotal(); + + // Add data bar conditional formatting to the range. + const cf = salesRange.addConditionalFormat(ExcelScript.ConditionalFormatType.dataBar); + + // Have the bar show green when positive and red when negative. + const dataBarConditionalFormat = cf.getDataBar(); + const positiveFormat: ExcelScript.ConditionalDataBarPositiveFormat = dataBarConditionalFormat.getPositiveFormat(); + positiveFormat .setFillColor("green"); + const negativeFormat: ExcelScript.ConditionalDataBarNegativeFormat = dataBarConditionalFormat.getNegativeFormat(); + negativeFormat.setFillColor("red"); + } + ``` isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/toc.yml b/docs/docs-ref-autogen/toc.yml index 0e016096..9939a090 100644 --- a/docs/docs-ref-autogen/toc.yml +++ b/docs/docs-ref-autogen/toc.yml @@ -3,8 +3,6 @@ items: items: - name: API reference overview href: overview.md - - name: Preview APIs - href: preview-apis.md - name: ExcelScript uid: ExcelScript! items: diff --git a/generate-docs/API Coverage Report.csv b/generate-docs/API Coverage Report.csv index e8ecb331..237e2df3 100644 --- a/generate-docs/API Coverage Report.csv +++ b/generate-docs/API Coverage Report.csv @@ -1162,7 +1162,7 @@ ExcelScript.ConditionalDataBarDirection,N/A,Enum,Missing,false ExcelScript.ConditionalDataBarDirection,"context",EnumField,Missing,false ExcelScript.ConditionalDataBarDirection,"leftToRight",EnumField,Missing,false ExcelScript.ConditionalDataBarDirection,"rightToLeft",EnumField,Missing,false -ExcelScript.ConditionalDataBarNegativeFormat,N/A,Interface,Unknown,false +ExcelScript.ConditionalDataBarNegativeFormat,N/A,Interface,Unknown,true ExcelScript.ConditionalDataBarNegativeFormat,"getBorderColor()",Method,Excellent,false ExcelScript.ConditionalDataBarNegativeFormat,"getFillColor()",Method,Fine,false ExcelScript.ConditionalDataBarNegativeFormat,"getMatchPositiveBorderColor()",Method,Great,false @@ -1171,7 +1171,7 @@ ExcelScript.ConditionalDataBarNegativeFormat,"setBorderColor(borderColor)",Metho ExcelScript.ConditionalDataBarNegativeFormat,"setFillColor(fillColor)",Method,Fine,false ExcelScript.ConditionalDataBarNegativeFormat,"setMatchPositiveBorderColor(matchPositiveBorderColor)",Method,Great,false ExcelScript.ConditionalDataBarNegativeFormat,"setMatchPositiveFillColor(matchPositiveFillColor)",Method,Great,false -ExcelScript.ConditionalDataBarPositiveFormat,N/A,Interface,Unknown,false +ExcelScript.ConditionalDataBarPositiveFormat,N/A,Interface,Unknown,true ExcelScript.ConditionalDataBarPositiveFormat,"getBorderColor()",Method,Excellent,false ExcelScript.ConditionalDataBarPositiveFormat,"getFillColor()",Method,Fine,false ExcelScript.ConditionalDataBarPositiveFormat,"getGradientFill()",Method,Good,false