Hello,
We use aspose cells for a long time (older version). We are now reviewing our sources to use the recent version of aspose.
We discovered this requires a lot of changes
Doing this changes we have 2 major problems (until now) :
- We can no longer insert “double” values into cells (signature for “setValue” does no longer exist)
***************************************
- we are working on iSeries and cannot access object properties directly, so we need setter-/getter-methods
I think no “setter” exists for setting the StyleFlag properties to TRUE or FALSE
I would like to set “ALL” to TRUE …
Can this be checked/fixed ?
Thanks a lot !!
Hi Hendrik,
Thanks a lot for the quick reply !
We are testing with version 8.5.0
I will try your suggestions.
Both solutions are also working with version 8.5.0 !
Thanks a lot !
I will proceed with the changes; Maybe you’ll hear me again
Hi Hendrik,
Hello,
Can you check method “setPattern” for a style object ? I can use it 2 times, but on the third call I get memory problems. Are all used objects free’d ?
Thanks for checking!
Hi Hendrik,
Style style = book.createStyle();
style.setBackgroundColor(Color.getBlue());
style.setForegroundColor(Color.getYellow());
style.setPattern(BackgroundType.VERTICAL_STRIPE);
Cell A1 = book.getWorksheets().get(0).getCells().get(“A1”);
A1.setStyle(style);
Cell A2 = book.getWorksheets().get(0).getCells().get(“A2”);
style.setPattern(BackgroundType.DIAGONAL_CROSSHATCH);
A2.setStyle(style);
Cell A3 = book.getWorksheets().get(0).getCells().get(“A3”);
style.setPattern(BackgroundType.THICK_DIAGONAL_CROSSHATCH);
A3.setStyle(style);
book.save(dir + “output.xlsx”);
Hello,
Attached you can find the dump I get.
It looks like a memory problem that occurs on creation of the 4th style.
It’s difficult to post the code (because it’s written in RPG, calling java procedures), but these are the steps we take :
1 - Create a new workbook
2 - Create different styles
* Create style object
* Retrieve the font and specify some font settings
* Retrieve the borders and specify some border settings
* Set the pattern + foreground color (in this sequence)
* …
The javadump happens when setting the pattern.
Regards,
Hendrik
Hello,
Is it possible to check the garbage collection ?
Thanks a lot !
HGOAS4:Hello,Attached you can find the dump I get.
It looks like a memory problem that occurs on creation of the 4th style.It’s difficult to post the code (because it’s written in RPG, calling java procedures), but these are the steps we take :
[code]
1 - Create a new workbook
2 - Create different styles
* Create style object
* Retrieve the font and specify some font settings
* Retrieve the borders and specify some border settings
* Set the pattern + foreground color (in this sequence)
* …The javadump happens when setting the pattern.
Regards,
Hendrik
[/code]
HGOAS4:Hello,Is it possible to check the garbage collection ?
Thanks a lot !
Hello,
I found the problem.
I cleaned up some references that were still used … Issue solved
Another question :
What’s the best (new) way to create a CellArea ?
In the past we used : CellArea(int, int, int, int) but this does not work anymore
I tried : MyArea = CellArea(); --> ok so far
MyArea.createCellArea(int, int, int, int)
but this fails
Does this procedure return a value/object ?
Hi Hendrik,
cellArea.StartRow = 0;
cellArea.StartColumn = 0;
cellArea.EndRow = 10;
cellArea.EndColumn = 10;
Thanks for the quick reply, but as mentioned earlier I need methods to set properties. I cannot set the properties like specified
Hi Hendrik,
Ok, I managed to do that by defining it as static method.
Thanks
Hello, here I am again
Setting a conditional format causes problems
Can you check the enumarations we used with the old version of aspose ?
I get a null pointer exception on “addCondition”…
I do not pass any null pointers, so maybe the enumerations are not ok.
Or …
Should there already be an area added to the formatconditionCollection ??
Thanks again
Hi Hendrik,
That’s exactly what I’m doing (but I get a null pointer exception). Can you check the enumerations for me please ?
Thanks
Hi again,