Free Support Forum -

Pivot table data lost in case of mail attachment


we are sending the generated excel file to the clients through mail.

now when the client clicks the open in file dialog box. it will open the excel and there is no data for pivot excel table.

here the attachement request will be get.

how to fix this one.

you said that request for pivot table generating should be post.

if we give the request as get. we did not get the data in pivot table.

any comment on this.

Thanks & regards



Please provide us your simple source code and source templates (input xls/xlsx files if any) so that we could look into it and help you asap.


follow the steps:

i executed your one of demo program.


find the attached code file and generated xlsx file.

send this file as mail attachment.(without opening and save back to the disk).

it is working fine firefox.

when i open the file in internet explorer. the pivot table data is not displayed.

we found one thing.

after saving to the disk location open the excel file save back to the disk.

and send this file as attachment. in this case it works in internet explorer. and file size is also increased.

Thanks & Regards.



Please try the following code after creating the pivottable:



the given method is works only for that example.

we are using lightcelldataprovider.

this is my another example.


import com.aspose.cells.*;
public class pivot {
public static void main(String[] args) throws Exception {
Workbook workbook = new Workbook();“c:\5315.xlsx”,FileFormatType.XLSX);
pivot p=new pivot();


//Saving the Excel file“c:\mail.xlsx”,FileFormatType.XLSX);

private void CreateStaticReport(Workbook workbook)
Worksheets worksheets = workbook.getWorksheets();
Worksheet worksheet = worksheets.addSheet(“Pivot sheet”);

PivotTables pivotTables = worksheet.getPivotTables();

//Adding a PivotTable to the worksheet
int index = pivotTables.add("=Data!$A$1:Y$73",“A1”,“PivotTable1”);

//Accessing the instance of the newly added PivotTable
PivotTable pivotTable = pivotTables.get(index);

//Unshowing grand totals for rows.

//Draging the first field to the row area.
pivotTable.addFieldToArea(PivotFieldType.ROW,“Applicant Status”);

//Draging the second field to the column area.
pivotTable.addFieldToArea(PivotFieldType.PAGE,“Vacancy Name”);
pivotTable.addFieldToArea(PivotFieldType.PAGE,“Recruiter Full Name”);
pivotTable.addFieldToArea(PivotFieldType.PAGE,“Address City”);

//Draging the third field to the data area.
pivotTable.addFieldToArea(PivotFieldType.DATA,“Applicant Number”);

PivotFields pivotFields = pivotTable.getDataFields();





i execute this one and sent as mail attachment.

in this case also pivot table table data is is happens only in internet explorer.

how to fix this one.

please find the attached excel.

thanks & regards.



any update on this?

Thanks & Regards



We could not find this issue, it works fine, the output file is attached here. Please give your output file here. We will check it soon.



1.send xlsx file as mail attachement this xlsx file in internet explorer 6.0 open in dialog box.

please test this case in internet explorer.

please find attached images


Well, we could not find such kind of issue you mentioned. We have tested both on web page and via mail attachment. We have no good idea for your issue which seems strange to us. We think you should try to create such a file manually in MS Excel and see whether it can work fine for you when sending the file as mail attachment.

Thank you.