SharpDocx
SharpDocx copied to clipboard
Ambiguous cell mapping encountered. Possible missing paragraph element. <p> elements are required before every </tc>
Hi.
I am using this template:
<%foreach (var item in Model.Items){%>
// a table with rows and columns. Some rows contain nested tables as well.
<%}%>
which works fine if the data exists in the model. However, if the data doesn't exist in the mode, it would create an empty table and show the error in the title when opening using Word.
I tried adding spaces or line breaks but with no luck.
Can you help?
Thanks.
I have checked each field in the template and I found out that I had to manually add a new line at the end of each field (I basically pressed enter from the keyboard). This was also needed for nested tables.