cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to Preserve Line Breaks in Table Cells when Importing from Excel

PD_10728150
3-Newcomer

How to Preserve Line Breaks in Table Cells when Importing from Excel

We have tables drafted in Excel 2016 that have line breaks within cells. When we paste these tables into Arbortext Editor (v8.1.1) the breaks are not retained. Is it possible to preserve line breaks when pasting a table from Excel? Thanks in advance.

ACCEPTED SOLUTION

Accepted Solutions

Now I see what you mean. When we started with editor we were warned that the table functionality was limited. I expect the only options are that you need to wrap them in elements in order to get the required output. The problem column has a new line processing instruction that looks like it is not being obeyed and the trouble shooting column has the text wrapped in two separate p elements.

 

bfriesen_0-1716314985601.png

 

 

Bryon

View solution in original post

6 REPLIES 6

Can you upload a sample excel file?

 

Bryon

Please see attached. Thank you.

bfriesen_0-1716305797377.png

This is what you are expecting it to look like in editor?

 

Bryon

No. 

 

The "Problem" and "Troubleshooting" columns have line breaks between sentences in Excel.

 

As seen in your screenshot, they are not being preserved once pasted in AT.

 

I'm wondering if this is even possible.

Now I see what you mean. When we started with editor we were warned that the table functionality was limited. I expect the only options are that you need to wrap them in elements in order to get the required output. The problem column has a new line processing instruction that looks like it is not being obeyed and the trouble shooting column has the text wrapped in two separate p elements.

 

bfriesen_0-1716314985601.png

 

 

Bryon

so the DTD we use does not allow for p elements in table cells. it doesn't however support a brk tag but in order to display as you'd expect a new paragraph to in the PDF we would need to mark it up as:

 

<brk>&nbsp;<brk>

 

this is not scalable as we have over a hundred of these instances in just one document so i think i'll have to write a script that replaces all new lines in tables with the markup above. since adding markup to it is what we'll have to do i''ve marked your answer as the solution.

 

i appreciate your time. 

 

thanks, Bryon!

Announcements

Top Tags