Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Set-OfficeExcelChartDataLabels

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelChart
Outputs
OfficeIMO.Excel.ExcelChart

Configures data labels and optional styling for an Excel chart.

Remarks

Configures data labels and optional styling for an Excel chart.

Examples

Authored help example

Add outside-end value labels.

PS>


$chart | Set-OfficeExcelChartDataLabels -ShowValue $true -Position OutsideEnd
        

Adds value labels to the chart and returns the chart for further formatting.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-OfficeExcelChartDataLabels [-Bold <Nullable`1>] -Chart <ExcelChart> [-Color <String>] [-FillColor <String>] [-FontName <String>] [-FontSizePoints <Nullable`1>] [-Italic <Nullable`1>] [-LineColor <String>] [-LineWidthPoints <Nullable`1>] [-NoFill] [-NoLine] [-NumberFormat <String>] [-Position <BestFit>] [-ShowCategoryName <Boolean>] [-ShowLegendKey <Boolean>] [-ShowPercent <Boolean>] [-ShowSeriesName <Boolean>] [-ShowValue <Boolean>] [-SourceLinked <Boolean>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Bold Nullable`1 optionalposition: namedpipeline: False
Optional bold setting for label text.
Chart ExcelChart requiredposition: namedpipeline: True (ByValue)
Chart to update.
Color String optionalposition: namedpipeline: False
Optional label text color in hex format.
FillColor String optionalposition: namedpipeline: False
Optional label fill color in hex format.
FontName String optionalposition: namedpipeline: False
Optional label font name.
FontSizePoints Nullable`1 optionalposition: namedpipeline: False
Optional label font size in points.
Italic Nullable`1 optionalposition: namedpipeline: False
Optional italic setting for label text.
LineColor String optionalposition: namedpipeline: False
Optional label line color in hex format.
LineWidthPoints Nullable`1 optionalposition: namedpipeline: False
Optional label border width in points.
NoFill SwitchParameter optionalposition: namedpipeline: False
Remove label fill.
NoLine SwitchParameter optionalposition: namedpipeline: False
Remove label border.
NumberFormat String optionalposition: namedpipeline: False
Optional number format code.
Position String optionalposition: namedpipeline: Falsevalues: 9
Optional data label position.
Possible values: BestFit, Bottom, Center, InsideBase, InsideEnd, Left, OutsideEnd, Right, Top
ShowCategoryName Boolean optionalposition: namedpipeline: False
Show category names in labels.
ShowLegendKey Boolean optionalposition: namedpipeline: False
Show legend keys in labels.
ShowPercent Boolean optionalposition: namedpipeline: False
Show percentages in labels.
ShowSeriesName Boolean optionalposition: namedpipeline: False
Show series names in labels.
ShowValue Boolean optionalposition: namedpipeline: False
Show values in labels.
SourceLinked Boolean optionalposition: namedpipeline: False
Keep number formatting linked to the source cells.

Outputs

OfficeIMO.Excel.ExcelChart