Yeap.
I solved this problem:

private String removeEscapes(String str)
    {
        String aux = StringEscapeUtils.escapeJava((str));
         //remove tabs
        aux = StringUtils.replace(StringUtils.trimAllWhitespace(aux), "\\t",
" ");
         //remove the return, only newline valid in excel
        aux = StringUtils.replace(StringUtils.trimAllWhitespace(aux), "\\r",
" ");
         //unescape so that \n gets back to newline
        aux = StringEscapeUtils.unescapeJava(aux);

    return aux;
    }
Excel didn´t understand \r\n.
I use StringUtils from: org.springframework.util.StringUtils


On Thu, Apr 24, 2008 at 3:00 PM, <[EMAIL PROTECTED]> wrote:

> Just add \n don't have \r
> Sent via BlackBerry by AT&T
>
> -----Original Message-----
> From: ramilani12 <[EMAIL PROTECTED]>
>
> Date: Thu, 24 Apr 2008 14:58:12
> To:"POI Users List" <[email protected]>
> Subject: Wrap Text From HTML
>
>
> Hello Folks
>
> How POI understand this scapes: \r\n when I put in cell?.
> Because I have one TextArea in my page JSP, if user pressed key ENTER in
> textarea , textarea put this scapes \r\n
>
> For example :
> Value TextArea:
>
> Abcbbcbcbcccbb\r\n <- pressed key ENTER
> Ahsajdhasjdhasj\r\n <- pressed key ENTER
>
> When I create sheet from POI in my cell will show:
>
> Abcbbcbcbcccbb⌂
> Ahsajdhasjdhasj⌂
>
> I think Excel didin´t understand this scapes \r\n.
> --
> raphael milani
> :=]
>



-- 
raphael milani
:=]

Reply via email to