PyExcelerate

0.13.0 · active · verified Wed Apr 15

PyExcelerate is an accelerated Python library designed for quickly writing Excel XLSX files, with an emphasis on performance and efficient memory usage. It is currently at version 0.13.0 and supports both Python 2.7 and various Python 3 versions, though a strict release cadence is not always observed.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a new Excel workbook, add a sheet with a 2D array of data, apply some basic styling, and save the workbook to a file. It highlights the primary use case of bulk data writing.

from pyexcelerate import Workbook
import os

data = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
] # data is a 2D array

wb = Workbook()
ws = wb.new_sheet("MySheet", data=data)

# Optional: Set column widths or row heights
ws.set_col_style(1, ws.style.font.bold)
ws.set_row_style(1, ws.style.font.italic)
ws.cell(1,1).value = "Bold Italic"

file_path = "output.xlsx"
wb.save(file_path)
print(f"Workbook saved to {os.path.abspath(file_path)}")

view raw JSON →