A Python module for creating Excel XLSX files.

License: Other

Language: Python

Keywords: charts, libxlsxwriter, pandas, python, spreadsheet, xlsx, xlsx-files, xlsxwriter


XlsxWriter is a Python module for writing files in the Excel 2007+ XLSX file format.

XlsxWriter can be used to write text, numbers, formulas and hyperlinks to multiple worksheets and it supports features such as formatting and many more, including:

  • 100% compatible Excel XLSX files.
  • Full formatting.
  • Merged cells.
  • Defined names.
  • Charts.
  • Autofilters.
  • Data validation and drop down lists.
  • Conditional formatting.
  • Worksheet PNG/JPEG/BMP/WMF/EMF images.
  • Rich multi-format strings.
  • Cell comments.
  • Integration with Pandas.
  • Textboxes.
  • Support for adding Macros.
  • Memory optimization mode for writing large files.

It supports Python 2.7, 3.4+, Jython and PyPy and uses standard libraries only.

Here is a simple example:

import xlsxwriter

# Create an new Excel file and add a worksheet.
workbook = xlsxwriter.Workbook('demo.xlsx')
worksheet = workbook.add_worksheet()

# Widen the first column to make the text clearer.
worksheet.set_column('A:A', 20)

# Add a bold format to use to highlight cells.
bold = workbook.add_format({'bold': True})

# Write some simple text.
worksheet.write('A1', 'Hello')

# Text with formatting.
worksheet.write('A2', 'World', bold)

# Write some numbers, with row/column notation.
worksheet.write(2, 0, 123)
worksheet.write(3, 0, 123.456)

# Insert an image.
worksheet.insert_image('B5', 'logo.png')


See the full documentation at:

Release notes:

Project Statistics

Sourcerank 16
Repository Size 163 MB
Stars 1,943
Forks 413
Watchers 113
Open issues 33
Dependencies 0
Contributors 37
Tags 119
Last updated
Last pushed

Top Contributors See all

John McNamara Jonas Diemer Chris dieterv77 jkyeung Paul Tax Krystian Rosiński Javier Santacruz Daniel Quinn Abhishek Kumar Singh Vaibhav Mishra Alexander Shadchin Andrei Korostelev Augusto Destrero KanorUbu Seiji Matsuoka moogleshoogle2 Devendra Gera Jesse Rosalia tarnhold

Packages Referencing this Repo

A Python module for creating Excel XLSX files.
Latest release 1.1.8 - Updated - 1.94K stars
A Python module for creating Excel XLSX files.
Latest release RELEASE_1.1.9 - Published - 1.94K stars

Recent Tags See all

RELEASE_1.1.9 August 19, 2019
RELEASE_1.1.8 May 05, 2019
RELEASE_1.1.7 April 20, 2019
RELEASE_1.1.6 April 07, 2019
RELEASE_1.1.5 February 23, 2019
RELEASE_1.1.4 February 10, 2019
RELEASE_1.1.3 February 09, 2019
RELEASE_1.1.2 October 20, 2018
RELEASE_1.1.1 September 22, 2018
RELEASE_1.1.0 September 02, 2018
RELEASE_1.0.9 August 27, 2018
RELEASE_1.0.8 August 26, 2018
RELEASE_1.0.7 August 15, 2018
RELEASE_1.0.6 August 14, 2018
RELEASE_1.0.5 May 19, 2018

Something wrong with this page? Make a suggestion

Last synced: 2019-08-19 22:36:51 UTC

Login to resync this repository