Install & Compatibility
Where this runs
tested against v0.3.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 30.2MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.1s · import 0.000s · 31MB
28MB installed
● package 28MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pyexcel
✓ import pyexcel
Installing pyexcel-ezodf automatically registers it as a plugin for pyexcel, enabling it to handle '.ods' files transparently when using pyexcel's save_as/get_sheet functions.
get_data
✓ from pyexcel_ezodf import get_data, save_data
These functions offer direct access to pyexcel-ezodf's ODS-specific read/write capabilities, similar to pyexcel's interface but focused on ODS.
This quickstart demonstrates how to use `pyexcel-ezodf` as a `pyexcel` plugin to save Python data to an ODS file and then read it back. No explicit import from `pyexcel_ezodf` is needed for `pyexcel` to recognize and handle ODS files; simply installing the plugin is enough.
import pyexcel
import os
# Data to write to an ODS file
data = [
["Item", "Quantity", "Price"],
["Apple", 10, 1.5],
["Banana", 5, 0.75],
["Orange", 8, 1.2]
]
# Define a temporary file name
file_name = "example.ods"
try:
# Save the data to an ODS file
pyexcel.save_as(array=data, dest_file_name=file_name)
print(f"'{file_name}' created successfully.")
# Read data from the ODS file
sheet = pyexcel.get_sheet(file_name=file_name)
print("\nRead data from ODS file:")
for row in sheet:
print(row)
# You can also get a dictionary or other formats
book_dict = pyexcel.get_book_dict(file_name=file_name)
print("\nBook dictionary:", book_dict)
finally:
# Clean up the created file
if os.path.exists(file_name):
os.remove(file_name)
print(f"Cleaned up '{file_name}'.")
Debug
Known issues
gotchaThe underlying `ezodf` library, and consequently `pyexcel-ezodf`, loads the entire ODS document into memory. This can lead to high memory consumption and slow performance when working with very large ODS files.fixFor extremely large datasets, consider preprocessing the data to reduce file size, or explore alternative libraries that offer streaming or chunked processing for spreadsheet formats like `openpyxl` (for XLSX) if ODS is not a strict requirement.
affects: All versions (0.3.x)
gotcha`pyexcel-ezodf` is a plugin designed to extend `pyexcel`. If you encounter errors like `pyexcel.exceptions.NoReaderFound` or the ODS file is not handled as expected, it might indicate that either `pyexcel` itself is not installed, or `pyexcel-ezodf`'s dependencies (`ezodf`) are missing.fixEnsure that `pyexcel` and `ezodf` are correctly installed alongside `pyexcel-ezodf`. A fresh installation with `pip install pyexcel-ezodf` should typically pull all necessary dependencies.
affects: All versions (0.3.x)
Upgrade
Version history
0.3.4latest on PyPI · released Oct 23, 2017
Audit
Dependencies
pyexcelrequiredCore pyexcel library, which this package extends.
ezodfrequiredUnderlying library for ODF manipulation.