InsertHtml - Table Border is not displayed

Hi,
I’m trying to insert table into word document using Document.InsertHtml(String) command (HTML String provided below). Everything is displayed correctly, except the table and cell borders are missing.

Word Version: 3.3.2.0

Thanks!

<table border="1" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td></td>
        <td width="60%" align="center" colspan="3">INDIVIDUAL</td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td align="center" width="11%" nowrap="true">Proposed Limits</td>
        <td align="center" width="11%" nowrap="true">Existing Limits</td>
        <td align="center" width="11%" nowrap="true">Exposure</td>
        <td></td>
    </tr>
    <tr>
        <td align="right" nowrap="true">Max Tenor (Years)</td>
        <td align="right">7.0</td>
        <td align="right">7.0</td>
        <td align="right">N/A</td>
        <td></td>
    </tr>
    <tr>
        <td align="right" nowrap="true">CE</td>
        <td align="right">N/A</td>
        <td align="right">N/A</td>
        <td align="right"></td>
        <td></td>
    </tr>
    <tr>
        <td align="right" nowrap="true">PE Up to 1 Year</td>
        <td align="right">350000</td>
        <td align="right">350000</td>
        <td align="right">11818.0</td>
        <td></td>
    </tr>
</table>

Import of table borders from HTML is not yet supported. We are working on this. There is an article in Aspose.Word Wiki with details of what exactly is supported during import/export if you need it.

Thanks for quick reply. Any estimate on when this would become available? We get our data in HTML format at runtime so this is an essential feature for us. Is there a work around?

Thanks.

Could you please give us an estimate on when this would become available? We have to get back to our clients with an estimate.

Thanks!

We hope sometime in January.

Is it possible for you guys to make this a priority? Our GoLive date is January 7th.

Any help/alternative ideas would be appreciated!

Thanks!

We are working on this feature as we speak and deliver when we can. We can’t take responsibility for making or breaking your deadline. Thanks for understanding.

Hi,
Could you please give me an update on this?

Thanks!

With Aspose.word v 3.3.5.0, HTML table borders display correctly when the border is set to “1”. Any other value does not display the border. Any idea?

Hi,

Does this apply to the HTML snippet you posted above? If no, please post the problematic HTML where table borders behave incorrectly.

It applies to both snippets (above as well as provided in this post).

<table border="1" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td>&nbsp;</td>
                    <td width="60%" align="center" colspan="3">INDIVIDUAL</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td align="center" width="11%" nowrap="true">Proposed Limits</td>
                    <td align="center" width="11%" nowrap="true">Existing Limits</td>
                    <td align="center" width="11%" nowrap="true">Exposure</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">Max Tenor (Years)</td>
                    <td align="right">7.0</td>
                    <td align="right">7.0</td>
                    <td align="right">N/A</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">CE</td>
                    <td align="right">N/A</td>
                    <td align="right">N/A</td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">PE Up to 1 Year</td>
                    <td align="right">350000</td>
                    <td align="right">350000</td>
                    <td align="right">35198.0</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">PE 1 to 5 Years</td>
                    <td align="right">75000</td>
                    <td align="right">75000</td>
                    <td align="right">2630.0</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">PE 5 to 10 Years</td>
                    <td align="right">30000</td>
                    <td align="right">30000</td>
                    <td align="right">3943.0</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">PE 10 to 20 Years</td>
                    <td align="right">0</td>
                    <td align="right">0</td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">PE Over 20 Years</td>
                    <td align="right">0</td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">Inventory</td>
                    <td align="right"></td>
                    <td align="right">500000</td>
                    <td align="right">0.0</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">CP Outstanding</td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">Fed Funds/Placements  6 months</td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">Primary Loans  Deposit &gt;= 6</td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">Asset-Based Lending</td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="true">Delivery/Settlement</td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td>&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
</table>

Strange, this works okay to me. Take a look at the attached doc; it is produced from the very first snippet with table border width set to 3. Are you getting another result?

Border = (any number greater than 0) seems to work however they all produce border size of 1. Also, setting border = 0 still throws an exception.

Please make sure you are indeed using version 3.3.5 or higher, or just download the latest version from the website. The point is that everything is handled correctly on my side: border widths are set properly and setting border=“0” works fine, simply outputting table with no borders.

Let me know if the problem persists.

I’m facing another problem with latest versions. Please take a look at following post. According to Aspose.PDF team this is a Aspose.word problem.