cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grange, John" <john.gra...@bluefinger.com>
Subject RE: HSSFSerializer too many styles
Date Wed, 05 Nov 2003 14:23:40 GMT
FYI:
 
Excel does have a limit of approx 4000 different styles in one document
(don't think m$ thought anybody would need that many, but then they thought
640K would be enough for everything running on one PC)
 
we ran into this problem using another automatic excel production tool and
just had to back right out of using styles.
 
sorry not to be able to help, but you do, at least, know why excel is coming
up with the error.
 
 
 

John Grange 
Software Team Leader 

Tel: +44 (0) 1749 834922 
Email: john.grange@bluefinger.com 


BlueFinger Limited 
Underwood Business Park, Wookey Hole Road, Wells, Somerset, BA5 1AF, UK 
Tel: +44 (0) 1749 834900
Fax: +44 (0) 1749 834902 
Mobile: +44 (0) 7876 038058 
web: www.bluefinger.com <http://www.bluefinger.com/>  

 

Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay,
BRISTOL. BS1 6EG.

*** This E-mail contains confidential information for the addressee only. If
you are not the intended recipient, please notify us immediately. You should
not use, disclose, distribute or copy this communication if received in
error. No binding contract will result from this e-mail until such time as a
written document is signed on behalf of the company. BlueFinger Limited
cannot accept responsibility for the completeness or accuracy of this
message as it has been transmitted over public networks.***

-----Original Message-----
From: Marius Oancea [mailto:mariuso@sec.co.ro]
Sent: 05 November 2003 14:10
To: users@cocoon.apache.org
Subject: HSSFSerializer too many styles


Hi,
    I created a application that takes a bean out of request and generate a
xls  (using gnumeric intermediate format) and a pdf (using xml:fo <xml:fo>
).
    
The generation of xls is very slow. If I drop all < gmr:StyleRegion
<gmr:StyleRegion>  startCol="0" startRow=.... from my xml, the generation is
about 9 time faster.

       I have a waning into core log :
          DEBUG   (2003-11-05) 12:14.17:502   [core.manager]
(/eptos/jsp/excel_pipe.jsp) T
hread-18/EPStyle: going out of the format kludger General
          very many times

          I tried to change Format="General" to other formats like : "0",
"@", .... but no result.
          If I change this to 0, the message changed to :
DEBUG   (2003-11-05) 12:14.17:502   [core.manager]
(/eptos/jsp/excel_pipe.jsp) T
hread-18/EPStyle: going out of the format kludger 0 
My styleRegions look like :
< gmr:StyleRegion <gmr:StyleRegion>  startCol="0" startRow="{count(
descendant::propertyBean <descendant::propertyBean> ) + 1}" endCol="10"
endRow="{count( descendant::propertyBean <descendant::propertyBean> ) + 1}">
				  < gmr:Style <gmr:Style>  HAlign="1"
VAlign="2" WrapText="0" Orient="1" Shade="0" Indent="0" Locked="1"
Hidden="0" Fore="0:0:0" Back= "FFFF:FFFF:FFFF" <FFFF:FFFF:FFFF>
PatternColor="0:0:0" Format="@">
				    
				      <gmr:StyleBorder> <gmr:StyleBorder>
				      < gmr:Top <gmr:Top>  Style="1"
Color="0:0:0"/>
				      < gmr:Bottom <gmr:Bottom>  Style="0"/>
				      < gmr:Left <gmr:Left>  Style="0"/>
				      < gmr:Right <gmr:Right>  Style="0"/>
				      < gmr:Diagonal <gmr:Diagonal>
Style="0"/>
				      < gmr:Rev-Diagonal <gmr:Rev-Diagonal>
Style="0"/>
				    </ gmr:StyleBorder <gmr:StyleBorder> >
				  </ gmr:Style <gmr:Style> >
				</ gmr:StyleRegion <gmr:StyleRegion> >
I have a lot of such regions because the client wants to have different
borders / fonts for every row in the sheet. (And I have a lot of rows).
Performance results: 1. without StyleRegions: 122 rows => 0.210 seconds 1417
rows => 11.97 seconds 2712 rows => 42.63 seconds 2. with StyleRegions: 122
rows => 2.544 seconds 1417 rows => 19.468 seconds 2712 rows => 4.26 minutes
and excel said "Too many different cell formats" and then "Excel encountered
an error and had to remove some formatting to avoid corrupting the workbook.
Please recheck your formatiing carefully." If I do the same tests by
generating pdfs (with styles and formatting): 122 rows => 1.722 seconds 1417
rows => 6.34 seconds (10 pages) 2712 rows => 25.2 seconds (38 pages) I tuned
up the cocoon as much as I could. Any ideea how to improove the performance?
Is there any other way to replace the Styles with other concepts (I need
borders and fonts / every cell). Thanx Marius -- "Why program by hand in
five days what you can spend five years of your life automating." - Terence
Parr 


Mime
View raw message