Hi nick,

the xml generated by poi with

richTextString.append("my word", font);
richTextString.append(".\n-", font);
richTextString.append("new line", font);

is:

 - <#> <r>
 - <#> <rPr>
   <i val="*true*" />
   <sz val="*12.0*" />
   <rFont val="*Calibri*" />
  </rPr>
   <t>my word</t>
   </r>
 - <#> <r>
 - <#> <rPr>
   <i val="*true*" />
   <sz val="*12.0*" />
   <rFont val="*Calibri*" />
  </rPr>
   <t>. -</t>
   </r>
 - <#> <r>
 - <#> <rPr>
   <i val="*true*" />
   <sz val="*12.0*" />
   <rFont val="*Calibri*" />
  </rPr>
   <t>new line</t>
   </r>

the xml generated by excel

- <#> <r>
 - <#> <rPr>
   <i val="*true*" />
   <sz val="*12.0*" />
   <rFont val="*Calibri*" />
  </rPr>
     <t xml:space="*preserve*">my word</t>
   </r>
 - <#> <r>
 - <#> <rPr>
   <i val="*true*" />
   <sz val="*12.0*" />
   <rFont val="*Calibri*" />
  </rPr>
   <t>new line</t>
   </r>

do you know what i can do with this? is it possible to fix it somehow?

Regards,


--
Guilherme Petterle Silveira Mussi

Conrad Caine Media Applications GmbH

Mobile: +55 53 91257012
Office: +55 53 30275721

"Any fool can know. The point is to understand." - Albert Einstein


On Fri, May 21, 2010 at 10:34 AM, Nick Burch <[email protected]>wrote:

> On Fri, 21 May 2010, Guilherme Mussi wrote:
>
>> I am making a tool to translate html to a XSSFRichTextString
>>
>> When i find a br tag, i'm simply appending a \n character, like this:
>>
>> richTextString.append("\n", font);
>>
>> Unfortunately, if i do this, the .xslx file gets damaged and doesn't open
>> correctly (excel always offers to repair it)
>>
>
> I'd suggest you try creating the same file in excel. Then, unzip the .xlsx
> file (it's basically a zip file of xml files), and look at the shared
> strings table (where most cell string contents go). See what excel did there
> instead, then try doing the same
>
> Nick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to