Categories > OpenTBS with ODS >

Line breaks in spreadsheet cells--how to code on server side?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Ken Tanzer
Date: 2013-11-23
Time: 07:26

Line breaks in spreadsheet cells--how to code on server side?

Hi.  I have labels that I'm merging into cells of an ods spreadsheet.  What value or tag can I supply in my source arrays that will result in line breaks in my text?  And is it different for odt or MS Office templates?  Thanks.

Ken
By: Skrol29
Date: 2013-11-23
Time: 15:49

Re: Line breaks in spreadsheet cells--how to code on server side?

Its is different.
ODT accepts the line break (<text:line-break/>) inside a paragraph, while ODS uses a paragraph for the text in a cell but doesn't accepts the line break.

The workaround is to replace the line-break in your data with a "paragraph break" : </text:p><text:p>

XSLX accepts natural line breaks.
By: Ken Tanzer
Date: 2013-11-24
Time: 23:04

Re: Line breaks in spreadsheet cells--how to code on server side?

When I try that, the tags don't seem to be interpreted, and just end up as text in my label cell.

For example, I'm aiming for a label that says:
staff
email

But I get this as my text, all on one line:

staff</text:p><text:p>email

By: Ken Tanzer
Date: 2013-11-27
Time: 20:04

Re: Line breaks in spreadsheet cells--how to code on server side?

Is there a solution to this, or some step I'm missing?

By: Francisco Agut
Date: 2013-11-27
Time: 23:28

Re: Line breaks in spreadsheet cells--how to code on server side?

It works with ods files if the cell variable is declared with "strconv=no" param. Example:
[a.testField;strconv=no]
then you can send strings to the template as you mentioned  ( staff</text:p><text:p>email )

Also, you can format cells with "Wrap text automatically" (https://help.libreoffice.org/Common/Inserting_Line_Breaks_in_Cells)
By: Ken Tanzer
Date: 2013-11-28
Time: 09:11

Re: Line breaks in spreadsheet cells--how to code on server side?

Is there a solution to this, or some step I'm missing?

By: Ken Tanzer
Date: 2013-11-28
Time: 09:12

Re: Line breaks in spreadsheet cells--how to code on server side?

Sorry--I reloaded the page and it posted my question again.  I haven't tried it yet, but thanks in advance for the info!
By: Skrol29
Date: 2013-12-13
Time: 02:32

Re: Line breaks in spreadsheet cells--how to code on server side?

Hi, did you solve your problem ?