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

Can't load files with a custom pivot table style #2272

Open
3 of 6 tasks
HarryLoop25 opened this issue Jan 23, 2024 · 0 comments
Open
3 of 6 tasks

Can't load files with a custom pivot table style #2272

HarryLoop25 opened this issue Jan 23, 2024 · 0 comments

Comments

@HarryLoop25
Copy link

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
0.104
e.g. 0.95.3

What is the current behavior?

Can't load file that contains a pivot table that uses a custome style TestCustomPivotTableStyle1

System.ArgumentException: Requested value 'TestCustomPivotTableStyle1 ' was not found. at System.Enum.TryParseByName[TStorage](RuntimeType enumType, ReadOnlySpan1 value, Boolean ignoreCase, Boolean throwOnFailure, TStorage& result) at System.Enum.TryParseByValueOrName[TUnderlying,TStorage](RuntimeType enumType, ReadOnlySpan1 value, Boolean ignoreCase, Boolean throwOnFailure, TUnderlying& result) at System.Enum.TryParse(Type enumType, ReadOnlySpan1 value, Boolean ignoreCase, Boolean throwOnFailure, Object& result) at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) at ClosedXML.Excel.IO.PivotTableCacheDefinitionPartReader.Load(WorkbookPart workbookPart, Sheets sheets, XLWorkbook workbook, Dictionary2 differentialFormats) at ClosedXML.Excel.XLWorkbook.LoadSpreadsheetDocument(SpreadsheetDocument dSpreadsheet) at ClosedXML.Excel.XLWorkbook.LoadSheets(Stream stream) at ClosedXML.Excel.XLWorkbook.Load(Stream stream) at ClosedXML.Excel.XLWorkbook..ctor(Stream stream, LoadOptions loadOptions) at ClosedXML.Excel.XLWorkbook..ctor(Stream stream)

Complete this.

What is the expected behavior or new feature?

To be able to load files with that use a custom pivot table style, and not error.

Complete this.

Is this a regression from the previous version?

Regressions get higher priority. Test against the latest build of the previous minor version. For example, if you experience a problem on v0.95.3, check whether it the problem occurred in v0.94.2 too.

Reproducibility

This is an important section. Read it carefully. Failure to do so will cause a 'RTFM' comment.

Without a code sample, it is unlikely that your issue will get attention. Don't be lazy. Do the effort and assist the developers to reproduce your problem. Code samples should be minimal complete and verifiable. Sample spreadsheets should be attached whenever applicable. Remove sensitive information.

Code to reproduce problem:

public void Main()
{
    var wb = new XLWorkbook(@"C:\temp\TestPivotTableWithCustomStyle.xlsx");
}

Have attached a file with this issue.

  • I attached a sample spreadsheet. (You can drag files on to this issue)

TestPivotTableWithCustomStyle.xlsx

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