This project has moved. For the latest updates, please go here.

Table

Styles defined in the <table> tag are applied inside the table’s elements.
Defined width attributes in table is applied in the open xml document.
No border attribute or a border="0" will hide the border on the word document.

Rowspan and columnspan are supported.

<table width="50%" align="center" border="1">
    <tr>
        <td rowspan="2">Anime Studio</td>
        <td>Pixar</td>
    </tr>
    <tr>
        <td>Studio Ghibli</td>
    </tr>
</table>

<table width="100%" border="1">
    <tr style="font-weight: bold">
        <td>Studio</td>
        <td colspan="2">Animes</td>
    </tr>
    <tr>
        <td>Pixar</td>
        <td>The incredibles</td>
        <td>Ratatouille</td>
    </tr>
    <tr>
        <td>Studio Ghibli</td>
        <td>Grave of the Fireflies</td>
        <td>Spirited Away</td>
    </tr>
</table>

rowcolspan.png

Vertical text is supported

<table width="50%" align="center" border="1">
    <tr>
        <td rowspan="2" style="*writing-mode: tb-lr;*">Anime Studio</td>
        <td>Pixar</td>
    </tr>
    <tr>
        <td>Studio Ghibli</td>
    </tr>
</table>

verticaltext.png

Nested table

<table width="100%" cellspacing="2" border="1">
<tr>
    <td><b>The containing table</b>
        <table width="60%" cellspacing="2" cellpadding="2" align="left" border="1">
            <tr>
                <td>A nested table</td>
            </tr>
        </table>
    </td>
</tr>
</table>

nested.png

Complex - ColSpan and RowSpan on the same cell

<table border="1">
    <tr>
        <th>Cell 1</th>
        <th colspan="2" rowspan="2">Value 1</th>
    </tr>
    <tr>
        <td>Cell 1</td>
    </tr>
    <tr>
        <td>Cell 2</td>
        <td>Value 2</td>
        <td>Vaulue 3</td>
    </tr>
</table>

complex.png

Last edited Dec 18, 2015 at 2:51 PM by onizet, version 8