cancel
Showing results for 
Search instead for 
Did you mean: 

Some help editing word file content using javascript

franksant13
Champ in-the-making
Champ in-the-making

Hello, im trying to use javascript to edit some lines of content inside a word file. Im using ".content" to append some text.

But the result is a strange encoding of the file content. There is a way using javascript to append text in a word file, without damaging it.

Thanks

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

A Word file (docx) is a compressed archive (ZIP) of various XML files. There is no default API or means to edit a Word file via JavaScript. Even in Java it is not so simple - you need special libraries such as DOCX4J to deal with the internal structures and references of these XML files.