GitHub - python-openxml/python-docx: Create and modify Word documents with Python (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
Explore - Why GitHub
- All features
- Documentation
- GitHub Skills
- Blog
- By company size
- Topics
- Pricing
Provide feedback
We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Saved searches
Use saved searches to filter your results more quickly
python-openxml / python-docx Public
- Notifications You must be signed in to change notification settings
- Fork1.2k
- Star 5k
Create and modify Word documents with Python
License
5k stars 1.2k forks Branches Tags Activity
Notifications You must be signed in to change notification settings
Additional navigation options
Folders and files
Repository files navigation
python-docx
python-docx is a Python library for reading, creating, and updating Microsoft Word 2007+ (.docx) files.
Installation
pip install python-docx
Example
from docx import Document
document = Document() document.add_paragraph("It was a dark and stormy night.") <docx.text.paragraph.Paragraph object at 0x10f19e760> document.save("dark-and-stormy.docx")
document = Document("dark-and-stormy.docx") document.paragraphs[0].text 'It was a dark and stormy night.'
More information is available in the python-docx documentation
About
Create and modify Word documents with Python
Resources
License
Stars
Watchers
Forks
Releases
Packages
No packages published