importXHTML issue with tables (TableHelper.setupTblGrid)
![Post Post](https://www.docx4java.org/forums/styles/proFormell/imageset/icon_post_target.gif)
I recently encountered a problem with XHTML import. There was a table that was causing an ArrayIndexOutOfBoundsException exception in importXHTML, https://github.com/plutext/docx4j-ImportXHTML/blob/master/src/main/java/org/docx4j/convert/in/xhtml/TableHelper.java#L209.
There's a loop:
The table in question was:
Thank you.
There's a loop:
- Code: Select all
for (int i=1; i<=cssTable.numEffCols(); i++)
- Code: Select all
for (int i=0; i<cssTable.numEffCols(); i++)
The table in question was:
- Code: Select all
<div class="row section">
<div class="col-md-12">
<table>
<tbody>
<tr>
<td>
<table style="width: 100%; float: left;" cellspacing="0">
<tbody>
<tr>
<td style="width: 270px; text-align: left; vertical-align: top;">
<span style="color: #993300; font-size: 10pt;">
<strong>
<span style="font-size: 12pt;">
Title1
</span>
</strong>
</span>
Text1.
</td>
<td style="width: 270px; text-align: left; vertical-align: top;">
<strong>
Text2:
</strong>
<ul>
<li>Item1 </li>
<li>Item2 </li>
<li>Item3 </li>
<li>Item4 </li>
<li>Item5 </li>
</ul>
</td>
</tr>
</tbody>
</table>
<strong>
Text3
</strong>
<ol>
<li>Text4 </li>
</ol>
__________________________________________________________________________________________________________
</td>
</tr>
</tbody>
</table>
</div>
</div>
Thank you.