.docx, plus its PDF. You don’t write code for paragraphs, styles or tables: you describe the
look in one sentence (style) and it is applied to Word’s styles, so the file stays editable.
The problem in practice
- Every heading, list and table is code: adding a new section means changing the program.
.docxtemplates have to be designed, versioned and kept in sync with their placeholders.- When formatting is applied paragraph by paragraph, the document looks right but is hard to edit later in Word.
- Tables that overflow the page or headings stranded at the bottom of a page only show up when you open the file.
The solution with Doconda
prompt="Residential lease agreement for €900 a month".
What you get back
- The
.docxand its PDF (doconda.documents.download(doc["id"], "pdf")). status:ready,ready_with_warnings,needs_revieworfailed(not charged).style_unsupported: what you asked for instylethat could not be applied. Never silently ignored.- A report (
documents.report(id)) with anything worth checking.
FAQ
How do I create a Word document in Python without a template?
How do I create a Word document in Python without a template?
Install the SDK (
pip install doconda) and call documents.create with format="docx" and your Markdown in
content. The look goes in style, in plain language. No template file is needed.Can the generated Word file be edited afterwards?
Can the generated Word file be edited afterwards?
Yes. Style is applied to Word’s styles (Normal, Heading 1…), not paragraph by paragraph. Change a style in Word
and the whole document follows.
Can I convert Markdown to docx with tables and lists?
Can I convert Markdown to docx with tables and lists?
Yes. The Markdown supports headings, paragraphs, lists, tables, bold and italics, links, page breaks and images.
The text is used as is.
Keep reading
- Create: every creation option.
- Review: fix a Word file you already have.
- Python SDK and TypeScript SDK.
- Examples on GitHub.