Closed mlivingstonNE closed 5 years ago
Wrong project? =) Please, report this to https://github.com/ClosedXML/ClosedXML and be careful with filling the issue template.
Create please here https://github.com/ClosedXML/ClosedXML/issues
Terribly sorry. I thought I was in the ClosedXML/ClosedXML/issues. My mistake.
I have a simple application that creates a Excel file, a table, and a pivot table based on the table. The table columns are static at 10, and rows vary but a generally between 35,000 and 40,000. In this case, if the row count exceeds 32,895 then the pivot table isn't created correctly and I get the old error saying "We found a problem with some content in [file name]. Do you want to recover..." and the repairs log:
Removed Feature: PivotTable report from /pivotCache/pivotCacheDefinition1.xml part (PivotTable cache) Removed Feature: PivotTable report from /xl/pivotTables/pivotTable.xml part (PivotTable view) Removed Records: Workbook properties from /xl/workbook.xml part (Workbook).
If I manually keep the rows to 32,895 in the PivotTables.Add definition, it creates the files correctly without the error.
CSharp code below and created file attached. Test2.xlsx
{ static void Main(string[] args) { String fileName = "DeliveryCompliace " + DateTime.Today.ToString("MMddyyyy") + ".xlsx"; String runTime = DateTime.Now.ToString("MM/dd/yyyy HH:mm"); String reportDate = DateTime.Today.ToLongDateString();