We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Urgent: Pivot table and pivot chart not getting copied completely when doing workbook.combine

Hi,

Please treat this as extremely urgent request as we need to go into production tomorrow. The pivot table and pivot chart is not getting copied completely when we perform workbook.combine()

Please find attached:

Sample input file: Test.xls

Sample output file: outputWithAspose.xls

The issue is the copied workbook does not have properties like chart data range, it does not have the pivot table properties.

Sample code:

/*
* File : $Source: $
* Version : $Revision: $
* Date : $Date: $
* Modified by : $Author: $
*/

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.aspose.cells.FileFormatType;
import com.aspose.cells.License;
import com.aspose.cells.Workbook;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class TestAspose
{
static String wd = "C:\\Developer\\TEMP\\frame\\";

@SuppressWarnings("unchecked")
public static void main(String[] args) throws Exception
{
File file = new File("C:\\Developer\\TEMP\\frame\\");
File[] inputFiles = file.listFiles();

License license = new License();
license.setLicense(new FileInputStream("C:\\Developer\\work\\workspace\\TestAspose\\lib\\Aspose.Cells.lic"));
Workbook outputWorkbook = new Workbook();
for (File inputFile : inputFiles)
{

if (!inputFile.getAbsolutePath().equalsIgnoreCase("C:\\Developer\\TEMP\\frame\\master_blank.xls"))
{
Workbook book = new Workbook();

book.open(inputFile.getAbsolutePath());
outputWorkbook.combine(book);
}
}

String fileName = wd + "outputWithAspose.xls";
outputWorkbook.save(fileName, FileFormatType.EXCEL97TO2003);

}

}

Please let me know if you require any further details.

Your help is much appreciated.

Thanks

DJ

Hi,

Thanks for providing us the sample code and template files.

I am afraid, currently pivot tables won’t be rendered while combining workbooks. We have already logged an issue with an id: CELLSJAVA-28029. We will try to add this functionality before the end of this week. Once it is implemented, we will let you know.

Thank you.

Hi Amjad,

Thanks for your response. Please advise if we are on track to get this fix by Friday as the users of our system are waiting for the fix.

Thanks

DJ

Hi,

I have forwarded your comment. We will let you know as soon as we get any update.

Hi,


We are pleased to announce that we have supported the feature of combining Pivot Tables while combining two Workbooks in our latest fix version of Aspose.Cells JAVA v2.5.4.4 [attached]. Please test your requirement with this new JAR and let us know of your feedback.

Thank you

Hi Babar,

Thanks for the quick turnaround. One of the reported issue is resolved. The pivot table is copied now but the other issue reported was as follows:

When the user right clicks on the chart in the sample input file I attached and selects "Select Data"

The property "Chart data range" has the value : [Test.xls]Test!Pivot16

This property is not set in the new workbook.

Thanks

DJ

Please let me know if you require any further details on the issue that I have mentioned in my previous mail.

Thanks

DJ

Hi DJ,


Thanks for your feedback.
I have noticed the same issue in my output [combined] file. I have attached my comments to the Ticket associated with this thread. Hopefully soon we will resolve this issue. Also we will keep you posted on the ETA of fix.
Thank you for your patience.

Also, pivot table is not getting copied for all cases. Example : please find a sample attached.

Please let me know if you need further details.

Thanks

DJ

Can you please log the issue mentioned in my previous mail as well as another issue?

Thanks for your help

Thanks

DJ

Hi again,


Thanks for your template file.
I have logged my comments to the Ticket associated with this thread. Also I provided my input files and corrupt output file that was generated by combining the two workbook. We will sort this out very soon.

Hi,

Thanks for pointing out this issue as well.

I tried combining your Test2.xls file to new workbook and found the issue as you mentioned. We will also figure it out soon.

thank you.

Hi,

We have fixed this issue. Please download Aspose.Cells for Java v2.5.4.5.

Hi,

Thanks for the fix but it is not working still. If I have 2 workbooks with 2 pivot tables and try to combine, it gives error message:

Unable to read the file

If I try to combine an excel with more pivot tables and charts, it fails combining and copying complete content:

Sample attached: test_sheet.xls

Output combining test_sheet.xls and previously attached Test2.xls together: outputWithAspose.xls

Please let me know if you require further details.

Thanks

DJ

Hi DJ,


Thank you for the feedback.
I have attached your comments to the Ticket attached to this thread, after re-opening it. We will get back to you on this.

Hi Babar,

What is the ETA for resolving this issue? Please advise.

Thanks for your help

DJ

Hi DJ,


I am afraid, right now we do not have any updates on this issue and we have requested ETA for the fix. As soon as we get any news, we will post it here.
Thank you for your patience.

Hi Babar,

Please let me know if there are any further updates on this issues.

Thanks for your help

DJ

Hi,

I am afraid, your issue [CELLSJAVA-28029] is not fixed yet. I have attached your comment. We will update you soon. Thanks for your patience.

Hi DJ,


We are still working on your said issue and we will provide you a fix in next week.
Thank you.