Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi,
I want to export items into a table (MS Word), where each item is one table row. The problem is, that there remains an empty line between the rows, which has to be deleted manually. We are using ILM 11.2.
The release notes of ILM 11.0 says, that following issue was solved:
HF-S150000000-016 CS241475 A line break is inserted between table headings and table content when a document is xported from Gateway to MS Word.
According to CS243266 I am using the following property:
<property name="ensureLineBeforeAndAfterTable">false</property>
Since it is necessary to put the gateway commands between the rows, I need to split the table in the export template:
ID |
Revision |
Category |
Assigned User |
<%beginContent%>
<%beginLevel%>
<%{ID}%> |
<%{Revision}%> |
<%{Category}%> |
<%{Assigned User}%> |
<%endLevel%>
<%endContent%>
The result looks like this:
ID |
Revision |
Category |
Assigned User |
9345 |
0.1 |
SW Specification |
John Doe |
9374 |
0.3 |
SW Specification |
John Doe |
When empty lines are deleted manually Word puts them together as one single table. Is it somehow possible to avoid those empty lines??
Thanks!
This is a very well known feature 🙂
Usually its caused by different formatting in your table definition.
To solve it, select all elements in Word and press Ctrl+Blank. This will reset any selected text and the table to the "Normal" style. Finally, the "empty" lines are gone.
Hi, unfortunately it didn't help in my case. I tried what you suggested. I even started with a new empty Word template (using Word 2013). The best I can get now is this:
ID |
Revision |
Category |
Assigned User |
9345 |
0.1 |
SW Specification |
John Doe |
9374 |
0.3 |
SW Specification |
John Doe |
So no empty line between table head and the first row. But between the content rows the empty line remains. Any other ideas what to do or why this happens? Do you have a working Word template that you can provide, so that I can try it out on my PC?
Have you tried this (in addition to different formatting bug)?
<%beginContent%><%beginLevel%>
<%{ID}%> |
<%{Revision}%> |
<%{Category}%> |
<%{Assigned User}%> |
<%endLevel%><%endContent%>
Yes I did. I didn't helped unfortunately. Thanks!
Hello @nxpet,
I suspect what is happening is that the content chunks are their own tables, and so it's not rolling up nicely. It might work if you remove all of the line feeds between your table elements, so the <%MKS Tags%> are in line with the table elements, but I'm really not confident of that.
If that doesn't work, then at this point, I'd suggest opening a case with PTC Integrity Lifecycle Manager Technical Support. I suspect this will get filed as a defect (SPR).
Kind Regards,
Kael Lizak
Senior Technical Support Engineer
Integrity Lifecycle Manager
PTC
Hi Kael,
I was trying to put the tags in line with the table, but since it is a 100% width table, it was not possible in Word.
I was heavily testing when this behaviour starts. What I learned now, that it is not due to the table. It also happens without tables. I was also testing together with Volker Eckhardt. He suggested to colorize the commands, to see which line causes the behaviour. The result was, that the empty lines are due to some "tag-only-line". According to Volker they should be deleted by the gateway, but they are not in my case.
I started to build up a new template, where I deleted all formatting etc. It is not reproducable when this starts to happen. Sometimes I just change the formatting (like font size or color) and empty lines are inserted. Sometimes I just copy a line (without that problem) again into the template and the behaviour starts. I can not find a rule behind that.
I managed to build a template where there is no line between the table rows. But it was really annoying, because I had to check every change I made. And I needed to redo it often, because I often had these empty lines. Then I switched back to the last working template.
I am using a company template. I first thought, that the behaviour is caused by that. But even when I use the standard Word (2013) template, I do have the same behaviour. Volker suggested to start with the original MKS template, but that would mean really lots of work for me to rebuild our company template.
I really do not have any ideas now...
Regards, Timo (nxpet)
Hi @nxpet,
I discussed this with @VolkerEckardt offline. It sounds like you're getting problems on your system that he's not getting on his, which is odd, and not something I've seen before.
If I had this as a case, I'd probably want the exact version of MS Word you're using to make your export templates. It's possible there's some minor difference in the generated XML that's causing a difference in behavior.
-Kael
Hi @KaelLizak, thanks for your response. That's a good idea. At work I am using Word 2013. I could try to use my Word 2016, which I have at home. Maybe that makes a difference.
@VolkerEckardt: which Word version do you have?
I am using Word 2016
Hi @nxpet,
It worked in my machine too perfectly and the way exactly output should. Looks like Word version issue as of now i am also using Word 16 , May be you can give a try..
Regards,
Kapil
We have a pretty complicated export that we do to Word that involves a custom post processor that we've created. We run into the same issue where we make an insignificant change to the template but it completely breaks the export. It ends up being due to Word adding something to the XML that's not necessarily visible in Word itself. One trick I use is unzipping the docx file and then opening up the document.xml file to search for any strange formatting that shouldn't be there. We also have templates we use that kick out individual table rows that Word will merge upon opening it.
I often have to go to the XML directly to clean up templates. After you've done it a few times it gets pretty straight forward. Not sure if this will help you or not but I figured I'd post this just in case since it sounds like you're running into the same issues as us.
Hi @nborrerojr.: Thanks for your hint. I compared the XML of a working template with one version that doesn't (I just changed the color of a "command-only" line). At the first glance I couldn't find anything, that causes the behaviour. But I am not quite sure, since I am not familiar with this Word XML.
Anyway, I think I found out, that the Word 2013 causes the behaviour. Yesterday I had the chance to test at home with my Word 2016. I took a template, that had those problems and opened it in Word 2016. First I went back to the normal formatting styles by using "ctrl + space". Then I reformatted everything and I also applied coloring to the "command-only" lines. This only resulted usually before in empty lines. The result was as expected, there were no unwanted (=colored) empty lines anymore.
I did two quick check with two templates with Word 2016. Both worked well without empty lines. So from this first quick test it seems, that Word 2013 caused this behaviour. I will ask company IT for the Word 2016 version and will do more testing afterwards. But for now I think this solves my problem.