mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Move help from Comment-based to md. Relocate functions (sans help)
This commit is contained in:
107
Pivot/Pivot.md
Normal file
107
Pivot/Pivot.md
Normal file
@@ -0,0 +1,107 @@
|
||||
---
|
||||
external help file: ImportExcel-help.xml
|
||||
Module Name: ImportExcel
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Pivot
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Pivot [[-targetData] <Object>] [[-pivotRows] <Object>] [[-pivotData] <Object>] [[-ChartType] <eChartType>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ChartType
|
||||
{{ Fill ChartType Description }}
|
||||
|
||||
```yaml
|
||||
Type: eChartType
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: Area, Line, Pie, Bubble, ColumnClustered, ColumnStacked, ColumnStacked100, ColumnClustered3D, ColumnStacked3D, ColumnStacked1003D, BarClustered, BarStacked, BarStacked100, BarClustered3D, BarStacked3D, BarStacked1003D, LineStacked, LineStacked100, LineMarkers, LineMarkersStacked, LineMarkersStacked100, PieOfPie, PieExploded, PieExploded3D, BarOfPie, XYScatterSmooth, XYScatterSmoothNoMarkers, XYScatterLines, XYScatterLinesNoMarkers, AreaStacked, AreaStacked100, AreaStacked3D, AreaStacked1003D, DoughnutExploded, RadarMarkers, RadarFilled, Surface, SurfaceWireframe, SurfaceTopView, SurfaceTopViewWireframe, Bubble3DEffect, StockHLC, StockOHLC, StockVHLC, StockVOHLC, CylinderColClustered, CylinderColStacked, CylinderColStacked100, CylinderBarClustered, CylinderBarStacked, CylinderBarStacked100, CylinderCol, ConeColClustered, ConeColStacked, ConeColStacked100, ConeBarClustered, ConeBarStacked, ConeBarStacked100, ConeCol, PyramidColClustered, PyramidColStacked, PyramidColStacked100, PyramidBarClustered, PyramidBarStacked, PyramidBarStacked100, PyramidCol, XYScatter, Radar, Doughnut, Pie3D, Line3D, Column3D, Area3D
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -pivotData
|
||||
{{ Fill pivotData Description }}
|
||||
|
||||
```yaml
|
||||
Type: Object
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -pivotRows
|
||||
{{ Fill pivotRows Description }}
|
||||
|
||||
```yaml
|
||||
Type: Object
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -targetData
|
||||
{{ Fill targetData Description }}
|
||||
|
||||
```yaml
|
||||
Type: Object
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
21
Pivot/Pivot.ps1
Normal file
21
Pivot/Pivot.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
function Pivot {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
$targetData,
|
||||
$pivotRows,
|
||||
$pivotData,
|
||||
[OfficeOpenXml.Drawing.Chart.eChartType]$ChartType="Pie"
|
||||
)
|
||||
|
||||
if(!$pivotData) {$pivotData=$pivotRows}
|
||||
|
||||
$xlFile = [System.IO.Path]::GetTempFileName() -replace "tmp","xlsx"
|
||||
Write-Verbose $xlFile
|
||||
|
||||
$targetData |
|
||||
Export-Excel -Path $xlFile `
|
||||
-IncludePivotTable -IncludePivotChart `
|
||||
-PivotRows $pivotRows -PivotData $pivotData `
|
||||
-ChartType $ChartType `
|
||||
-Show
|
||||
}
|
||||
Reference in New Issue
Block a user