You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Oliver Hirschi <oh...@pm-medici.ch> on 2005/01/10 15:36:10 UTC
newline in an excel cell
Hi,
I have a problem with newlines in a excel-cell. the excel is generates
with apache POI HSSF.
I tried several things:
1. cell.setCellValue("First Line\nSecondLine");
2. cell.setCellValue("First Line\rSecondLine");
3. cell.setCellValue("First Line\r\nSecondLine");
If I take variant 1, after opening the genearted xls with excel, the
newlines are shown as squares. After double-clicking onto the cell, the
newlines are okay.
How can I make correct newlines with poi, that are shown correct by
opening the file with excel?
Thanks!
--
Oliver Hirschi
http://www.FamilyHirschi.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
AW: newline in an excel cell
Posted by "KHZ (SAW)" <ka...@sawag.com>.
Hi Oliver.
Last March there was the topic "POI line feed/Carriage Return Problem"
where a lot was discussed about this. Look there.
I don't remember the result ad hoc but I hope this is a good pointer.
Regards, Karl-Heinz.
-----Ursprüngliche Nachricht-----
Von: news [mailto:news@sea.gmane.org] Im Auftrag von Oliver Hirschi
Gesendet: Montag, 10. Januar 2005 15:36
An: poi-user@jakarta.apache.org
Betreff: newline in an excel cell
Hi,
I have a problem with newlines in a excel-cell. the excel is generates
with apache POI HSSF.
I tried several things:
1. cell.setCellValue("First Line\nSecondLine");
2. cell.setCellValue("First Line\rSecondLine");
3. cell.setCellValue("First Line\r\nSecondLine");
If I take variant 1, after opening the genearted xls with excel, the
newlines are shown as squares. After double-clicking onto the cell, the
newlines are okay.
How can I make correct newlines with poi, that are shown correct by
opening the file with excel?
Thanks!
--
Oliver Hirschi
http://www.FamilyHirschi.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/