mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Fixes around EPPlus update
This commit is contained in:
@@ -272,8 +272,11 @@
|
||||
Write-Warning -Message "PivotTable defined in $($pivotTableName) already exists, only the data range will be changed."
|
||||
$pivotTable = $wsPivot.PivotTables[$pivotTableName]
|
||||
if (-not $SourceRange) { $SourceRange = $SourceWorkSheet.Dimension.Address}
|
||||
$pivotTable.CacheDefinition.CacheDefinitionXml.pivotCacheDefinition.cacheSource.worksheetSource.ref = $SourceRange
|
||||
}
|
||||
$pivotTable.CacheDefinition.SourceRange = $SourceWorkSheet.cells[$SourceRange]
|
||||
#change for epPlus 4.5 - Previously needed to hack the xml
|
||||
# $pivotTable.CacheDefinition.CacheDefinitionXml.pivotCacheDefinition.cacheSource.worksheetSource.ref = $SourceRange
|
||||
|
||||
}
|
||||
|
||||
#Create the chart if it doesn't exist, leave alone if it does.
|
||||
if ($IncludePivotChart -and -not $wsPivot.Drawings["Chart$pivotTableName"] ) {
|
||||
|
||||
Reference in New Issue
Block a user