You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Christian Peter <ch...@charlysworld.de> on 2003/01/14 09:56:48 UTC
Multiline rows
Hi,
I'm new to POI and I read the docs and the mailing archive.
But I didn't find a solution for my problem (I probably missed
something really obvious).
I need multiline cells in my Excel Sheet. Therefore I
used the
cellStyle.setWrapText( true );
method to make it multiline. I thought I could control
where the new line begins (\n). But my Excel 2000 does not
only break the line when a \n is in the string, it also
breaks when the text reaches the cell border.
It looks like
----------------
|First line is |
|veeeeeery long |
|Second line |
----------------
but I need
----------------
|First line is ve|
|Second line |
----------------
Any ideas?
Thanks in advance!
--
Christian Peter <ch...@charlysworld.de>
Re: Multiline rows
Posted by Christian Peter <ch...@charlysworld.de>.
Hi,
according to
http://jakarta.apache.org/poi/hssf/quick-guide.html#NewLinesInCells
one should set setWrapText(true) for using newlines. No one mentions
writing multiple lines without setWrapText(true). I tried it without
setWrapText(true) but it never worked. OpenOffice works but not Excel.
Am Die, 2003-01-14 um 11.45 schrieb Avik Sengupta:
> I thought cellStyle.setWrapText( true ) was MEANT to wrap at word
> boundaries??
>
> Maybe you should try setWrapText (false) and increase cell height, and
> then use new lines in text? just an idea?
>
> On Tue, 2003-01-14 at 14:26, Christian Peter wrote:
> > Hi,
> >
> > I'm new to POI and I read the docs and the mailing archive.
> > But I didn't find a solution for my problem (I probably missed
> > something really obvious).
> >
> > I need multiline cells in my Excel Sheet. Therefore I
> > used the
> >
> > cellStyle.setWrapText( true );
> >
> > method to make it multiline. I thought I could control
> > where the new line begins (\n). But my Excel 2000 does not
> > only break the line when a \n is in the string, it also
> > breaks when the text reaches the cell border.
> >
> > It looks like
> >
> > ----------------
> > |First line is |
> > |veeeeeery long |
> > |Second line |
> > ----------------
> >
> > but I need
> >
> > ----------------
> > |First line is ve|
> > |Second line |
> > ----------------
> >
> > Any ideas?
> > Thanks in advance!
> >
> >
> > --
> > Christian Peter <ch...@charlysworld.de>
> >
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Christian Peter <ch...@charlysworld.de>
Re: Multiline rows
Posted by Avik Sengupta <av...@apache.org>.
I thought cellStyle.setWrapText( true ) was MEANT to wrap at word
boundaries??
Maybe you should try setWrapText (false) and increase cell height, and
then use new lines in text? just an idea?
On Tue, 2003-01-14 at 14:26, Christian Peter wrote:
> Hi,
>
> I'm new to POI and I read the docs and the mailing archive.
> But I didn't find a solution for my problem (I probably missed
> something really obvious).
>
> I need multiline cells in my Excel Sheet. Therefore I
> used the
>
> cellStyle.setWrapText( true );
>
> method to make it multiline. I thought I could control
> where the new line begins (\n). But my Excel 2000 does not
> only break the line when a \n is in the string, it also
> breaks when the text reaches the cell border.
>
> It looks like
>
> ----------------
> |First line is |
> |veeeeeery long |
> |Second line |
> ----------------
>
> but I need
>
> ----------------
> |First line is ve|
> |Second line |
> ----------------
>
> Any ideas?
> Thanks in advance!
>
>
> --
> Christian Peter <ch...@charlysworld.de>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>