In case anyone is interested, I found the cause of this problem in EPStyleRegion.java
(attached). Here is the relevant code:
//kludge constant to fix gnumeric's love of declaring large stlye regions
//for the blank sections of the sheet w/no apparent purpose that we can
//
private int MAX_AREA = 2001;
{...}
if(region.getArea() < MAX_AREA) { //protect against stupid mega regions
//of generally NOTHING and no real
//puprose created by gnumer
// getLogger().debug("region added");
System.out.println("region added");
_style = getSheet().addStyleRegion(region); //test
} else {
invalid = true;
}
I changed the MAX_AREA constant to 65536 so that it could handle one entire column. I
saved the Excel file using both MAX_AREAs and at least for my app there was no
appreciable difference in file size (765k v. 766k). Does anyone know what these "mega
style regions" are? Is this something specified in the .gmr file, IE - created by the
user, or is it something done automatically by gnumeric?
thx
Matt
> -----Original Message-----
> From: Savino, Matt C
> Sent: Tuesday, December 09, 2003 6:02 PM
> To: [EMAIL PROTECTED]
> Subject: Very strange issue w/HSSF serializer
>
>
> It seems that my date formatted style regions stop creating
> style at 2000 rows. As long as my spreasheet is 2001 rows or
> less (I have one header row), my dates are nicely formatted,
> but if they go over that, I see the raw number
> (32334.344233...). Has anyone else seen this problem? Is this
> some weird Excel limitation?
>
> I have attached the xslt stylesheet I use to create the .gmr
> file. The problem is in the gmr:StyleRegion element below. If
> I set the spread between the startRow and endRow to 2000 or
> less, those cells get converted to dates, regardless of where
> they are in the column. But if I try to make the region any
> bigger than 2000 rows, none of the cells in the column show
> up as dates.
>
> <<qb_XmlToXls.xsl>>
>
> <!-- date columns -->
> <xsl:for-each select="ColumnName//Label">
> <xsl:if test="@dataType = 'date'">
>
> <gmr:StyleRegion startCol="{position()-1}"
> endCol="{position()-1}" startRow="1" endRow="2001">
> <gmr:Style HAlign="1" VAlign="4" WrapText="0"
> Orient="1" Shade="0" Indent="0"
> Locked="0" Hidden="0" Fore="0:0:0"
> Back="FFFF:FFFF:FFFF" PatternColor="0:0:0" Format="d-mmm-yy">
> <gmr:Font Unit="10" Bold="1" Italic="0"
> Underline="0" StrikeThrough="0">Helvetica</gmr:Font>
> <gmr:StyleBorder>
> <gmr:Top Style="0"/>
> <gmr:Bottom Style="0"/>
> <gmr:Left Style="0"/>
> <gmr:Right Style="0"/>
> <gmr:Diagonal Style="0"/>
> <gmr:Rev-Diagonal Style="0"/>
> </gmr:StyleBorder>
> </gmr:Style>
> </gmr:StyleRegion>
>
> </xsl:if>
> </xsl:for-each>
>
>
> I can go into more depth but I figure if someone else has run
> into this, they should knwo the answer right off.
>
>
> thx a lot
>
> Matt Savino
>
> Senior Web Developer
> Quest Diagnostics Inc.
> 33608 Ortega Hwy - Bldg C
> San Juan Capistrano, CA 92690
> 949.728.4832
> cel - 310-344-0889
> Balboa # - 818-895-6868
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]