OpenXML Nested Tables
I try to insert a table in TableCell, but when I try to open it in MS Word, I get a message like " a <p> is required before a </tc> ".
When I open the file in compatibility mode, the formatting of the table looks perfect, but the table rows are missing. Inserting plain text into a cell works fine, the problem occurs when I try to insert a whole table.
Inserting a table into a document outside of another table also works great.
If you create a nested table structure in Word and look at the resulting XML, you will see something like:
<w:tc> <w:tcPr> <w:tcW w:w="4621" w:type="dxa"/> </w:tcPr> <w:tbl>..</w:tbl> <w:p/> </w:tc> According to the post, it looks like you need <w: p / "> after your table and before the closing tc tag.