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.0.tar.gz (37.9 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.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xlsxlite-1.1.0.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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.0.tar.gz
Algorithm Hash digest
SHA256 9c445a9eaa9c819c801badda89b485b527c144bdd70e1267d13f5d65ca3a6270
MD5 96a2f02f1fd06fffda6c51fd9e76b172
BLAKE2b-256 df04ea68170014b566fce78b242d272d6976acd276f081c24e5002fccd9825ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xlsxlite-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a495659e207a7d5bc2bbc02d241517e72390cd8d009676ae942b13a1ed6ac04
MD5 f410cb0da4319246033e25d10a04f481
BLAKE2b-256 63e8fe5f1d2082cfda8ccece893f04390b783ea59d504986c422098533c83f10

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