{"id":5621,"library":"ezodf","title":"ezodf","description":"ezodf is a Python package for creating new or opening existing OpenDocument (ODF) files, such as text documents (.odt) and spreadsheets (.ods), to extract, add, modify, or delete document data. The project's current version is 0.3.2, released in December 2015, and is classified as 'Alpha' development status, indicating potential API instability. While the main PyPI package sees limited activity, forks like 'pyexcel-ezodf' provide ongoing maintenance.","status":"maintenance","version":"0.3.2","language":"en","source_language":"en","source_url":"https://github.com/T0ha/ezodf","tags":["odf","opendocument","spreadsheet","word-processor","document-generation","xml","office"],"install":[{"cmd":"pip install ezodf","lang":"bash","label":"Install ezodf"}],"dependencies":[{"reason":"Required for painless XML serialization with prefix declaration.","package":"lxml","optional":false}],"imports":[{"symbol":"newdoc","correct":"from ezodf import newdoc"},{"symbol":"opendoc","correct":"from ezodf import opendoc"},{"symbol":"Paragraph","correct":"from ezodf import Paragraph"},{"symbol":"Heading","correct":"from ezodf import Heading"},{"symbol":"Sheet","correct":"from ezodf import Sheet"}],"quickstart":{"code":"from ezodf import newdoc, Paragraph, Heading, Sheet\nimport os\n\n# Create a new text document (.odt)\nodt_doc = newdoc(doctype='odt', filename='text_document.odt')\nodt_doc.body += Heading(\"Chapter 1 - Introduction\")\nodt_doc.body += Paragraph(\"This is the first paragraph of the document.\")\nodt_doc.body += Paragraph(\"Here is some more text.\")\nodt_doc.save()\nprint(f\"Text document saved to {os.path.abspath('text_document.odt')}\")\n\n# Create a new spreadsheet document (.ods)\nods_doc = newdoc(doctype='ods', filename='spreadsheet_document.ods')\nsheet = Sheet('MySheet', size=(5, 5)) # Create a sheet named 'MySheet' with 5x5 cells\nods_doc.sheets += sheet\n\nsheet['A1'].set_value(\"Product Name\")\nsheet['B1'].set_value(\"Quantity\")\nsheet['C1'].set_value(\"Price\")\nsheet['A2'].set_value(\"Laptop\")\nsheet['B2'].set_value(2)\nsheet['C2'].set_value(1200, currency='USD')\nsheet['D4'].formula = \"of:=SUM([.B2];[.C2])\" # Example formula, ezodf has no calculation engine\n\nods_doc.save()\nprint(f\"Spreadsheet document saved to {os.path.abspath('spreadsheet_document.ods')}\")\n\n# To open and modify an existing document (example)\n# from ezodf import opendoc\n# existing_doc = opendoc('text_document.odt')\n# existing_doc.body.append(Paragraph('Added a new paragraph after opening.'))\n# existing_doc.saveas('updated_text_document.odt')","lang":"python","description":"This quickstart demonstrates how to create both a new OpenDocument Text (.odt) file with a heading and paragraphs, and a new OpenDocument Spreadsheet (.ods) file with a sheet, cell values, and a basic formula. It then saves both documents."},"warnings":[{"fix":"Be aware that formulas are static text. For dynamic calculations, use another library or process the ODF file with a dedicated spreadsheet application.","message":"ezodf does NOT include a calculation engine for spreadsheets. Formulas are stored as strings only. Changes like inserting/deleting rows/columns will NOT update cell references in formulas and can break them, requiring manual recalculation or external tools.","severity":"gotcha","affected_versions":"All versions (0.x)"},{"fix":"Configure the `ezodf.config.set_table_expand_strategy()` if you encounter layout issues or memory problems. Understand the trade-offs between 'all', 'all_but_last', and 'all_less_maxcount'.","message":"When opening spreadsheet documents, `ezodf` uses 'expand strategies' to prevent memory overflows. The default strategy ('all_less_maxcount') may not accurately represent the original sheet layout and can potentially break cell references, especially with many repeated rows/columns. The 'all' strategy guarantees layout but can lead to memory issues for large files.","severity":"gotcha","affected_versions":"All versions (0.x)"},{"fix":"For new projects or if you require ongoing support and updates, consider evaluating `pyexcel-ezodf` or other actively maintained ODF manipulation libraries that may build upon or offer alternatives to `ezodf`.","message":"The primary `ezodf` package on PyPI (0.3.2) has not seen updates since December 2015 and is marked as 'Alpha' development status. Active maintenance appears to have shifted to forks like `pyexcel-ezodf` or related projects.","severity":"deprecated","affected_versions":"0.3.2 and older"},{"fix":"Test thoroughly with your target Python version. If issues arise, consider using an older, compatible Python 3.x version or migrating to a more actively maintained library.","message":"There are reported `SyntaxWarning: invalid escape sequence` issues with Python 3.13, indicating potential compatibility problems with very recent Python versions due to the library's age.","severity":"gotcha","affected_versions":"Potentially Python 3.13+"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}