API Reference
Command
Add-OfficeExcelSparkline
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:
ContextParameters
- AxisColor String
- Axis color (#RRGGBB or #AARRGGBB).
- DataRange String
- A1 range containing source data (e.g., "B2:M2").
- FirstColor String
- First point color (#RRGGBB or #AARRGGBB).
- HighColor String
- High point color (#RRGGBB or #AARRGGBB).
- LastColor String
- Last point color (#RRGGBB or #AARRGGBB).
- LocationRange String
- A1 range where the sparklines will be placed (e.g., "N2:N2").
- LowColor String
- Low point color (#RRGGBB or #AARRGGBB).
- MarkersColor String
- Markers color (#RRGGBB or #AARRGGBB).
- NegativeColor String
- Negative point color (#RRGGBB or #AARRGGBB).
- PassThru SwitchParameter
- Emit the worksheet after adding sparklines.
- SeriesColor String
- Series color (#RRGGBB or #AARRGGBB).
- 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 String
- 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:
DocumentParameters
- AxisColor String
- Axis color (#RRGGBB or #AARRGGBB).
- DataRange String
- A1 range containing source data (e.g., "B2:M2").
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- FirstColor String
- First point color (#RRGGBB or #AARRGGBB).
- HighColor String
- High point color (#RRGGBB or #AARRGGBB).
- LastColor String
- Last point color (#RRGGBB or #AARRGGBB).
- LocationRange String
- A1 range where the sparklines will be placed (e.g., "N2:N2").
- LowColor String
- Low point color (#RRGGBB or #AARRGGBB).
- MarkersColor String
- Markers color (#RRGGBB or #AARRGGBB).
- NegativeColor String
- Negative point color (#RRGGBB or #AARRGGBB).
- PassThru SwitchParameter
- Emit the worksheet after adding sparklines.
- SeriesColor String
- Series color (#RRGGBB or #AARRGGBB).
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
- 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 String
- Sparkline type (Line, Column, WinLoss).
Outputs
System.Object