Free Support Forum - aspose.com

Pivot table filters (page fields in aspose.cell.pivotTables)

Hi,


ASPOSE VERSION : 4.4.0.0
C#.NET : 2.0
we are using the ASPOSE.cell for generate the pivot tables in excel file. We can able to create the pivot table but we can’t able to set filters(page fields) to default values in the C# class file.
For example if we have filter like date and beside that we have one filter combo box contains the list of dates. Assume for Jan 2010 we have the dates 01/01/2010 , 01/02/2010 , 01/03/2010 ,…01/31/2010 ( total of 31 dates).
so in my C# code :
pivotTable1.PageFields[2].CurrentPageItem = 9;
so in the excel sheet - pivot table the filter for date is setting to 01/10/2010.

but if i want to set the date to 01/21/2010 then i have to write the code like pivotTable1.PageFields[2].CurrentPageItem = 20;
but its not working.
The page index is working if its between 1 to 10 otherwise it not taking the value.
So , please advice me ,if we can do it with current aspose 4.4 version or we requires to use new version if yes please provide us the details.

Hi,

Well, since you are using some older version of the product for I am not sure (if it is bug or not). Please try our latest version downloading from the site (using any of the links):
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry231670.aspx
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry232019.aspx

If you still find the issue, kindly paste your sample code and attach your template file here, we will check your issue soon.

Thank you.