wordFile = confluence.get_page_as_word(page_id)f2 = open("file.docx", "wb")f2.write(wordFile)f2.close()
A file is written but it seems like the format is wrong. I can not open it in word or user further processing on it such as using python-docx.
To me it seems like the result is not really a zip file or docx in this case.
How do i save the result from confluence.get_page_as_word as a proper docx?
Hi Gunther (and other people who might have this issue):
It seems that `get_page_as_word` exports in the form of `doc` not `docx`.
You should be able to have a work around by changing your write line to:
f2 = open("file.doc", "wb")
It looks like you're new here. Sign in or register to get started.