Quantcast
Viewing all articles
Browse latest Browse all 228

New Post: Borders not appearing in table

Hi,

I have an html table as part of a larger document which I am trying to convert to OpenXml.

When viewed as html, the table appears as it should with the borders all in the correct places, but after converting to OpenXml, when I view the resulting file in Word, none of the borders are visible.

A sample of the code for the table is given below (the real one has a lot more rows).
Does anyone have any idea why the borders wouldn't be appearing when it is viewed in Word?

Thank you in advance.
<table style="border-collapse: collapse;">
    <tr>
        <td style="font-weight: bold; padding: 10px;">
            Heading 1a
        </td>
        <td style="font-weight: bold; padding: 10px;">
            Heading 1b
        </td>
        <td style="font-weight: bold; padding: 10px; border-left: 1px solid #000000;">
            Heading 2a
        </td>
        <td style="font-weight: bold; padding: 10px;">
            Heading 2b
        </td>
    </tr>
    <tr>
        <td style="font-weight: bold; padding: 10px; border-top: 1px solid #000000;">
            Value 1a
        </td>
        <td style="font-weight: bold; padding: 10px; border-top: 1px solid #000000;">
            Value 1b
        </td>
        <td style="font-weight: bold; padding: 10px; border-top: 1px solid #000000; border-left: 1px solid #000000;">
            Value 2a
        </td>
        <td style="font-weight: bold; padding: 10px; border-top: 1px solid #000000;">
            Value 2b
        </td>
    </tr>
</table>

Viewing all articles
Browse latest Browse all 228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>