Why am I getting this error when trying tocreate a table? #1120
wallacesigma
announced in
Q&A
Replies: 1 comment
-
I managed to solve this, the error was with the document that I was trying to update. The document was badly created in an eralier debug run and was never created correctly. This caused it to go ja wobble. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to create a Table in a Word Document using OpenXML in C#
The code I use to create the table is:
The result of the
Debug.Print(table.OuterXml)
is:Which looks ship-shape and Bristol fashion.
On the next line when I attempt to append the table to the document using
doc.MainDocumentPart.Document.Body.Append(table);
I get the following error:The error is strange. I get the Line 1 but where is position 3232? The XML above is a result of pasting the debug print into Notepad++ and choosing the Pretty Print function so can't be relied on for positions and lines. The linearized XML has only 1 line only 1219 positions. Does anyone know what's going on here?
Beta Was this translation helpful? Give feedback.
All reactions