Table borders when there should be none

Home Forums Open-Xml-PowerTools Table borders when there should be none

This topic contains 1 reply, has 1 voice, and was last updated by  fanpilot 5 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7615

    fanpilot
    Participant

    Good morning,

    I have a document with 2 tables, and converting them to HTML (so that I can then use another tool to convert to PDF).

    I was initially having problems with a sample piece of code, that was doing something strange to the document, but figured that bit out.

    However, converting docx to html is resulting in some of my borders appearing where there should be none (borders removed). This is not the case on every border, but it is definitely happening on the conversion from docx to html.

    Also, one of my borders that SHOULD be there, has been removed.

    Other info if it makes a difference, is that the document is being mailmerged (basically, I am programmatically populating mailmerge fields from a JSON source), though I run the raw document through (with the fields but no merging taking place) and this problem still exists.

    Any ideas where I can look?

    Thanks.

    #7617

    fanpilot
    Participant

    I have just figured out a part of the problem (the missing border where there should be one).

    Imagine a table like…

    
    <table>
    <tr>
    <td rowspan="2">double row text</td>
    <td rowspan="2">double row text</td>
    <td>single row - top</td>
    <td rowspan="2">double row text</td>
    <td>single row - top</td>
    </tr>
    <tr>
    <td>single row - bottom</td>
    <td>single row - bottom</td>
    </tr>
    </table>
    

    The two sets of single rows should combine as to cells (one below the other).

    In the transform to html from wml, it appears the 4th cell is not keeping the double row as it should… but is stealing the single row bottom that should be under the 5th cell. This is leaving me a blank area, which because I have further rows, looks like it is missing a border (which is not actually the case).

    I don’t know where to go from here to work this out. All help would be appreciated.

    Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.