poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Antwort: Too many Cell Style objects
Date Tue, 08 Sep 2009 12:51:53 GMT
Hi Patil,

here are just my 2 cents:

I have the same problem, but have an upper limit of needed different 
styles: ca. 200. So I store them in a HashMap for later reuse. Every time 
I need a style I look first in the HashMap: if I already have one I reuse 
it else I create a new one.
The resulting xls-file can have up to 53 sheets with ca. 2100 used cells 
in every sheet...

Mit freundlichen Grüßen / Best regards
Reiner Kühl

Reiner Kühl
Application Developer

QVC Call Center GmbH & Co. KG
Lise-Meitner-Allee 1
44801 Bochum

+49 (0) 234-9732-2866
+49 (0) 234-9732-44 2866


QVC - Ideen für mich!

Amtsgericht Düsseldorf: HRA 13610
Geschäftsführer der Komplementärin QVC Call Center Verwaltungs GmbH: Larry 
R. Hayes, Dr. Ulrich Flatten

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist 
nicht gestattet.

This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in 
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in 
this e-mail is strictly forbidden.

P Please consider the environment before printing this e-mail

Patil Minal <PatilMinal@JohnDeere.com> 
08.09.2009 14:16
Bitte antworten an
POI Users List <user@poi.apache.org>

'POI Users List' <user@poi.apache.org>

Too many Cell Style objects


        I need to have a different data format for every cell in a report. 
I create this data format dynamically on the fly. But the problem is that 
I am not able to create a single HSSFCellStyle object for the entire 
column and reassign the HSSFDataFormat object for every row in that 
column. The CellStyle object doesn't seem to change with the changed 
DataFormat object. And If I create a HSSFCellStyle object for every cell, 
and if I exceed the limit of around 5000 objects or so then the POI does 
not apply any cell style to the data thereafter.

Can anyone suggest some apt solution for the problem.

- Minal.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message