Cmdlet
Add-OfficeExcelSparkline
Adds sparklines to a worksheet.
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 <Line| Column| Stacked>]
[<CommonParameters>]#Parameter set:
ContextAdd-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 <Int32>]
[-ShowAxis]
[-ShowFirstLast]
[-ShowHighLow]
[-ShowMarkers]
[-ShowNegative]
[-Type <Line| Column| Stacked>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Add a line sparkline.
ExcelSheet 'Data' { Add-OfficeExcelSparkline -DataRange 'B2:M2' -LocationRange 'N2' }Creates a line sparkline in N2 using B2:M2.
Parameters
- -AxisColor String
- Axis color. Named colors and hexadecimal values are accepted.
- -DataRange String
- A1 range containing source data (e.g., "B2:M2").
- -FirstColor String
- First point color. Named colors and hexadecimal values are accepted.
- -HighColor String
- High point color. Named colors and hexadecimal values are accepted.
- -LastColor String
- Last point color. Named colors and hexadecimal values are accepted.
- -LocationRange String
- A1 range where the sparklines will be placed (e.g., "N2:N2").
- -LowColor String
- Low point color. Named colors and hexadecimal values are accepted.
- -MarkersColor String
- Markers color. Named colors and hexadecimal values are accepted.
- -NegativeColor String
- Negative point color. Named colors and hexadecimal values are accepted.
- -PassThru SwitchParameter
- Emit the worksheet after adding sparklines.
- -SeriesColor String
- Series color. Named colors and hexadecimal values are accepted.
- -ShowAxis SwitchParameter
- Show axis.
- -ShowFirstLast SwitchParameter
- Show first/last points.
- -ShowHighLow SwitchParameter
- Show high/low points.
- -ShowMarkers SwitchParameter
- Show markers for each point.
- -ShowNegative SwitchParameter
- Show negative points.
- -Type ExcelSparklineType
- Sparkline type (Line, Column, WinLoss).
- Possible values:
Line,Column,Stacked - -Document ExcelDocument
- Workbook to operate on outside the DSL context.
- -Sheet String
- Worksheet name when using Document.
- -SheetIndex Int32
- Worksheet index (0-based) when using Document.
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.