Introduction#

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

It can be used to write text, numbers, and formulas to multiple worksheets and it supports features such as formatting, images, charts, page setup, autofilters, conditional formatting and many others.

XlsxWriter has some advantages and disadvantages over the alternative Python modules for writing Excel files.

  • Advantages:

    • It supports more Excel features than any of the alternative modules.

    • It has a high degree of fidelity with files produced by Excel. In most cases the files produced are 100% equivalent to files produced by Excel.

    • It has extensive documentation, example files and tests.

    • It is fast and can be configured to use very little memory even for very large output files.

  • Disadvantages:

    • It cannot read or modify existing Excel XLSX files.

XlsxWriter is licensed under a BSD 2-Clause License and the source code is available on GitHub.

To try out the module see the next section on Getting Started with XlsxWriter.