From ced0412524a2bd8db58f9c5d6d15655fc6fe243b Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Tue, 25 Nov 2025 18:51:26 +0530 Subject: [PATCH 1/8] 991141-How to remove the source worksheet that contains data for pivot table --- Document-Processing-toc.html | 3 + ...an't-open-Pivottable-source-file-error .md | 105 ++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 77958266f..300dad07b 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -5848,6 +5848,9 @@
  • Does XlsIO support auto-correcting formulas?
  • +
  • + How to resolve the “Can't open Pivottable source file” error? +
  • diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md new file mode 100644 index 000000000..90ca89df8 --- /dev/null +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md @@ -0,0 +1,105 @@ +--- +title: Fix “Can't open PivotTable source file” error in XlsIO | Syncfusion +description: This page explains how to resolve the "Can't open Pivottable source file" error using Syncfusion .NET Excel library (XlsIO). +platform: document-processing +control: XlsIO +documentation: UG +--- + +# How to resolve the “Can't open Pivottable source file” error? + +Deleting the source worksheet and refreshing the PivotTable may work in the current session, but reopening the saved workbook and refreshing can trigger this error. If “Refresh data when opening the file” is enabled, Excel will not disable it automatically. This is Microsoft Excel behavior, and XlsIO follows the same behavior. + +**Recommendations:** + +If you need to remove the worksheet that contains the PivotTable’s source data, hide the worksheet instead of deleting it. +If the source worksheet no longer exists, disable IsRefreshOnLoad before saving the workbook. + +The following code illustrate how to disable the IsRefreshOnLoad property. + +{% tabs %} +{% highlight c# tabtitle="C# [Cross-platform]" %} +using (ExcelEngine excelEngine = new ExcelEngine()) +{ + IApplication application = excelEngine.Excel; + application.DefaultVersion = ExcelVersion.Xlsx; + IWorkbook workbook = application.Workbooks.Open("Data/Sample.xlsx"); + IWorksheet pivotSheet = workbook.Worksheets[0]; + + IPivotTable pivotTable = workbook.Worksheets[1].PivotTables[0]; + PivotTableImpl pivotTableImpl = pivotTable as PivotTableImpl; + + //Disable the refreshing option + pivotTableImpl.Cache.IsRefreshOnLoad = false; + + #region Save + //Saving the workbook + workbook.SaveAs("Output/PivotTable.xlsx"); + #endregion +} +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} +using (ExcelEngine excelEngine = new ExcelEngine()) +{ + IApplication application = excelEngine.Excel; + application.DefaultVersion = ExcelVersion.Xlsx; + IWorkbook workbook = application.Workbooks.Open("Data/Sample.xlsx"); + IWorksheet pivotSheet = workbook.Worksheets[0]; + + IPivotTable pivotTable = workbook.Worksheets[1].PivotTables[0]; + PivotTableImpl pivotTableImpl = pivotTable as PivotTableImpl; + + //Disable the refreshing option + pivotTableImpl.Cache.IsRefreshOnLoad = false; + + #region Save + //Saving the workbook + workbook.SaveAs("Output/PivotTable.xlsx"); + #endregion +} +{% endhighlight %} + +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +Using excelEngine As New ExcelEngine() + Dim application As IApplication = excelEngine.Excel + application.DefaultVersion = ExcelVersion.Xlsx + + Dim workbook As IWorkbook = application.Workbooks.Open("../../Data/Sample.xlsx") + Dim pivotSheet As IWorksheet = workbook.Worksheets(0) + Dim pivotTable As IPivotTable = workbook.Worksheets(1).PivotTables(0) + Dim pivotTableImpl As PivotTableImpl = TryCast(pivotTable, PivotTableImpl) + + ' Disable the refreshing option + pivotTableImpl.Cache.IsRefreshOnLoad = False + + ' Save the workbook + workbook.SaveAs("../../Output/PivotTable.xlsx") +End Using +{% endhighlight %} +{% endtabs %} + + +The following code shows how to hide Excel worksheet. + +{% tabs %} +{% highlight c# tabtitle="C# [Cross-platform]" %} +//Hide the worksheet +worksheet.Visibility = WorksheetVisibility.Hidden; +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} +//Hide the worksheet +worksheet.Visibility = WorksheetVisibility.Hidden; +{% endhighlight %} + +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +'Hide the worksheet +worksheet.Visibility = WorksheetVisibility.Hidden +{% endhighlight %} +{% endtabs %} + +## See Also + +* [Hide Excel Worksheets](https://help.syncfusion.com/document-processing/excel/excel-library/net/migrate-from-office-automation-to-syncfusion-xlsio/hide-excel-worksheets) +* [Working with Pivot Tables](https://help.syncfusion.com/document-processing/excel/excel-library/net/working-with-pivot-tables) From 183966736cde4ecbb1f533871a4d18bb904edb1f Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Tue, 25 Nov 2025 19:04:35 +0530 Subject: [PATCH 2/8] 991141-Pivottable --- Document-Processing-toc.html | 2 +- ...an't-open-Pivottable-source-file-error .md | 105 ------------------ 2 files changed, 1 insertion(+), 106 deletions(-) delete mode 100644 Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 300dad07b..02792b9cc 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -5849,7 +5849,7 @@ Does XlsIO support auto-correcting formulas?
  • - How to resolve the “Can't open Pivottable source file” error? + How to resolve the “Can't open Pivot table source file” error?
  • diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md deleted file mode 100644 index 90ca89df8..000000000 --- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-can't-open-Pivottable-source-file-error .md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Fix “Can't open PivotTable source file” error in XlsIO | Syncfusion -description: This page explains how to resolve the "Can't open Pivottable source file" error using Syncfusion .NET Excel library (XlsIO). -platform: document-processing -control: XlsIO -documentation: UG ---- - -# How to resolve the “Can't open Pivottable source file” error? - -Deleting the source worksheet and refreshing the PivotTable may work in the current session, but reopening the saved workbook and refreshing can trigger this error. If “Refresh data when opening the file” is enabled, Excel will not disable it automatically. This is Microsoft Excel behavior, and XlsIO follows the same behavior. - -**Recommendations:** - -If you need to remove the worksheet that contains the PivotTable’s source data, hide the worksheet instead of deleting it. -If the source worksheet no longer exists, disable IsRefreshOnLoad before saving the workbook. - -The following code illustrate how to disable the IsRefreshOnLoad property. - -{% tabs %} -{% highlight c# tabtitle="C# [Cross-platform]" %} -using (ExcelEngine excelEngine = new ExcelEngine()) -{ - IApplication application = excelEngine.Excel; - application.DefaultVersion = ExcelVersion.Xlsx; - IWorkbook workbook = application.Workbooks.Open("Data/Sample.xlsx"); - IWorksheet pivotSheet = workbook.Worksheets[0]; - - IPivotTable pivotTable = workbook.Worksheets[1].PivotTables[0]; - PivotTableImpl pivotTableImpl = pivotTable as PivotTableImpl; - - //Disable the refreshing option - pivotTableImpl.Cache.IsRefreshOnLoad = false; - - #region Save - //Saving the workbook - workbook.SaveAs("Output/PivotTable.xlsx"); - #endregion -} -{% endhighlight %} - -{% highlight c# tabtitle="C# [Windows-specific]" %} -using (ExcelEngine excelEngine = new ExcelEngine()) -{ - IApplication application = excelEngine.Excel; - application.DefaultVersion = ExcelVersion.Xlsx; - IWorkbook workbook = application.Workbooks.Open("Data/Sample.xlsx"); - IWorksheet pivotSheet = workbook.Worksheets[0]; - - IPivotTable pivotTable = workbook.Worksheets[1].PivotTables[0]; - PivotTableImpl pivotTableImpl = pivotTable as PivotTableImpl; - - //Disable the refreshing option - pivotTableImpl.Cache.IsRefreshOnLoad = false; - - #region Save - //Saving the workbook - workbook.SaveAs("Output/PivotTable.xlsx"); - #endregion -} -{% endhighlight %} - -{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -Using excelEngine As New ExcelEngine() - Dim application As IApplication = excelEngine.Excel - application.DefaultVersion = ExcelVersion.Xlsx - - Dim workbook As IWorkbook = application.Workbooks.Open("../../Data/Sample.xlsx") - Dim pivotSheet As IWorksheet = workbook.Worksheets(0) - Dim pivotTable As IPivotTable = workbook.Worksheets(1).PivotTables(0) - Dim pivotTableImpl As PivotTableImpl = TryCast(pivotTable, PivotTableImpl) - - ' Disable the refreshing option - pivotTableImpl.Cache.IsRefreshOnLoad = False - - ' Save the workbook - workbook.SaveAs("../../Output/PivotTable.xlsx") -End Using -{% endhighlight %} -{% endtabs %} - - -The following code shows how to hide Excel worksheet. - -{% tabs %} -{% highlight c# tabtitle="C# [Cross-platform]" %} -//Hide the worksheet -worksheet.Visibility = WorksheetVisibility.Hidden; -{% endhighlight %} - -{% highlight c# tabtitle="C# [Windows-specific]" %} -//Hide the worksheet -worksheet.Visibility = WorksheetVisibility.Hidden; -{% endhighlight %} - -{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Hide the worksheet -worksheet.Visibility = WorksheetVisibility.Hidden -{% endhighlight %} -{% endtabs %} - -## See Also - -* [Hide Excel Worksheets](https://help.syncfusion.com/document-processing/excel/excel-library/net/migrate-from-office-automation-to-syncfusion-xlsio/hide-excel-worksheets) -* [Working with Pivot Tables](https://help.syncfusion.com/document-processing/excel/excel-library/net/working-with-pivot-tables) From 0472e13f332e450da8931bf43c076feba18c0448 Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Tue, 25 Nov 2025 19:10:00 +0530 Subject: [PATCH 3/8] 991141-Pivottable --- ...not-open-Pivot-table-source-file-error .md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md new file mode 100644 index 000000000..90ca89df8 --- /dev/null +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md @@ -0,0 +1,105 @@ +--- +title: Fix “Can't open PivotTable source file” error in XlsIO | Syncfusion +description: This page explains how to resolve the "Can't open Pivottable source file" error using Syncfusion .NET Excel library (XlsIO). +platform: document-processing +control: XlsIO +documentation: UG +--- + +# How to resolve the “Can't open Pivottable source file” error? + +Deleting the source worksheet and refreshing the PivotTable may work in the current session, but reopening the saved workbook and refreshing can trigger this error. If “Refresh data when opening the file” is enabled, Excel will not disable it automatically. This is Microsoft Excel behavior, and XlsIO follows the same behavior. + +**Recommendations:** + +If you need to remove the worksheet that contains the PivotTable’s source data, hide the worksheet instead of deleting it. +If the source worksheet no longer exists, disable IsRefreshOnLoad before saving the workbook. + +The following code illustrate how to disable the IsRefreshOnLoad property. + +{% tabs %} +{% highlight c# tabtitle="C# [Cross-platform]" %} +using (ExcelEngine excelEngine = new ExcelEngine()) +{ + IApplication application = excelEngine.Excel; + application.DefaultVersion = ExcelVersion.Xlsx; + IWorkbook workbook = application.Workbooks.Open("Data/Sample.xlsx"); + IWorksheet pivotSheet = workbook.Worksheets[0]; + + IPivotTable pivotTable = workbook.Worksheets[1].PivotTables[0]; + PivotTableImpl pivotTableImpl = pivotTable as PivotTableImpl; + + //Disable the refreshing option + pivotTableImpl.Cache.IsRefreshOnLoad = false; + + #region Save + //Saving the workbook + workbook.SaveAs("Output/PivotTable.xlsx"); + #endregion +} +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} +using (ExcelEngine excelEngine = new ExcelEngine()) +{ + IApplication application = excelEngine.Excel; + application.DefaultVersion = ExcelVersion.Xlsx; + IWorkbook workbook = application.Workbooks.Open("Data/Sample.xlsx"); + IWorksheet pivotSheet = workbook.Worksheets[0]; + + IPivotTable pivotTable = workbook.Worksheets[1].PivotTables[0]; + PivotTableImpl pivotTableImpl = pivotTable as PivotTableImpl; + + //Disable the refreshing option + pivotTableImpl.Cache.IsRefreshOnLoad = false; + + #region Save + //Saving the workbook + workbook.SaveAs("Output/PivotTable.xlsx"); + #endregion +} +{% endhighlight %} + +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +Using excelEngine As New ExcelEngine() + Dim application As IApplication = excelEngine.Excel + application.DefaultVersion = ExcelVersion.Xlsx + + Dim workbook As IWorkbook = application.Workbooks.Open("../../Data/Sample.xlsx") + Dim pivotSheet As IWorksheet = workbook.Worksheets(0) + Dim pivotTable As IPivotTable = workbook.Worksheets(1).PivotTables(0) + Dim pivotTableImpl As PivotTableImpl = TryCast(pivotTable, PivotTableImpl) + + ' Disable the refreshing option + pivotTableImpl.Cache.IsRefreshOnLoad = False + + ' Save the workbook + workbook.SaveAs("../../Output/PivotTable.xlsx") +End Using +{% endhighlight %} +{% endtabs %} + + +The following code shows how to hide Excel worksheet. + +{% tabs %} +{% highlight c# tabtitle="C# [Cross-platform]" %} +//Hide the worksheet +worksheet.Visibility = WorksheetVisibility.Hidden; +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} +//Hide the worksheet +worksheet.Visibility = WorksheetVisibility.Hidden; +{% endhighlight %} + +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +'Hide the worksheet +worksheet.Visibility = WorksheetVisibility.Hidden +{% endhighlight %} +{% endtabs %} + +## See Also + +* [Hide Excel Worksheets](https://help.syncfusion.com/document-processing/excel/excel-library/net/migrate-from-office-automation-to-syncfusion-xlsio/hide-excel-worksheets) +* [Working with Pivot Tables](https://help.syncfusion.com/document-processing/excel/excel-library/net/working-with-pivot-tables) From aa82428160d47665f693536c96ad7eb0ef5285bc Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Tue, 25 Nov 2025 19:12:44 +0530 Subject: [PATCH 4/8] 991141-Pivottable --- ...to-resolve-the-cannot-open-Pivot-table-source-file-error .md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md index 90ca89df8..39bd05a15 100644 --- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md @@ -6,7 +6,7 @@ control: XlsIO documentation: UG --- -# How to resolve the “Can't open Pivottable source file” error? +# How to resolve the “Can't open Pivot table source file” error? Deleting the source worksheet and refreshing the PivotTable may work in the current session, but reopening the saved workbook and refreshing can trigger this error. If “Refresh data when opening the file” is enabled, Excel will not disable it automatically. This is Microsoft Excel behavior, and XlsIO follows the same behavior. From f7a9b17d90853009cf13df97b67de14982b13528 Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Tue, 25 Nov 2025 19:22:03 +0530 Subject: [PATCH 5/8] 991141-Pivottable --- ...w-to-resolve-the-cannot-open-Pivot-table-source-file-error.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Document-Processing/Excel/Excel-Library/NET/faqs/{how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md => how-to-resolve-the-cannot-open-Pivot-table-source-file-error.md} (100%) diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error.md similarity index 100% rename from Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error .md rename to Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error.md From 03d2d5851ae41dfb1685303ce993f30940599c1b Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Tue, 25 Nov 2025 19:23:16 +0530 Subject: [PATCH 6/8] 991141-Pivottable --- Document-Processing-toc.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 02792b9cc..0c4c0d3cd 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -5849,7 +5849,7 @@ Does XlsIO support auto-correcting formulas?
  • - How to resolve the “Can't open Pivot table source file” error? + How to resolve the “Can't open Pivot table source file” error?
  • From ea32480db578f09e75db3451cccab80a2a9e4d32 Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Thu, 27 Nov 2025 17:28:37 +0530 Subject: [PATCH 7/8] 991141-Pivottable --- ...o-resolve-the-cannot-open-Pivot-table-source-file-error.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error.md index 39bd05a15..b4c9fae10 100644 --- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error.md +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error.md @@ -12,8 +12,8 @@ Deleting the source worksheet and refreshing the PivotTable may work in the curr **Recommendations:** -If you need to remove the worksheet that contains the PivotTable’s source data, hide the worksheet instead of deleting it. -If the source worksheet no longer exists, disable IsRefreshOnLoad before saving the workbook. +* If you need to remove the worksheet that contains the PivotTable’s source data, hide the worksheet instead of deleting it. +* If the source worksheet no longer exists, disable IsRefreshOnLoad before saving the workbook. The following code illustrate how to disable the IsRefreshOnLoad property. From e1681da2b520d97ad05b31c21205d0c4097554be Mon Sep 17 00:00:00 2001 From: Ramya Sivakumar Date: Thu, 27 Nov 2025 18:52:47 +0530 Subject: [PATCH 8/8] 991141-Pivottable --- Document-Processing-toc.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 0c4c0d3cd..77958266f 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -5848,9 +5848,6 @@
  • Does XlsIO support auto-correcting formulas?
  • -
  • - How to resolve the “Can't open Pivot table source file” error? -