Based on the example [Pivot Tables](https://closedxml.codeplex.com/wikipage?title=Pivot%20Table%20example) , do the following steps to reproduce the problem
Excellent example . It works perfect, but if you add more than one value will have a problem . Here I leave an example to reproduce the problem . Suppose Pastry class has one more property called "Amount" int
Step 1. Add two values
```
// The values in our table will come from the " NumberOfOrders " field
// The default setting is a full calculation of each row / column
pt.Values.Add ("NumberOfOrders");
// Another value ( THIS IS THE ONE THAT CAUSE THE PROBLEM )
pt.Values.Add ("Amount" ) ;
```
Step 2. Save the excel file
Step 3. Open the excel file , and throw the following message
We found a problem with Content ' Patry.xlsx ' . Do you want to try to recover as much content as possible ? If trusts origin of this book , please click yes .
Click yes, and I'll get the following message :
Removed Feature: PivotTable report from / xl / PivotTables / pivotTable.xml part ( PivotTable view)
Records removed : book Properties / xl / workbook.xml part ( Book)
Step 4. Final result , the pivot table is not generated
aTTACH project C# for reproduce problem.
Please expect your help to solve this problem .. thank you very much
Comments: Does anybody know if this issue is going to be fixed? It seems pretty common to Add multiple Columns as values in a pivot table. But anything more than 1 value being added seems to cause errors when dynamically creating a pivot table. I can add either of the below, and I am fine. Trying adding 2, and the file opens with an error. pt.Values.Add("Quantity").SetSummaryFormula(XLPivotSummary.Sum); pt.Values.Add("Total Price").SetSummaryFormula(XLPivotSummary.Sum);
Excellent example . It works perfect, but if you add more than one value will have a problem . Here I leave an example to reproduce the problem . Suppose Pastry class has one more property called "Amount" int
Step 1. Add two values
```
// The values in our table will come from the " NumberOfOrders " field
// The default setting is a full calculation of each row / column
pt.Values.Add ("NumberOfOrders");
// Another value ( THIS IS THE ONE THAT CAUSE THE PROBLEM )
pt.Values.Add ("Amount" ) ;
```
Step 2. Save the excel file
Step 3. Open the excel file , and throw the following message
We found a problem with Content ' Patry.xlsx ' . Do you want to try to recover as much content as possible ? If trusts origin of this book , please click yes .
Click yes, and I'll get the following message :
Removed Feature: PivotTable report from / xl / PivotTables / pivotTable.xml part ( PivotTable view)
Records removed : book Properties / xl / workbook.xml part ( Book)
Step 4. Final result , the pivot table is not generated
aTTACH project C# for reproduce problem.
Please expect your help to solve this problem .. thank you very much
Comments: Does anybody know if this issue is going to be fixed? It seems pretty common to Add multiple Columns as values in a pivot table. But anything more than 1 value being added seems to cause errors when dynamically creating a pivot table. I can add either of the below, and I am fine. Trying adding 2, and the file opens with an error. pt.Values.Add("Quantity").SetSummaryFormula(XLPivotSummary.Sum); pt.Values.Add("Total Price").SetSummaryFormula(XLPivotSummary.Sum);