Free Support Forum - aspose.com

Aspose.Cells for Java changes certain conditional formats

Hello,

we are integrating aspose.cells in our product to calculate and prepare excel sheets for printing.

Sadly, aspose changes certain conditional formats (Borders are reset to white but shouldnt be changed).

I attached a simple testcase that demonstrates the change.

Previously, we received a fix from you for a problem with SumProduct() formulas. Do your fixes include previous fixes?

Thanks for your effort,
Christian Wendt

Hi Christian,

Well, I don't find any problem and the border are there similar to your template file.

Attached is my output file.

And Which version of Aspose.Cells for java you are using. Could you try the attached version

Thank you.

We used a version received as a quick fix on 11-13-2007. The aspose.cells version attached in this thread fixes the formating problem; thank you.

Our problem did reappear, but now without conditional formats.

The format of a specific sheet is changed after it has been processed by our application, which fills numerous input values and calculates complex formulas.

I can’t quite reproduce the problem outside our application. Could you please verify under which conditions a Format (especially border) is changed by aspose?

Thanks,
Christian Wendt

Hi Christian,

Thank for considering Aspose.

Well, Aspose.Cells for Java works in the similar way as MS Excel does.

We appreciate if you could create a simple test application with code and template file (if you use), paste or attach it here to reproduce the issue. It will help us really to figure out your issue soon.

Thank you.

Sadly, I can’t extract a minimal part of code & excel from our application to reproduce the Problem: a specific sheet of the excel template of our customer is calculated correctly, but all formats regarding borders are deleted from it.

While trying to track down the problem and trying to isolate it, i come to the conclusion that it seems to be a really weird side effect in aspose.

The steps that are done are the following:

Workbook workbook=new Workbook();
workbook.open({Template from customer});
set Various Parameters (using Cell.setValue())
workbook.save({Temporary datablob stored in DB})

now various other tasks can occur, the customer can download the excel file to check or correct the parameters - all formats are intact

Workbook workbook=new Workbook()
workbook.open({Temporary datablob})
- when we save the excel file (or simply look at the border styles using getStyle().getBorderLine()) the borders (but only in one specific sheet) have been removed.


So excel and aspose interprete the same file in a different way, after aspose has saved it for the second time excel doesn’t see the borders, either.

I can’t attach the complete template file as it is our customer’s, and every time i try to trim it down the problem disappears.

I hope the information in this report give you a hint on a place where to search for the problem nevertheless.

Thanks in advance,
Christian Wendt

Hi Christian,

Thanks for considering Aspose.

Could you try the attached version as we did resolve some formatting issues in this fix.

Any how, we will further explore if we can track down the issue and we will still appreciate if you could create a sample test to show the issue. Our clients always rely on us as we handle their data with ultimate care. We can sign an NDA (Non Disclosure Agreement) with you and you may post your template file with sample code @ nanjing@aspose.com without any problem, we will check it soon.

Thank you.

Thinking about the problem, i tried again to extract it to a simple testcase, this time i suceeded.

I attached the source and template I used, plus the result of my testrun (which shows that the borders disappear after the second save)

The test only:
*loads the template
*saves to ByteArray and File 1
*loads from ByteArray
*saves to File 2

the template & File 1 show the borders, File 2 lacks them.

I just executed the test again with the alternative Version - sadly it still looses format.

I hope you can track down the bug using this,

Christian Wendt

We used the Aspose.Cell.zip posted by you in our Test Environment - we get the following exception:

| Uncaught exception :
java.util.ConcurrentModificationException
at com.aspose.cells.dH.hasNext(Unknown Source)
at com.aspose.cells.Worksheet.a(Unknown Source)
at com.aspose.cells.Workbook.calculateFormula(Unknown Source)


So we revert to the last working Aspose.Cells.jar

Hi,

Thanks for the sample files with sample code,

We will figure it out soon.

Thank you.

Hi,

Please try this fix. The bug of lacking border has been fixed.

For "ConcurrentModificationException", we fixed a possible bug too. If for your case this Exception still persists, please give us a template to reproduce this issue, that will help us to figure out it soon. Thank you.

Thanks, the bug is fixed by this release.

Sadly we have a different regression now: I receive the Exception

com.aspose.cells.FormulaCalcException
at com.aspose.cells.Cell.c(Unknown Source)
at com.aspose.cells.Worksheet.a(Unknown Source)
at com.aspose.cells.Worksheets.calculateFormula(Unknown Source)
at com.aspose.cells.Worksheet.calculateFormula(Unknown Source)

or

com.aspose.cells.FormulaCalcException
at com.aspose.cells.Cell.c(Unknown Source)
at com.aspose.cells.Worksheet.a(Unknown Source)
at com.aspose.cells.Workbook.calculateFormula(Unknown Source)

– i believe the offending formula is using VLOOKUP, but i’m still trying to isolate the piece of excel that is causing the exception.

Hi,

Could you post your template file with sample code. It will help us to track down and figure out the issue soon.

Thank you.

I’ve sent our customer’s templates to the email you’ve given me a few posts ago.


Thank you.

Did you receive my email okay?

Hi Christian,

Would you please try the latest version 1.9.3 we released last week, in that version, we fixed some bug of calculating formula. And we will check your data as soon as we get it.

Hi

Please try our latest version 1.9.3, you can download it from http://www.aspose.com/Community/Files/51/aspose.cells/entry110388.aspx. I have tested it with your code and template, the bug has been fixed.

Yes, you’re right. It fixes the bug.

Sadly the old bug http://www.aspose.com/Community/Forums/permalink/110640/104264/ShowThread.aspx#104264

(original post in this thread) reappears with that version

Hi,

Could you elaborate which issue you are facing again. We appreciate if you could create a sample test code with your template file and post us here or you may start a new thread.

We will check it soon.

Thank you.