diff --git a/ClosedXML/Excel/XLWorkbook_Load.cs b/ClosedXML/Excel/XLWorkbook_Load.cs index 67d1937..d4e55ae 100644 --- a/ClosedXML/Excel/XLWorkbook_Load.cs +++ b/ClosedXML/Excel/XLWorkbook_Load.cs @@ -454,7 +454,7 @@ var target = ws.FirstCell(); if (pivotTableDefinition?.Location?.Reference?.HasValue ?? false) { - ws.Range(pivotTableDefinition.Location.Reference.Value).Clear(XLClearOptions.Contents); + ws.Range(pivotTableDefinition.Location.Reference.Value).Clear(XLClearOptions.All); target = ws.Range(pivotTableDefinition.Location.Reference.Value).FirstCell(); } diff --git a/ClosedXML_Tests/Resource/Other/PivotTableReferenceFiles/PivotTableWithNoneTheme/outputfile.xlsx b/ClosedXML_Tests/Resource/Other/PivotTableReferenceFiles/PivotTableWithNoneTheme/outputfile.xlsx index 3774c71..be50146 100644 --- a/ClosedXML_Tests/Resource/Other/PivotTableReferenceFiles/PivotTableWithNoneTheme/outputfile.xlsx +++ b/ClosedXML_Tests/Resource/Other/PivotTableReferenceFiles/PivotTableWithNoneTheme/outputfile.xlsx Binary files differ