Lightweight XLSX writer with emphasis on minimizing memory usage.
Project description
XLSXLite
This is a lightweight XLSX writer with emphasis on minimizing memory usage. It's also really fast.
from xlsxlite.writer import XLSXBook
book = XLSXBook()
sheet1 = book.add_sheet("People")
sheet1.append_row("Name", "Email", "Age")
sheet1.append_row("Jim", "jim@acme.com", 45)
book.finalize(to_file="simple.xlsx")
Benchmarks
The benchmarking test writes rows with 10 cells of random string data to a single sheet workbook. The table below gives the times in seconds (lower is better) to write a spreadsheet with the given number of rows, and includes xlxswriter and openpyxl for comparison.
Implementation | 100,000 rows | 1,000,000 rows |
---|---|---|
openpyxl | 43.5 | 469.1 |
openpyxl + lxml | 21.1 | 226.3 |
xlsxwriter | 17.2 | 186.2 |
xlsxlite | 1.9 | 19.2 |
Limitations
This library is for projects which need to generate large spreadsheets, quickly, for the purposes of data exchange, and so it intentionally only supports a tiny subset of SpreadsheetML specification:
- No styling or themes
- Only strings, numbers, booleans and dates are supported cell types
If you need to do anything fancier then take a look at xlxswriter and openpyxl.
Development
To run all tests:
py.test xlsxlite -s
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xlsxlite-0.2.0.tar.gz
.
File metadata
- Download URL: xlsxlite-0.2.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 904f01591b34e902bf2d1e3e1d77e4364eabad96258263e894484925e1937970 |
|
MD5 | e5ca5f41894fbfeb16918a627cda4086 |
|
BLAKE2b-256 | a42c9fbcd4ef611340fa61eb95936efa278d7cb6bcb04499990d91b515c62854 |
File details
Details for the file xlsxlite-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: xlsxlite-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8710cc9f30b612fd2505e2c5be85751ae262a3f1c9636e0671351f54e127ebe |
|
MD5 | 2a9a1066d961419d566b6e67d7a08793 |
|
BLAKE2b-256 | 9416dc0038deea1ff34bf98235e838e69a57094d64d8c5f5337f04cb028db384 |