Changes in XlsxWriter

This section shows changes and bug fixes in the XlsxWriter module.

Deprecation Notice: XlsxWriter support for Python 2.7 will be dropped after July 2021.

Release 1.4.3 - May 12 2021

Release 1.4.2 - May 7 2021

  • Added support for GIF image files (and in Excel 365, animated GIF files).

Release 1.4.1 - May 6 2021

Release 1.4.0 - April 23 2021

  • Added fix for issue for where a y_axis font rotation of 0 was ignored.

Release 1.3.9 - April 15 2021

Release 1.3.8 - March 29 2021

  • Added ability to add accessibility options “description” and “decorative” to images via insert_image(). Feature Request #768.
  • Added fix for datetime.timedelta values that exceed the Excel 1900 leap day (timedeltas greater than 59 days, in hours). This is a backward incompatible change. Issue #731.
  • Added the worksheet read_only_recommended() method to set the Excel “Read-only Recommended” option that is available when saving a file. Feature Request #784.
  • Fixed issue where temp files used in constant_memory mode weren’t closed/deleted if the workbook object was garbage collected. Issue #764.
  • Fixed issue where pattern formats without colors were given a default black fill color. Issue #790.
  • Added option to set a chart crossing to ‘min’ as well as the existing ‘max’ option. The ‘min’ option isn’t available in the Excel interface but can be enabled via VBA. Feature Request #773.

Release 1.3.7 - October 13 2020

  • Fixed issue where custom chart data labels didn’t inherit the position of the data labels in the series. Issue #754.
  • Added text alignment for textboxes. The existing options allowed the text area to be aligned but didn’t offer control over the text within that area.
  • Added Python 3.9 to the test matrix.

Release 1.3.6 - September 23 2020

  • Added the worksheet unprotect_range() method to allow ranges within a protected worksheet to be unprotected. Feature Request #507.
  • There are now over 1500 test cases in the test suite, including 900 tests that compare the output from XlsxWriter, byte for byte, against test files created in Excel. This is to ensure the maximum possible compatibility with Excel.

Release 1.3.5 - September 21 2020

  • Fixed issue where relative url links in images didn’t work. Issue #751.
  • Added use_zip64 as a constructor option. Issue #745.
  • Added check, and warning, for worksheet tables with no data row. Either with or without a header row. Issue #715 and Issue #679.
  • Add a warning when the string length in write_rich_string() exceeds Excel’s limit. Issue #372.

Release 1.3.4 - September 16 2020

  • Replaced internal MD5 digest used to check for duplicate images with a SHA256 digest to avoid issues on operating systems such as Red Hat in FIPS mode which don’t support MD5 for security reasons. Issue #749.

Release 1.3.3 - August 13 2020

Release 1.3.2 - August 6 2020

Release 1.3.1 - August 3 2020

  • Fix for issue where array formulas weren’t included in the output file for certain ranges/conditions. Issue #735.

Release 1.3.0 - July 30 2020

Release 1.2.9 - May 29 2020

  • Added support for stacked and percent_stacked Line charts.

Release 1.2.8 - February 22 2020

  • Fix for issue where duplicate images with hyperlinks weren’t handled correctly. Issue #686.
  • Removed ReservedWorksheetName exception which was used with the reserved worksheet name “History” since this name is allowed in some Excel variants. Issue #688.
  • Fix for worksheet objects (charts, images and textboxes) that are inserted with an offset that starts in a hidden cell. Issue #676.
  • Fix to allow handling of NoneType in add_write_handler(). Issue #677.

Release 1.2.7 - December 23 2019

  • Fix for duplicate images being copied to an XlsxWriter file. Excel uses an optimization where it only stores one copy of a repeated/duplicate image in a workbook. XlsxWriter didn’t do this which meant that the file size would increase when then was a large number of repeated images. This release fixes that issue and replicates Excel’s behavior. Issue #615.
  • Added documentation on Number Format Categories and Number Formats in different locales.
  • Added note to protect() about how it is possible to encrypt an XlsxWriter file using a third party, cross platform, open source tool called msoffice-crypt.

Release 1.2.6 - November 15 2019

Release 1.2.5 - November 10 2019

Release 1.2.4 - November 9 2019

Release 1.2.3 - November 7 2019

  • Increased allowable worksheet url length from 255 to 2079 characters, as supported in more recent versions of Excel. A lower or user defined limit can be set via the max_url_length property in the Workbook() constructor.
  • Fixed several issues with hyperlinks in worksheet images.

Release 1.2.2 - October 16 2019

Release 1.2.1 - September 14 2019

Release 1.2.0 - August 26 2019

  • Refactored exception handling around the workbook file close() method to allow exceptions to be caught and handled. See Example: Catch exception on closing. Also refactored the code to clean up temp files in the event of an exception. :issue`471` and Issue #647.
  • Added the option to allow chart fonts to be rotated to 270 degrees to give a stacked orientation. See Chart Fonts. Issue #648.

Release 1.1.9 - August 19 2019

  • Another fix for issues where zipfile.py raises “ZIP does not support timestamps before 1980” exception. Issue #651.

Release 1.1.8 - May 5 2019

  • Added ability to combine Doughnut and Pie charts.
  • Added gauge chart example which is a combination of a Doughnut and a Pie chart. See Example: Gauge Chart.

Release 1.1.7 - April 20 2019

  • Added docs on Working with Object Positioning.
  • Added fix for sizing of cell comment boxes when they cross columns/rows that have size changes that occur after the comment is written. Issue #403 and Issue #312.
  • Added fix for the sizing of worksheet objects (images, charts, textboxes) when the underlying cell sizes have changed and the “object_position” parameter has been set to 1 “Move and size with cells”. An additional mode 4 has been added to simulate inserting the object in hidden rows. Issue #618.
  • Added object positioning for charts and textboxes, it was already supported for images. Note, the parameter is now called object_position. The previous parameter name positioning is deprecated but still supported for images. Issue #568.

Release 1.1.6 - April 7 2019

  • Fixed issue where images that started in hidden rows/columns weren’t placed correctly in the worksheet. Issue #613.
  • Fixed the mime-type reported by system file(1). The mime-type reported by “file –mime-type”/magic was incorrect for XlsxWriter files since it expected the [Content_types] to be the first file in the zip container. Issue #614.

Release 1.1.5 - February 22 2019

  • This version removes support for end of life Pythons 2.5, 2.6, 3.1, 3.2 and 3.3. For older, unsupported versions of Python use version 1.1.4 of XlsxWriter.

Release 1.1.4 - February 10 2019

  • Fix for issues where zipfile.py raises “ZIP does not support timestamps before 1980” exception. Issue #535.

Release 1.1.3 - February 9 2019

  • Fix handling of 'num_format': '0' in duplicate formats. Issue #584.

Release 1.1.2 - October 20 2018

  • Fix for issue where in_memory files weren’t compressed. Issue #573.
  • Fix write() so that it handles array formulas as documented. Issue #418.
  • Fix for issue with special characters in worksheet table functions. Issue #442.
  • Added warnings for input issues in write_rich_string() such as blank strings, double formats or insufficient parameters. Issue #425.

Release 1.1.1 - September 22 2018

  • Added comment font name and size options. Issue #201.
  • Fix for issue when using text boxes in the same workbook as a chartsheet. Issue #420.

Release 1.1.0 - September 2 2018

  • Added functionality to align chart category axis labels. See the label_align property of the set_x_axis() method.
  • Added worksheet hide_row_col_headers() method to turn off worksheet row and column headings. Issue #480.
  • Added the set_tab_ratio() method to set the ratio between the worksheet tabs and the horizontal slider. Issue #481.
  • Fixed issue with icon conditional formats when the values were zero. Issue #565.

Release 1.0.9 - August 27 2018

  • Fix for issue with formulas quoted as strings in conditional formats, introduced in version 1.0.7. Issue #564.

Release 1.0.8 - August 27 2018

  • Added named exceptions to XlsxWriter. See The Exceptions Class.
  • Removed the implicit close() in the destructor since it wasn’t guaranteed to work correctly and raised a confusing exception when any other exception was triggered. Note that this is a backward incompatible change. The with context manager is a better way to close automatically, see close().
  • Added border, fill, pattern and gradient formatting options to set_legend(). Issue #545.
  • Added top_right position to set_legend(). Issue #537.

Release 1.0.7 - August 16 2018

  • Fix for unicode type error in Python 3. Issue #554.

Release 1.0.6 - August 15 2018

Release 1.0.5 - May 19 2018

Release 1.0.4 - April 14 2018

  • Set the xlsx internal file member datetimes to 1980-01-01 00:00:00 like Excel so that apps can produce a consistent binary file once the workbook set_properties() created date is set. Pull Request #495.
  • Fix for jpeg images that reported unknown height/width due to unusual SOF markers. Issue #506.
  • Added support for blanks in list autofilter. Issue #505.

Release 1.0.3 - April 10 2018

Release 1.0.2 - October 14 2017

  • Fix for cases where the hyperlink style added in the previous release didn’t work. Feature Request #455.

Release 1.0.1 - October 14 2017

  • Changed default write_url() format to the Excel hyperlink style so that it changes when the theme is changed and also so that it indicates that the link has been clicked. Feature Request #455.

Release 1.0.0 - September 16 2017

Release 0.9.9 - September 5 2017

Release 0.9.8 - July 1 2017

  • Fixed issue where spurious deprecation warning was raised in -Werror mode. Issue #451.

Release 0.9.7 - June 25 2017

  • Minor bug and doc fixes.

Release 0.9.6 - Dec 26 2016

  • Fix for table with data but without a header. Issue #405.
  • Add a warning when the number of series in a chart exceeds Excel’s limit of 255. Issue #399.

Release 0.9.5 - Dec 24 2016

  • Fix for missing remove_timezone option in Chart class. Pull Request #404 from Thomas Arnhold.

Release 0.9.4 - Dec 2 2016

Release 0.9.3 - July 8 2016

  • Added check to add_table() to prevent duplicate header names which leads to a corrupt Excel file. Issue #362.

Release 0.9.2 - June 13 2016

  • Added workbook set_size() method to set the workbook window size.

Release 0.9.1 - June 8 2016

Release 0.9.0 - June 7 2016

Release 0.8.9 - June 1 2016

Release 0.8.8 - May 31 2016

Release 0.8.7 - May 13 2016

  • Fix for issue when inserting read-only images on Windows. Issue #352.
  • Added get_worksheet_by_name() method to allow the retrieval of a worksheet from a workbook via its name.
  • Fixed issue where internal file creation and modification dates were in the local timezone instead of UTC.

Release 0.8.6 - April 27 2016

  • Fix for external: urls where the target/anchor contains spaces. Issue #350.

Release 0.8.5 - April 17 2016

Release 0.8.4 - January 16 2016

  • Fix for write_url() exception when the URL contains two # location/anchors. Note, URLs like this aren’t strictly valid and cannot be entered manually in Excel. Issue #330.

Release 0.8.3 - January 14 2016

  • Added options to configure chart axis tick placement. See set_x_axis().

Release 0.8.2 - January 13 2016

Release 0.8.1 - January 12 2016

Release 0.8.0 - January 10 2016

Release 0.7.9 - January 9 2016

Release 0.7.8 - January 6 2016

  • Add checks for valid and non-duplicate worksheet table names. Issue #319.

Release 0.7.7 - October 19 2015

  • Added support for table header formatting and a fix for wrapped lines in the header. Feature Request #287.

Release 0.7.6 - October 7 2015

  • Fix for images with negative offsets. Issue #273.

Release 0.7.5 - October 4 2015

  • Allow hyperlinks longer than 255 characters when the link and anchor are each less than or equal to 255 characters.
  • Added hyperlink_base document property. Feature Request #306.

Release 0.7.4 - September 29 2015

  • Added option to allow data validation input messages with the ‘any’ validate parameter.
  • Fixed url encoding of links to external files and directories. Issue #278.

Release 0.7.3 - May 7 2015

Release 0.7.2 - March 29 2015

Release 0.7.1 - March 23 2015

Release 0.7.0 - March 21 2015

Release 0.6.9 - March 19 2015

Release 0.6.8 - March 17 2015

Release 0.6.7 - March 1 2015

Release 0.6.6 - January 16 2015

Release 0.6.5 - December 31 2014

  • Added worksheet quoting for chart names in lists. Issue #205.
  • Added docs on how to find and set VBA codenames. Issue #202.
  • Fix Python3 issue with unused charts. Issue #200.
  • Enabled warning for missing category is scatter chart. Issue #197.
  • Fix for upper chart style limit. Increased the chart style limit from 42 to the correct 48. Issue #192.
  • Raise warning if a chart is inserted more than once. Issue #184.

Release 0.6.4 - November 15 2014

  • Fix for issue where fonts applied to data labels raised exception. Issue #179.
  • Added option to allow explicit text axis types for charts, similar to date axes. Feature Request #178.
  • Fix for issue where the bar/column chart gap and overlap weren’t applied to the secondary axis. Issue #177.

Release 0.6.3 - November 6 2014

Release 0.6.2 - November 1 2014

Release 0.6.1 - October 29 2014

  • Added chart specific handling of data label positions since not all positions are available for all chart types. Issue #170.
  • Added number formatting (Issue #130), font handling, separator and legend key for data labels. See Chart series option: Data Labels
  • Fix for non-quoted worksheet names containing spaces and non-alphanumeric characters. Issue #167.

Release 0.6.0 - October 15 2014

Release 0.5.9 - October 11 2014

  • Removed egg_base requirement from setup.cfg which was preventing installation on Windows. Issue #162.
  • Fix for issue where X axis title formula was overwritten by the Y axis title. Issue #161.

Release 0.5.8 - September 28 2014

  • Added support for Doughnut charts. Feature Request #157.
  • Added support for wheel packages. Feature Request #156.
  • Made the exception handling in write() clearer for unsupported types so that it raises a more accurate TypeError instead of a ValueError. Issue #153.

Release 0.5.7 - August 13 2014

Release 0.5.6 - July 22 2014

Release 0.5.5 - May 6 2014

Release 0.5.4 - May 4 2014

  • Added image positioning option to insert_image() to control how images are moved in relation to surrounding cells. Feature Request #117.
  • Fix for chart error_bar exceptions. Issue #115.
  • Added clearer reporting of nested exceptions in write() methods. Issue #108.
  • Added support for inside_base data label position in charts.

Release 0.5.3 - February 20 2014

  • Added checks and warnings for data validation limits. Issue #89.
  • Added option to add hyperlinks to images. Thanks to Paul Tax.
  • Added Python 3 Http server example. Thanks to Krystian Rosinski.
  • Added set_calc_mode() method to control automatic calculation of formulas when worksheet is opened. Thanks to Chris Tompkinson.
  • Added use_zip64() method to allow ZIP64 extensions when writing very large files.
  • Fix to handle ‘0’ and other number like strings as number formats. Issue #103.
  • Fix for missing images in in_memory mode. Issue #102.

Release 0.5.2 - December 31 2013

Release 0.5.1 - December 2 2013

  • Added interval unit option for category axes. Feature Request #69.
  • Fix for axis name font rotation.
  • Fix for several minor issues with Pie chart legends.

Release 0.5.0 - November 17 2013

Release 0.4.9 - November 17 2013

Release 0.4.8 - November 13 2013

Release 0.4.7 - November 9 2013

Release 0.4.6 - October 23 2013

  • Added font formatting to chart legends.

Release 0.4.5 - October 21 2013

  • Added position_axis chart axis option.
  • Added optional list handling for chart names.

Release 0.4.4 - October 16 2013

  • Documented use of cell utility functions.
  • Fix for tables added in non-sequential order. Closes Issue #51 reported by calfzhou.

Release 0.4.3 - September 12 2013

  • Fix for comments overlying columns with non-default width. Issue #45.

Release 0.4.2 - August 30 2013

  • Added a default blue underline hyperlink format for write_url().
  • Added Workbook() constructor options strings_to_formulas and strings_to_urls to override default conversion of strings in write().

Release 0.4.1 - August 28 2013

  • Fix for charts and images that cross rows and columns that are hidden or formatted but which don’t have size changes. Issue #42 reported by Kristian Stobbe.

Release 0.4.0 - August 26 2013

  • Added more generic support for JPEG files. Issue #40 reported by Simon Breuss.
  • Fix for harmless Python 3 installation warning. Issue #41 reported by James Reeves.

Release 0.3.9 - August 24 2013

  • Added fix for minor issue with insert_image() for images that extend over several cells.
  • Added fix to ensure formula calculation on load regardless of Excel version.

Release 0.3.8 - August 23 2013

  • Added handling for Decimal(), Fraction() and other float types to the write() function.
  • Added Python 2.5 and Jython support. Thanks to Jonas Diemer for the patch.

Release 0.3.7 - August 16 2013

  • Added write_boolean() function to write Excel boolean values. Feature Request #37. Also added explicit handling of Python bool values to the write() function.
  • Changed Workbook() constructor option strings_to_numbers default option to False so that there is no implicit conversion of numbers in strings to numbers. The previous behavior can be obtained by setting the constructor option to True. Note This is a backward incompatibility.

Release 0.3.6 - July 26 2013

  • Simplified import based on a suggestion from John Yeung. Feature Request #26.
  • Fix for NAN/INF converted to invalid numbers in write(). Issue #30.
  • Added Workbook() constructor option strings_to_numbers to override default conversion of number strings to numbers in write().
  • Added Workbook() constructor option default_date_format to allow a default date format string to be set. Feature Request #5.

Release 0.3.5 - June 28 2013

  • Reverted back to using codecs for file encoding (versions <= 0.3.1) to avoid numerous UTF-8 issues in Python2/3.

Release 0.3.4 - June 27 2013

  • Added Chart line smoothing option. Thanks to Dieter Vandenbussche.
  • Added Http Server example (Example: Simple HTTP Server (Python 2)). Thanks to Alexander Afanasiev.
  • Fixed inaccurate column width calculation. Closes Issue #27 Thanks to John Yeung.
  • Added chart axis font rotation.

Release 0.3.3 - June 10 2013

Release 0.3.2 - May 1 2013

  • Speed optimizations. The module is now 10-15% faster on average.

Release 0.3.1 - April 27 2013

Release 0.3.0 - April 7 2013

Release 0.2.9 - April 7 2013

  • Added worksheet tables. See Working with Worksheet Tables and Example: Worksheet Tables.

  • Tested with the new Python stable releases 2.7.4 and 3.3.1. All tests now pass in the following versions:

    • Python 2.6
    • Python 2.7.2
    • Python 2.7.3
    • Python 2.7.4
    • Python 3.1
    • Python 3.2
    • Python 3.3.0
    • Python 3.3.1
  • There are now over 700 unit tests including more than 170 tests that compare against the output of Excel.

Release 0.2.8 - April 4 2013

Release 0.2.7 - April 3 2013

Release 0.2.6 - April 1 2013

Release 0.2.5 - April 1 2013

  • Added additional Workbook() parameters 'tmpdir' and 'date_1904'.

Release 0.2.4 - March 31 2013

  • Added Workbook() 'constant_memory' constructor property to minimize memory usage when writing large files. See Working with Memory and Performance for more details.
  • Fixed bug with handling of UTF-8 strings in worksheet names (and probably some other places as well). Reported by Josh English.
  • Fixed bug where temporary directory used to create xlsx files wasn’t cleaned up after program close.

Release 0.2.3 - March 27 2013

  • Fixed bug that was killing performance for medium sized files. The module is now 10x faster than previous versions. Reported by John Yeung.

Release 0.2.2 - March 27 2013

Release 0.2.1 - March 25 2013

  • Added support for datetime.datetime, datetime.date and datetime.time to the write_datetime() method. Issue #3. Thanks to Eduardo (eazb) and Josh English for the prompt.

Release 0.2.0 - March 24 2013

Release 0.1.9 - March 19 2013

  • Added Python 2.6 support. All tests now pass in the following versions:

    • Python 2.6
    • Python 2.7.2
    • Python 2.7.3
    • Python 3.1
    • Python 3.2
    • Python 3.3.0

Release 0.1.8 - March 18 2013

  • Fixed Python 3 support.

Release 0.1.7 - March 18 2013

Release 0.1.6 - March 17 2013

Release 0.1.5 - March 10 2013

Release 0.1.4 - March 8 2013

Release 0.1.3 - March 7 2013

Release 0.1.2 - March 6 2013

Release 0.1.1 - March 3 2013

  • Added the write_url() worksheet method for writing hyperlinks to a worksheet.

Release 0.1.0 - February 28 2013

  • Added the set_properties() workbook method for setting document properties.

  • Added several new examples programs with documentation. The examples now include:

    • array_formula.py
    • cell_indentation.py
    • datetimes.py
    • defined_name.py
    • demo.py
    • doc_properties.py
    • headers_footers.py
    • hello_world.py
    • merge1.py
    • tutorial1.py
    • tutorial2.py
    • tutorial3.py
    • unicode_polish_utf8.py
    • unicode_shift_jis.py

Release 0.0.9 - February 27 2013

  • Added the define_name() method to create defined names and ranges in a workbook or worksheet.
  • Added the worksheets() method as an accessor for the worksheets in a workbook.

Release 0.0.8 - February 26 2013

Release 0.0.7 - February 25 2013

Release 0.0.6 - February 22 2013

Release 0.0.5 - February 21 2013

Release 0.0.4 - February 20 2013

Release 0.0.3 - February 19 2013

Release 0.0.2 - February 18 2013

Release 0.0.1 - February 17 2013

  • First public release.