mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Tweaked paramsets
This commit is contained in:
@@ -321,8 +321,8 @@
|
||||
|
||||
[CmdletBinding(DefaultParameterSetName = 'Default')]
|
||||
Param(
|
||||
[Parameter(Mandatory=$true,ParameterSetName="Default",Position=0)]
|
||||
[Parameter(Mandatory=$true,ParameterSetName="Table" ,Position=0)]
|
||||
[Parameter(ParameterSetName="Default",Position=0)]
|
||||
[Parameter(ParameterSetName="Table" ,Position=0)]
|
||||
[String]$Path,
|
||||
[Parameter(Mandatory=$true,ParameterSetName="PackageDefault")]
|
||||
[Parameter(Mandatory=$true,ParameterSetName="PackageTable")]
|
||||
@@ -395,6 +395,8 @@
|
||||
[Object[]]$ConditionalFormat,
|
||||
[Object[]]$ConditionalText,
|
||||
[ScriptBlock]$CellStyleSB,
|
||||
[Parameter(ParameterSetName = 'Now')]
|
||||
# [Parameter(ParameterSetName = 'TableNow')]
|
||||
[Switch]$Now
|
||||
)
|
||||
|
||||
@@ -530,7 +532,7 @@
|
||||
Stop-ExcelProcess
|
||||
}
|
||||
|
||||
if ($Now) {
|
||||
if ($PSBoundParameters.Keys.Count -eq 0 -Or $Now) {
|
||||
$Path = [System.IO.Path]::GetTempFileName() -replace '\.tmp', '.xlsx'
|
||||
$Show = $true
|
||||
$AutoSize = $true
|
||||
@@ -760,7 +762,7 @@
|
||||
}
|
||||
|
||||
$chart = $wsPivot.Drawings.AddChart('PivotChart', $ChartType, $pivotTable)
|
||||
$chart.SetPosition(0, 0, 2, 0) #Changed position to top row, next to a chart which doesn't pivot on columns
|
||||
$chart.SetPosition(0, 0, 4, 0) #Changed position to top row, next to a chart which doesn't pivot on columns
|
||||
$chart.SetSize(600, 400)
|
||||
}
|
||||
}
|
||||
@@ -813,7 +815,7 @@
|
||||
$chart = $wsPivot.Drawings.AddChart('PivotChart', $ChartType, $pivotTable)
|
||||
$chart.DataLabel.ShowCategory = $ShowCategory
|
||||
$chart.DataLabel.ShowPercent = $ShowPercent
|
||||
$chart.SetPosition(0,0,2,0) # if Pivot table is rows+data only it will be 2 columns wide if has pivot columns we don't know how wide it will be
|
||||
$chart.SetPosition(0,26,2,26) # if Pivot table is rows+data only it will be 2 columns wide if has pivot columns we don't know how wide it will be
|
||||
if ($NoLegend) {
|
||||
$chart.Legend.Remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user