c# - How can I edit and save correct OpenXML docx file? -


i parse document.xml(change file.docx name file.docx.zip , uznip it) file manually , put code:

<w:r>       <w:t>new text</w:t>  </w:r> 

instead of

<w:r>       <w:t>text</w:t>  </w:r> 

and save zip-archieve(and change file.docx.zip name file.docx) , try open docx msword 2013. error word - incorrect document. how fix ? thank you.

why doing manually? used open xml sdk , worked smoothly.

you have access whole xml tree can change want, exception library takes care of zipping , unzipping.

the sdk has viewer can have better @ file, , i've found docx documents have internally multiple files zipped together. maybe missing 1 of them.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -