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")
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.