You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Florian Leinberger <le...@seitenbau.com> on 2005/07/12 17:20:02 UTC
Problems wirh HSSF/XLS-Serializer(Styles)
Hi,
I am using the Excel-Serializer which works well for me in general. But there
are two problems concerning Styles:
- if I use a value smaller than 125 for gmr:StyleRegion/@endRow I get a Java
Nullpointer Exception ?!
<gmr:StyleRegion startRow="0" endRow="125" startCol="0" endCol="15">
- The Styles I define are completely ignored. The Excel-Sheet is generated with
all values, but the cells are not formated at all.
I am using Cocoon 2.16.
I would appreciate any hints or samples for working Worksheets that include
formatting of cells.
Thank you in advance, Florian
My Code:
....
<gmr:Cells>
<!-- Titel des Sheets -->
<gmr:Cell Row="1" Col="1" ValueType="60" Style="0">
<xsl:text>Dynamisch generierte Mitarbeiterliste aus
OfficeNet</xsl:text>
</gmr:Cell>
<!-- Spaltentitel -->
<gmr:Cell Row="3" Col="1" ValueType="60">
<xsl:text>ID</xsl:text>
</gmr:Cell>
<gmr:Cell Row="3" Col="2" ValueType="60">
<xsl:text>Name</xsl:text>
</gmr:Cell>
<gmr:Cell Row="3" Col="3" ValueType="60">
<xsl:text>Vorname</xsl:text>
</gmr:Cell>
<gmr:Cell Row="3" Col="4" ValueType="60">
<xsl:text>Telefon</xsl:text>
</gmr:Cell>
<gmr:Cell Row="3" Col="5" ValueType="60">
<xsl:text>E-Mail</xsl:text>
</gmr:Cell>
<!-- Die einzelnen Mitarbeitereinträge -->
<xsl:apply-templates select="mitarbeiter"/>
</gmr:Cells>
<!-- Die Styles funktionieren aus irgendeinem Grund nicht richtig -->
<gmr:Styles>
<gmr:StyleRegion startRow="0" endRow="125" startCol="0" endCol="15">
<gmr:Style HAlign="2" VAlign="2" WrapText="0" Orient="1"
Shade="2" Indent="3" Locked="1" Hidden="0" Fore="0:0:0" Back="FFFF:FFFF:FFFF"
PatternColor="0:0:0">
</gmr:Style>
</gmr:StyleRegion>
</gmr:Styles>
</gmr:Sheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problems wirh HSSF/XLS-Serializer(Styles)
Posted by Florian Leinberger <le...@seitenbau.com>.
Joerg Heinicke <joerg.heinicke <at> gmx.de> writes:
>
> The HSSF/XLSSerializer does not support that much functionality, but it
> supports at least some stylings. If you have a look into the samples
> delivered with Cocoon you can see samples for formatting dates and for
> alignment. For the NPE I don't know, I never came across it. And I guess
> the samples use the feature (i.e. numbers < 125) too.
Thanks for the advice, I could have come up with the idea to look at the
examples by myself ;-) No it works fine, I probably had some minor error in the
syntax of my XSL-Sheet.
Gruss, Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problems wirh HSSF/XLS-Serializer(Styles)
Posted by Joerg Heinicke <jo...@gmx.de>.
The HSSF/XLSSerializer does not support that much functionality, but it
supports at least some stylings. If you have a look into the samples
delivered with Cocoon you can see samples for formatting dates and for
alignment. For the NPE I don't know, I never came across it. And I guess
the samples use the feature (i.e. numbers < 125) too.
Joerg
On 12.07.2005 17:20, Florian Leinberger wrote:
> Hi,
>
> I am using the Excel-Serializer which works well for me in general. But there
> are two problems concerning Styles:
>
> - if I use a value smaller than 125 for gmr:StyleRegion/@endRow I get a Java
> Nullpointer Exception ?!
> <gmr:StyleRegion startRow="0" endRow="125" startCol="0" endCol="15">
>
> - The Styles I define are completely ignored. The Excel-Sheet is generated with
> all values, but the cells are not formated at all.
>
> I am using Cocoon 2.16.
>
> I would appreciate any hints or samples for working Worksheets that include
> formatting of cells.
>
> Thank you in advance, Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org