Am 27.08.13 22:45, schrieb [email protected]:
Writing text to a word document (word 2007) using the zipfile module
via python coding (python 2.7). Below if the section of code I am
using to do this. I can't figure out what character I need to use to
get it to add new lines to the zipfile.
Word files (2007) are zipped-up XML files. In XML, whitespace is
ignored, so probably you need some special tag (like <br/> in XHTML) to
insert the line break.
The easiest way to find this out - short of reading the specs - is to
open the file in Word, add a line break, save it and then run a diff
tool over the output and the original file.
If you want to go the specs route instead, you can start here:
http://en.wikipedia.org/wiki/Office_Open_XML
Christian
--
http://mail.python.org/mailman/listinfo/python-list