ExcelTableKit Documentation

PyPI version Python versions

ExcelTableKit is a Python library that acts as a high-level abstraction layer over openpyxl for styling tables in .xlsx files.

Instead of dealing directly with openpyxl internals like PatternFill, Border, Side, Font, and Alignment, ExcelTableKit lets you define a cell range as a table object and apply styles to it declaratively in just a few lines of code.

from exceltablekit import ExcelManager, ExcelStyle

excel = ExcelManager("report.xlsx")
excel.set_table("A1", "D10")
excel.define_header(rows=1)

style = ExcelStyle(excel)
style.set_header_background("1F4E79")
style.set_header_font(bold=True, hex_color="FFFFFF")
style.set_background("E8F4FD")
style.set_border()
style.auto_fit_columns()

Project