Excel merger error

I am getting below error when I am trying to combine excel embedded with PDF twice in final excel output. Any idea what’s causing it?

2014-07-22 11:58:34 - TP-Processor23 - ERROR [ExcelMerger:220]: java.util.zip.ZipException: duplicate entry: xl/embeddings/oleObject1.bin
java.util.zip.ZipException: duplicate entry: xl/embeddings/oleObject1.bin
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)

Hi Zohaib,


Thank you for contacting Aspose support, and welcome to Aspose.Cells support forum.

In order to thoroughly investigate the problem cause, we need to review your sample code as well as the sample spreadsheets along with your environment details. Please be kind enough to provide additional material as requested above in order to isolate the problem cause, and to provide a fix (if applicable).

Before you provide the code & sample spreadsheets, please give a try to the latest version of Aspose.Cells for Java (Latest Version) to see if you still can reproduce the problem on your side.

Please find details attached. here’s code snippet.





Workbook SourceBook1 = new Workbook(“C:\TEMP\combined.xlsx”);



//Define the second source book.

//Open the second excel file.

Workbook SourceBook2 = new Workbook(“C:\TEMP\A.xlsx”);





//Combining the two workbooks

SourceBook1.combine(SourceBook2);



//Save the target book file.

// SourceBook1.save(“C:\TEMP\combined.xls”);

SourceBook1.save(“C:\TEMP\combined.xlsx”);

Hi Zohaib,


Thank you for providing the sample spreadsheets.

Unfortunately, we are unable to reproduce the said exception while using the latest version of Aspose.Cells for Java 8.1.1.4 (link shared in previous response). Please note, we have executed the tests in Windows 7 Home Premium 64-bit environment with against 1.7.0_60. Please provide your environment details if the problem persists with the latest version of Aspose.Cells for java 8.1.1.4. Moreover, please give a try by saving the results to a new file instead of overwriting it to the originally loaded spreadsheet. You may do this by passing a new file name in the Workbook.save method.

We aggregate more than 30 reports so we cant save report with new name each type we aggregate report. Do you support webEx session to look at issue?

Hi Zohaib,


Aspose support forums are the best place to discuss support matters. Moreover, we require your environment details to simulate it in order to reproduce the said exception on our end.

Have you give a try to the latest version of Aspose.Cells for Java 8.1.1.4? Are you able to reproduce the exception with the latest build?

As I told previously, there is no issue when I try to aggregate report A first but when I try to aggregate another report B (excel embedded with PDF) or same report A in parallel or sequentially into final excel. it throws exception. yes, I had tried with Java 8.1.1.4 but that does not help. Regarding system configuration, its window 7, JDK 5, 6 GB RAM, 64 bit OS, CPU speed 3.19 GHZ.

Hi Zohaib,


Thank you for providing the environment details. Let me try the scenario with JDK 5 and get back to you with updates in this regard.

Hi again,


We are able to replicate the exact exception with your provided spreadsheets & source code, while using the latest version of Aspose.Cells for Java 8.1.1.4. The problem seems to be random, as it was observed only once in several runs. Anyway, the issue has been logged in our bug tracking system under the ticket CELLSJAVA-40924 for further investigation. Please spare us little time to properly analyze the problem cause, and to provide a fix at earliest possible. In the meanwhile, we will keep you posted with updates in this regard.

What’s current status?

Hi Zohaib,

Thanks for your posting and using Aspose.Cells.

We are afraid, there is no update for you at this moment. However, we have logged your comment in our database against this issue. Please spare us some time. Once, there is some fix or other news for you, we will let you know asap.

Its very critical issue for our product which we offer to client/user as almost one or many reports contain a excel with PDF. Hence, we need to know where we stand with this issue and when we can expect solution?

Hi Zohaib,

Thanks for your posting and using Aspose.Cells.

I have again added your comment in our database against this issue. Hopefully, you will get some update relating to it. Please spare us some time, once, there is some news for you, we will let you know asap.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v8.1.2.4 (attached).

We have fixed your issue now.

Let us know your feedback.

Thank you.

Getting permission issue. any other to reach download section to get that file downloaded?

Hi,

You may get it using the link below:
Aspose.Cells for Java (Latest Version)

Thank you.

Hi,

I am one of the co-worker of Zohaib Khan.

New jar file provided by still not working as expected.

When we merge two different excel file with PDF embedded in it, merging is working fine but it corrupts the PDF file which is embedded in it.

Merged output is attached(MergedOutput.xlsx), PDF file(object) in first tab is intact/good but file in the second tab get corrupted(i.e. getting converted in to image).

Attached test files too.

This is very high priority issue and hampering our business, please get this fixed asap.

Thanks,

Sachin Dagar

sdagar@globeop.com

Any updates ?

Hi Sachin,


First of all, please accept our sincere apologies for a bit delayed response.

We are currently evaluating your presented scenario, and we will shortly get back to you with updates in this regard.

Hi Sachin,


Thank you for your patience.

We have evaluated your recently presented scenario while using the latest version of Aspose.Cells for Java 8.1.2.5. We are able to replicate the problem as we have received the damaged embedded object in the second worksheet of merged/combined spreadsheet. The problem has been logged into ug tracking system for further investigation & correction purposes. The ticket Id for your future reference is CELLSJAVA-40944. Please spare us some time to properly analyze the problem cause, and to provide a fix for it. In the meanwhile, we will keep you posted with updates in this regard.

Java

Workbook SourceBook1 = new Workbook(myDir + “Test1 .xlsx”);

//Define the second source book & open the second excel file.
Workbook SourceBook2 = new Workbook(myDir + “Test2.xlsx”);

//Combining the two workbooks
SourceBook1.combine(SourceBook2);

//Save the target book file.
SourceBook1.save(myDir + “output.xlsx”);