Skip to main content

Lightweight XLSX writer with emphasis on minimizing memory usage.

Project description

XLSXLite

Build Status Coverage Status PyPI Release

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:

uv run pytest xlsxlite -s

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xlsxlite-1.1.1.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xlsxlite-1.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file xlsxlite-1.1.1.tar.gz.

File metadata

  • Download URL: xlsxlite-1.1.1.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for xlsxlite-1.1.1.tar.gz
Algorithm Hash digest
SHA256 068a755d3302acbe8bb4ed77697634d6a5ed60980bd4a8821a6a5daea0c7c45d
MD5 9a96ccb7eb00038ffb8f6a046419f0f0
BLAKE2b-256 3e8d10c6fd24c354c4df4b942f5170250b77ab19269c55ad40f86bfa8fb6a814

See more details on using hashes here.

File details

Details for the file xlsxlite-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: xlsxlite-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for xlsxlite-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8925a2a83cfdf64cf9aa0855c9ed64230ead51bf477a91534f527b65aea71408
MD5 00993f7d4019fd9f76df76a87928a8a3
BLAKE2b-256 175a1feb421d3c191825872bf4fe20890298743c3e926e1e4ceddff266724537

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page