I am converting a HTML file to OpenXML format using NotesForHtmlToOpenXML (http://notesforhtml2openxml.codeplex.com)
When I convert the above table’s HTML to docx format, the output is given below.
Given below is the HTML code of the original table.
<table id="tbl-pg-2-13-5" class="table-main" border="1" cellspacing="1" cellpadding="1">
<tbody>
<tr id="pg-2-14">
<td id="pg-2-15" class="table-td" valign="top" rowspan="2" colspan="2">
</td>
<td id="pg-2-16" class="table-td" valign="top" colspan="2">
<p id="pg-2-17" class="table-textstyle2">
<i>Consideration of use</i>
</p>
</td>
</tr>
<tr id="pg-2-19">
<td id="pg-2-20" class="table-td" valign="top">
<p id="pg-2-21" class="table-textstyle2">
<i>Low</i>
</p>
</td>
<td id="pg-2-23" class="table-td" valign="top">
<p id="pg-2-24" class="table-textstyle2">
<i>High</i>
</p>
</td>
</tr>
<tr id="pg-2-26">
<td id="pg-2-27" class="table-td" rowspan="2" valign="top">
<p id="pg-2-28" class="table-textstyle2">
<i>Quest for fundamental understanding</i>
</p>
</td>
<td id="pg-2-30" class="table-td" valign="top">
<p id="pg-2-31" class="table-textstyle2">
<i>High</i>
</p>
</td>
<td id="pg-2-33" class="table-td" valign="top">
<p id="pg-2-61" class="table-textstyle0">
1. Pure basic research (Bohr)
</p>
</td>
<td id="pg-2-38" class="table-td" valign="top">
<p id="pg-2-62" class="table-textstyle0">
2. Use-inspired basic research (Pasteur)
</p>
</td>
</tr>
<tr id="pg-2-45">
<td id="pg-2-46" class="table-td" valign="top">
<p id="pg-2-47" class="table-textstyle2">
<i>Low</i> 
</p>
</td>
<td id="pg-2-49" class="table-td" valign="top">
<p id="pg-2-63" class="table-textstyle0">
3.
</p>
</td>
<td id="pg-2-52" class="table-td" valign="top">
<p id="pg-2-64" class="table-textstyle0">
4. Pure applied research (Edison)
</p>
</td>
</tr>
</tbody>
</table>
Please provide solution to convert the above HTML to OpenXML correctly.
I was able to import using code(AltChunk & AlternateFormatImportPart) displayed below. Here finalDocument is of type WordprocessingDocument.
“”;