Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Open excel file having pivot table with named table range reference #2309

Open
2 of 5 tasks
spk33 opened this issue Mar 12, 2024 · 0 comments
Open
2 of 5 tasks

Comments

@spk33
Copy link

spk33 commented Mar 12, 2024

Read and complete the full issue template

Do not randomly delete sections. They are here for a reason.

Do you want to request a feature or report a bug?

  • Bug
  • Feature
  • Question

Did you test against the latest CI build?

  • Yes
  • No

If you answered No, please test with the latest development build first.

Version of ClosedXML

e.g. 0.102.2

What is the current behavior?
Not sure if this is a bug for ClosedXML or limitation for referencing OpenXML.The issue im facing is

Unable to open xlsx file and getting Object reference error when opening an excel file which has Pivot Tables with source as Named Table reference.

What is the expected behavior or new feature?

to be able to open the file and read the values from the named Manager or the individual cells
attached the sample excel file and code for reference
testingPivotExcel.zip

Is this a regression from the previous version?

This issue is happening in current stable version 0.102.2

Reproducibility

Code to reproduce problem:

using ClosedXML.Excel;

try
{
    string excelFileName = "testPivot.xlsx";

    string excelFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, excelFileName);

    // Load the Excel workbook and worksheet containing the pivot table  with named table reference
    var workbook = new XLWorkbook(excelFilePath);
    var worksheet = workbook.Worksheet(1);


    var pivotTableParts = worksheet.PivotTables;
}
catch (Exception ex)
{
	throw;
}
  • [ x] I attached a sample spreadsheet. (You can drag files on to this issue)
    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant