Free Support Forum - aspose.com

Filter on label are not applied during refreshPivotTables


#1

We have define filter on label of a pivot table to exclude empty cells.
After refreshPivotTables, pivot table contains "(blank) cells.
Code example:

import com.aspose.cells.SaveFormat;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.cells.WorksheetCollection;

public class testasposeXLSPivottoPDF
{

public static void main(String[] args) throws Exception
{
    // TODO Auto-generated method stub
   new testasposeXLSPivottoPDF();
}

public testasposeXLSPivottoPDF() throws Exception
{
    String filepath="C:/temp/gteufp_fr_q000000001.xlsx";       
    Workbook workbook = new Workbook(filepath);
    WorksheetCollection worksheets = workbook.getWorksheets();
    workbook.save(filepath+".ok.pdf", SaveFormat.PDF);               
    for (Object xsheet : worksheets)
    {                        
        
       Worksheet wsheet = (Worksheet)xsheet;
       wsheet.refreshPivotTables();
    }
    workbook.save(filepath+".ko.pdf", SaveFormat.PDF);               
}

}gteufp_fr_q000000001.zip (13.8 KB)


#2

@j.brauge,

Thanks for the template file and sample code.

After an initial test, I am able to observe the issue as you mentioned by using your sample code with your template file. I found that filters on labels are not applied during PivotTable.refreshPivotTables call. I have logged a ticket with an id “CELLSJAVA-42825” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.