mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-04 17:43:48 +00:00
Supports nameing the PivotTable sheet created
This commit is contained in:
@@ -341,6 +341,7 @@
|
||||
[Int]$TitleSize = 22,
|
||||
[System.Drawing.Color]$TitleBackgroundColor,
|
||||
[Switch]$IncludePivotTable,
|
||||
[String]$PivotTableName,
|
||||
[String[]]$PivotRows,
|
||||
[String[]]$PivotColumns,
|
||||
$PivotData,
|
||||
@@ -801,7 +802,8 @@
|
||||
|
||||
if ($IncludePivotTable -or $IncludePivotChart) {
|
||||
#changed so -includePivotChart Implies -includePivotTable.
|
||||
$pivotTableName = $WorkSheetname + 'PivotTable'
|
||||
if (!$PivotTableName) { $pivotTableName = $WorkSheetname + 'PivotTable'}
|
||||
|
||||
#Make sure the Pivot table sheet doesn't already exist
|
||||
try { $pkg.Workbook.Worksheets.Delete( $pivotTableName) } catch {}
|
||||
$wsPivot = $pkg | Add-WorkSheet -WorkSheetname $pivotTableName -NoClobber:$NoClobber
|
||||
|
||||
Reference in New Issue
Block a user