OfficeIMO

API Reference

Command

Add-OfficeExcelSparkline

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Object

Adds sparklines to a worksheet.

Remarks

Adds sparklines to a worksheet.

Examples

Add a line sparkline.


PS>ExcelSheet 'Data' { Add-OfficeExcelSparkline -DataRange 'B2:M2' -LocationRange 'N2' }
        

Creates a line sparkline in N2 using B2:M2.

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

Add-OfficeExcelSparkline [-AxisColor <String>] -DataRange <String> [-FirstColor <String>] [-HighColor <String>] [-LastColor <String>] -LocationRange <String> [-LowColor <String>] [-MarkersColor <String>] [-NegativeColor <String>] [-PassThru] [-SeriesColor <String>] [-ShowAxis] [-ShowFirstLast] [-ShowHighLow] [-ShowMarkers] [-ShowNegative] [-Type <String>] [<CommonParameters>]
#
Parameter set: Context

Parameters

AxisColor String optionalposition: namedpipeline: False
Axis color (#RRGGBB or #AARRGGBB).
DataRange String requiredposition: namedpipeline: False
A1 range containing source data (e.g., "B2:M2").
FirstColor String optionalposition: namedpipeline: False
First point color (#RRGGBB or #AARRGGBB).
HighColor String optionalposition: namedpipeline: False
High point color (#RRGGBB or #AARRGGBB).
LastColor String optionalposition: namedpipeline: False
Last point color (#RRGGBB or #AARRGGBB).
LocationRange String requiredposition: namedpipeline: False
A1 range where the sparklines will be placed (e.g., "N2:N2").
LowColor String optionalposition: namedpipeline: False
Low point color (#RRGGBB or #AARRGGBB).
MarkersColor String optionalposition: namedpipeline: False
Markers color (#RRGGBB or #AARRGGBB).
NegativeColor String optionalposition: namedpipeline: False
Negative point color (#RRGGBB or #AARRGGBB).
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after adding sparklines.
SeriesColor String optionalposition: namedpipeline: False
Series color (#RRGGBB or #AARRGGBB).
ShowAxis SwitchParameter optionalposition: namedpipeline: False
Show axis.
ShowFirstLast SwitchParameter optionalposition: namedpipeline: False
Show first/last points.
ShowHighLow SwitchParameter optionalposition: namedpipeline: False
Show high/low points.
ShowMarkers SwitchParameter optionalposition: namedpipeline: False
Show markers for each point.
ShowNegative SwitchParameter optionalposition: namedpipeline: False
Show negative points.
Type String optionalposition: namedpipeline: False
Sparkline type (Line, Column, WinLoss).

Outputs

System.Object

Add-OfficeExcelSparkline [-AxisColor <String>] -DataRange <String> -Document <ExcelDocument> [-FirstColor <String>] [-HighColor <String>] [-LastColor <String>] -LocationRange <String> [-LowColor <String>] [-MarkersColor <String>] [-NegativeColor <String>] [-PassThru] [-SeriesColor <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-ShowAxis] [-ShowFirstLast] [-ShowHighLow] [-ShowMarkers] [-ShowNegative] [-Type <String>] [<CommonParameters>]
#
Parameter set: Document

Parameters

AxisColor String optionalposition: namedpipeline: False
Axis color (#RRGGBB or #AARRGGBB).
DataRange String requiredposition: namedpipeline: False
A1 range containing source data (e.g., "B2:M2").
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to operate on outside the DSL context.
FirstColor String optionalposition: namedpipeline: False
First point color (#RRGGBB or #AARRGGBB).
HighColor String optionalposition: namedpipeline: False
High point color (#RRGGBB or #AARRGGBB).
LastColor String optionalposition: namedpipeline: False
Last point color (#RRGGBB or #AARRGGBB).
LocationRange String requiredposition: namedpipeline: False
A1 range where the sparklines will be placed (e.g., "N2:N2").
LowColor String optionalposition: namedpipeline: False
Low point color (#RRGGBB or #AARRGGBB).
MarkersColor String optionalposition: namedpipeline: False
Markers color (#RRGGBB or #AARRGGBB).
NegativeColor String optionalposition: namedpipeline: False
Negative point color (#RRGGBB or #AARRGGBB).
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after adding sparklines.
SeriesColor String optionalposition: namedpipeline: False
Series color (#RRGGBB or #AARRGGBB).
Sheet String optionalposition: namedpipeline: False
Worksheet name when using Document.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) when using Document.
ShowAxis SwitchParameter optionalposition: namedpipeline: False
Show axis.
ShowFirstLast SwitchParameter optionalposition: namedpipeline: False
Show first/last points.
ShowHighLow SwitchParameter optionalposition: namedpipeline: False
Show high/low points.
ShowMarkers SwitchParameter optionalposition: namedpipeline: False
Show markers for each point.
ShowNegative SwitchParameter optionalposition: namedpipeline: False
Show negative points.
Type String optionalposition: namedpipeline: False
Sparkline type (Line, Column, WinLoss).

Outputs

System.Object