Sorry for 3 messages in a row, but i made a mistake in the previous email

the fact is poi acts correctly.

it puts there a tag like
<t>
</t>

(the newline is there)

but excel cannot interpret it when there is no printable character there.
i guess the solution there would be to use that xml:space="*preserve*" in
this tag
--
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 11:46 AM, Guilherme Mussi <[email protected]> wrote:

> Complementing:
> The problem is when i use this command:
>
> richTextString.append("\n", font);
>
> in the sharedStrings.xml i will find this:
>
> <t />
>
> which excel doesn't know how to interpret
> any ideas to where i can fix this?
>
>
>
> --
> 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 11:40 AM, Guilherme Mussi <[email protected]>wrote:
>
>> Hi nick,
>>
>> the xml generated by poi with
>>
>> richTextString.append("my word", font);
>> richTextString.append(".\n-", font);
>> richTextString.append("new line", font);
>>
>> is:
>>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <rPr>
>>    <i val="*true*" />
>>    <sz val="*12.0*" />
>>    <rFont val="*Calibri*" />
>>   </rPr>
>>    <t>my word</t>
>>    </r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <rPr>
>>    <i val="*true*" />
>>    <sz val="*12.0*" />
>>    <rFont val="*Calibri*" />
>>   </rPr>
>>    <t>. -</t>
>>    </r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <rPr>
>>    <i val="*true*" />
>>    <sz val="*12.0*" />
>>    <rFont val="*Calibri*" />
>>   </rPr>
>>    <t>new line</t>
>>    </r>
>>
>> the xml generated by excel
>>
>> - <#128bb54801f73974_128bb4f4d3196134_> <r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <rPr>
>>    <i val="*true*" />
>>    <sz val="*12.0*" />
>>    <rFont val="*Calibri*" />
>>   </rPr>
>>      <t xml:space="*preserve*">my word</t>
>>    </r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <r>
>>  - <#128bb54801f73974_128bb4f4d3196134_> <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