EPPlus icon indicating copy to clipboard operation
EPPlus copied to clipboard

Updating or changing the Pivot Table's source range results in a corrupted file

Open leveaul opened this issue 6 years ago • 1 comments

Hi, I am using EPPlus library to create functions for an OutSystems extension called "Advanced Excel". I am trying to update/change a pivot table's source range using a range or a named range but every time it results with a corrupted file at download. I tried to use a named range as a source range for my pivot table and expanding this named range. I tried to use a simple range such as "A1:D100" as a source range like that : image

But nothing worked. I always get a corrupted file.

Did I do something wrong ? Is it a bug in the library ?

leveaul avatar Jun 14 '19 12:06 leveaul

I too tried all possible options - including the ones you have listed. During my research i found that PivotTable is accepting SourceRange only if it is pointing to an ExcelTable object. so i tried to create ExcelTable object via epplus, but it seems that epplus is currently only supporting simple tables that has no formula in its columns.

In the end i have solved this problem by changing the source range of the table and providing that table as a source to pivot.

KalpeshPopat avatar Nov 27 '19 09:11 KalpeshPopat