Release Notes

This section show the feature additions, changes and bug fixes in rust_xlsxwriter.

[0.79.4] - 2024-11-18

Fixed

  • Fixed issue when handling PNG images with 0 DPI but with DPI units set.

    Issue #117

[0.79.3] - 2024-11-15

Added

  • Made the FilterData::new_string_and_criteria() and FilterData::new_number_and_criteria() functions public to allows users to implement the IntoFilterData trait.

    Request #115

Fixed

  • Fixed maximum cell width when autofitting columns. The maximum width is now constrained to the Excel limit of 255 characters/1790 pixels.

    Issue #114

[0.79.2] - 2024-11-09

Added

  • Added support for adding multiple objects (charts, images, shapes and buttons) of the same type in the same cell, but with unique offset values. This allows the user to position multiple objects using the same cell reference and different offset values when using functions like Worksheet::insert_chart_with_offset().

[0.79.1] - 2024-10-31

Fixed

  • Fixed issue where the precedence order of conditional formats wasn't being preserved and the rules were being sorted into row/column order instead of insertion order. This issue would only be visible with nested conditional formats and shouldn't affect most users.

    Issue #113

[0.79.0] - 2024-10-04

Added

  • Added support for files larger than 4GB.

    The rust_xlsxwriter library uses the zip.rs crate to provide the zip container for the xlsx file that it generates. The size limit for a standard zip file is 4GB for the overall container or for any of the uncompressed files within it. Anything greater than that requires ZIP64 support. In practice this would apply to worksheets with approximately 150 million cells, or more.

    See Workbook::use_zip_large_file().

[0.78.0] - 2024-10-01

Added

  • Added support for constant memory mode to reduce memory usage when writing large worksheets.

    The constant_memory mode works by flushing the current row of data to disk when the user writes to a new row of data. This limits the overhead to one row of data stored in memory. Once this happens it is no longer possible to write to a previous row since the data in the Excel file must be in row order. As such this imposes the limitation of having to structure your code to write in row by row order. The benefit is that the required memory usage is very low, and effectively constant, regardless of the amount of data written.

[0.77.0] - 2024-09-18

Added

  • Added support for Chartsheets.

    A Chartsheet in Excel is a specialized type of worksheet that doesn't have cells but instead is used to display a single chart. It supports worksheet display options such as headers and footers, margins, tab selection and print properties.

  • Updated polars dependency to 0.43 to pick up latest Polars additions for polars_excel_writer.

[0.76.0] - 2024-09-11

Added

  • Added support for adding Textbox shapes to worksheets. See the documentation for Shape.

[0.75.0] - 2024-09-02

Removed

  • Removed dependency on the regex.rs crate for smaller binary sizes. The only non-optional dependency is now zip.rs.

    An example of the size difference is shown below for one of the sample apps:

    app_hello_worldv0.74.0v0.75.0
    Debug9.2M4.2M
    Release3.4M1.6M
  • Removed the Formula::use_future_functions() and Formula::use_table_functions() methods since there functionality is now handled automatically as a result of the regex change.

[0.74.0] - 2024-08-24

Added

  • Add methods to format cells separately from the data writing functions.

    In Excel the data in a worksheet cell is comprised of a type, a value and a format. When using rust_xlsxwriter the type is inferred and the value and format are generally written at the same time using methods like Worksheet::write_with_format().

    However, if required you can write the data separately and then add the format using the new methods like Worksheet::set_cell_format(), Worksheet::set_range_format() and Worksheet::set_range_format_with_border().

  • Replaced the IntoColor trait with Into<Color> in all APIs. This doesn't require a change by the end user (unless they implemented IntoColor for their own type).

  • Updated polars dependency to 0.42.0 to pick up latest Polars additions for polars_excel_writer.

[0.73.0] - 2024-08-02

Added

[0.72.0] - 2024-07-26

Added

  • Added support for cell Notes (previously called Comments). See the documentation for Note.

    A Note is a post-it style message that is revealed when the user mouses over a worksheet cell. The presence of a Note is indicated by a small red triangle in the upper right-hand corner of the cell.

    In versions of Excel prior to Office 365 Notes were referred to as "Comments". The name Comment is now used for a newer style threaded comment and Note is used for the older non threaded version.

[0.71.0] - 2024-07-20

Added

  • Added support for adding VBA Macros to rust_xlsxwriter using files extracted from Excel files.

    An Excel xlsm file is structurally the same as an xlsx file except that it contains an additional vbaProject.bin binary file containing VBA functions and/or macros.

    Unlike other components of an xlsx/xlsm file this data isn't stored in an XML format. Instead the functions and macros as stored as a pre-parsed binary format. As such it wouldn't be feasible to programmatically define macros and create a vbaProject.bin file from scratch (at least not in the remaining lifespan and interest levels of the author).

    Instead, as a workaround, the Rust vba_extract utility is used to extract vbaProject.bin files from existing xlsm files which can then be added to rust_xlsxwriter files.

    See Working with VBA Macros.

[0.70.0] - 2024-07-14

Added

  • Added support for adding Excel data validations to worksheet cells.

    Data validation is a feature of Excel that allows you to restrict the data that a user enters in a cell and to display associated help and warning messages. It also allows you to restrict input to values in a dropdown list.

    See DataValidation for details.

[0.69.0] - 2024-07-01

Added

  • Added support for adjusting the layout position of chart elements: plot area, legend, title and axis labels. See ChartLayout.

Fixed

  • Fixed issue where a worksheet name required quoting when used with Worksheet::repeat_row(). There was some checks to handle this but they weren't comprehensive enough. Issue #95.

[0.68.0] - 2024-06-18

Added

Changed

  • Changed the method signatures of the Image helper methods from &mut self to mut self to allow method chaining. This is an API/ABI break.

[0.67.0] - 2024-06-17

Added

  • Updated the default zip.rs requirement to v2+ to pick up a fix for zip-rs/zip2#100 when dealing with 64k+ internal files in an xlsx container. As a result of this, rust_xlsxwriter now has a matching msrv (Minimum Supported Rust Version) of v1.73.0.

  • Replaced the dependency on lazy_static with std::cell::OnceLock. The only non-optional requirements are now zip and regex. This was made possible by the above msrv update. See Feature Request #24.

  • Added an optional dependency on the ryu crate to speed up writing large amounts of worksheet numeric data. The feature flag is ryu.

    This feature has a benefit when writing more than 300,000 numeric data cells. When writing 5,000,000 numeric cells it can be 30% faster than the standard feature set. See the following performance analysis but also please test it for your own scenario when enabling it since a performance improvement is not guaranteed in all cases.

  • Added Excel Sensitivity Label cookbook example and explanation.

    Sensitivity Labels are a property that can be added to an Office 365 document to indicate that it is compliant with a company’s information protection policies. Sensitivity Labels have designations like “Confidential”, “Internal use only”, or “Public” depending on the policies implemented by the company. They are generally only enabled for enterprise versions of Office.

  • Updated all dependency versions to the latest current values.

[0.66.0] - 2024-06-12

Added

Changed

  • Changed ChartSeries::set_y2_axis() to ChartSeries::set_secondary_axis() for API consistency.

[0.65.0] - 2024-06-11

Added

[0.64.2] - 2024-04-13

Fixed

  • Fixed internal links in table of contents.

[0.64.1] - 2024-03-26

Added

[0.64.0] - 2024-03-18

Added

  • Add support for worksheet sparklines. Sparklines are a feature of Excel 2010+ which allows you to add small charts to worksheet cells. These are useful for showing data trends in a compact visual format.

    See Working with Sparklines.

[0.63.0] - 2024-02-25

Added

  • Added support for embedding images into worksheets with worksheet::embed_image() and worksheet::embed_image_with_format() and the Image struct. See the Embedded Images example.

    This can be useful if you are building up a spreadsheet of products with a column of images for each product. Embedded images move with the cell so they can be used in worksheet tables or data ranges that will be sorted or filtered.

    This functionality is the equivalent of Excel's menu option to insert an image using the option to "Place in Cell" which is available in Excel 365 versions from 2023 onwards.

  • Updated polars dependency to 0.37.2 to pick up latest Polars additions for polars_excel_writer.

  • Added utility::check_sheet_name() function to allow checking for valid worksheet names according to Excel's naming rules. This functionality was previously pub(crate) private.

    Feature Request #83.

Removed

  • Removed unnecessary lifetime on Format objects used in Worksheet write() methods. This allows the the IntoExcelData trait to be defined for user types and have them include a default format. See Feature Request #85.

[0.62.0] - 2024-01-24

Added

Changed

  • Changed APIs for Table to return Table instead of &Table to allow methods to be chained. This makes worksheet Table usage easier during serialization. Note that this is a backward incompatible change.

[0.61.0] - 2024-01-13

Added

[0.60.0] - 2024-01-02

Added

[0.59.0] - 2023-12-15

Added

[0.58.0] - 2023-12-11

Added

[0.57.0] - 2023-12-09

Added

  • Added support for Serde serialization. This requires the serde feature flag to be enabled. See Working with Serde.

  • Added support for writing u64 and i64 number within Excel's limitations. This implies a loss of precision outside Excel's integer range of +/- 999,999,999,999,999 (15 digits).

[0.56.0] - 2023-11-27

Added

  • Changed some of the Conditional Format interfaces introduced in the previous release to use extended enums. This is an API change with the version released earlier this week but it provides a cleaner interface.

  • Added support for Option<T> wrapped types to Worksheet::write().

    Feature Request #59.

[0.55.0] - 2023-11-21

Added

[0.54.0] - 2023-11-04

Added

[0.53.0] - 2023-10-30

Added

[0.52.0] - 2023-10-20

Added

  • Added support for chart series error bars via the ChartErrorBars struct and methods.

Fixed

[0.51.0] - 2023-10-15

Added

[0.50.0] - 2023-10-12

Added

  • Added support for chart trendlines (Linear, Polynomial, Moving Average, etc.) via the ChartTrendline struct and methods.

  • Added the Worksheet::set_very_hidden() method to hide a worksheet similar to the Worksheet::set_hidden() method. The difference is that the worksheet can only be unhidden by VBA and cannot be unhidden in the the Excel user interface.

  • Added support for leader lines to non-Pie charts.

Fixed

[0.49.0] - 2023-09-19

Added

  • Updated Polar's dependency and PolarError import to reflect changes in Polars v 0.33.2.

[0.48.0] - 2023-09-08

Added

[0.47.0] - 2023-09-02

Added

  • Added wasm feature flag to help compilation on Wasm/Javascript targets. Also added mapping from a XlsxError to a JsValue error.

    See the rust_xlsx_wasm_example sample application that demonstrates accessing rust_xlsxwriter code from JavaScript, Node.js, Deno and Wasmtime.

  • Added Workbook::save_to_writer() method to make it easier to interact with interfaces that implement the <W: Write> trait.

[0.46.0] - 2023-08-20

Added

  • Added polars feature flag to help interoperability with Polars. Currently it only implements PolarsError and XlsxError mapping but other functionality may be added in the future. These changes are added to support the polars_excel_writer crate.

[0.45.0] - 2023-08-12

Fixed

  • Fixed "multiply with overflow" issue when image locations in the worksheet were greater than the maximum u32 value.

    Related to GitHub Issue #51.

[0.44.0] - 2023-08-02

Added

  • Added threading into the backend worksheet writing for increased performance with large multi-worksheet files.

[0.43.0] - 2023-07-27

Added

[0.42.0] - 2023-07-11

Changed

  • Made the chrono feature optionally off instead of optionally on. The chrono feature must now be explicitly enabled to allow support for Chrono types.

  • Renamed the worksheet write_datetime() method to the API consistent write_datetime_with_format() and introduced a new write_datetime() method that doesn't take a format. This is required to fix a error in the APIs that prevented an unformatted datetime from taking the row or column format.

    Note: This is a backwards incompatible change.

    See GitHub Issue #47.

Added

  • Added a Tutorial and Cookbook section to the doc.rs documentation.

  • Added a check, and and error result, for case-insensitive duplicate sheet names. Also added sheet name validation to chart series.

    See GitHub Issue #45.

  • Added cell range name handling utility functions:

[0.41.0] - 2023-06-20

  • Added the native ExcelDateTime struct to allow handling of dates and times without a dependency on the Chrono library. The Chrono library is now an optional feature/dependency. It is included by default in this release for compatibility with previous versions but it will be optionally off in the next and subsequent versions.

    All date/time APIs support both the native ExcelDateTime and Chrono types via the IntoExcelDateTime trait.

    The worksheet.write_date() and worksheet.write_time() methods have been moved to "undocumented" since the same functionality is available via Worksheet::write_datetime(). This is a soft deprecation.

[0.40.0] - 2023-05-31

[0.39.0] - 2023-05-23

Added

[0.38.0] - 2023-05-05

Added

[0.37.0] - 2023-04-30

Added

[0.36.1] - 2023-04-18

Fix cargo/release issue with 0.36.0 release.

[0.36.0] - 2023-04-18

Added

  • Added performance improvement for applications that use a lot of Format objects. GitHub Issue #30.

Fixed

  • Fixed issue introduced in v0.34.0 where Rc<> value was blocking Send in multithreaded applications. GitHub Issue #29.

[0.35.0] - 2023-04-16

Added

[0.34.0] - 2023-04-12

Added

Performance improvement release.

  • Added optimizations across the library. For larger files this version is 10% faster than previous versions.

    These optimizations were provided by Adrián Delgado, see GitHub Issue #23.

  • Added crate feature zlib which adds a dependency on zlib and a C compiler but is around 1.6x faster for larger files. With this feature enabled it is even faster than the native C version libxlsxwriter by around 1.4x for large files.

    See also the Performance section of the user guide.

[0.33.0] - 2023-04-10

Added

  • Added support for formatting and setting chart points via the ChartPoint struct. This is mainly useful as the way of specifying segment colors in Pie charts.

    See the updated Pie Chart example in the user guide.

  • Added support for formatting and setting chart markers via the ChartMarker struct.

  • Added Chart::set_rotation() and Chart::set_hole_size() methods for Pie and Doughnut charts.

  • Added support to differentiate between Color::Default and Color::Automatic colors for Excel elements. These are usually equivalent but there are some cases where the "Automatic" color, which can be set at a system level, is different from the Default color.

[0.32.0] - 2023-04-03

Added

  • Added formatting for the chart title and axes via the the ChartFormat struct.

[0.31.0] - 2023-04-02

Added

  • Added formatting for the chart area, plot area, and legend via the the ChartFormat struct.

[0.30.0] - 2023-03-31

Added

  • Added chart formatting for Lines, Borders, Solid fills and Pattern fills via the ChartFormat struct. This is currently only available for chart series but it will be extended in the next release for most other chart elements.

    See also the Chart Fill Pattern example in the user guide.

  • Added IntoColor trait to allow syntactic shortcuts for Color parameters in methods. So now you can set a RGB color like this object.set_color("#FF7F50") instead of the more verbose object.set_color(Color::RGB(0xFF7F50)). This addition doesn't require any API changes from the end user.

  • Added Worksheet::insert_image_fit_to_cell() method to add an image to a worksheet and scale it so that it fits in a cell. This method can be useful when creating a product spreadsheet with a column of images for each product.

    See also the insert_image_to_fit example in the user guide.

  • Added Chart::series.set_gap() and Chart::series.set_overlap() method to control layout of histogram style charts.

[0.29.0] - 2023-03-16

Added

  • Added support for resizing and object positioning to the Chart struct.

  • Added handling for chrono date/time types to the generic Worksheet::write() method.

[0.28.0] - 2023-03-14

Added

  • Added support for positioning or hiding Chart legends. See ChartLegend.

[0.27.0] - 2023-03-13

Added

[0.26.0] - 2023-02-03

Note: this version contains a major refactoring/renaming of some of the main data writing functions and some of the enums and secondary structs. This will require code changes from all current users but will allow more consistent APIs in future releases. Nevertheless, I apologize for this level of change.

Changed

  • The following worksheet functions have changed names to reflect their frequency of usage.

    Previous nameNew name
    write_string_only()write_string()
    write_number_only()write_number()
    write_formula_only()write_formula()
    write_boolean_only()write_boolean()
    write_rich_string_only()write_rich_string()
    write_array_formula_only()write_array_formula()
    write_dynamic_array_formula_only()write_dynamic_array_formula()
    write_array_formula()write_array_formula_with_format()
    write_boolean()write_boolean_with_format()
    write_dynamic_array_formula()write_dynamic_array_formula_with_format()
    write_formula()write_formula_with_format()
    write_number()write_number_with_format()
    write_rich_string()write_rich_string_with_format()
    write_string()write_string_with_format()
  • The following enums and structs have changed to a more logical naming:

    Previous nameNew name
    XlsxAlignFormatAlign
    XlsxBorderFormatBorder
    XlsxDiagonalBorderFormatDiagonalBorder
    XlsxPatternFormatPattern
    XlsxScriptFormatScript
    XlsxUnderlineFormatUnderline
    XlsxObjectMovementObjectMovement
    XlsxImagePositionHeaderImagePosition
    ProtectWorksheetOptionsProtectionOptions
    PropertiesDocProperties
  • The DocProperties::set_custom_property() method replaces several type specific methods with a single trait based generic method.

[0.25.0] - 2023-01-30

Added

[0.24.0] - 2023-01-18

Added

  • Added support for hiding rows and columns (to hide intermediate calculations) via the Worksheet::set_column_hidden() andWorksheet::set_row_hidden() method. This is also a required precursor to adding autofilter conditions.
  • Added the ObjectMovement enum to control how a worksheet object, such a an image, moves when the cells underneath it are moved, resized or deleted.

[0.23.0] - 2023-01-16

Added

Added more page setup methods.

[0.22.0] - 2023-01-13

Added

[0.21.0] - 2023-01-09

Added

Changed

  • Change date/time parameters to references in Worksheet::write_datetime(), worksheet.write_date() and worksheet.write_time() for consistency.

[0.20.0] - 2023-01-06

Added

Changed

  • The worksheet.set_autofit() method has been renamed to worksheet.autofit() for consistency with the other language versions of this library.

[0.19.0] - 2022-12-27

Added

[0.18.0] - 2022-12-19

Added

[0.17.1] - 2022-12-18

Fixed

  • Fixes issue where header image files became corrupt during incremental saves. Also fixes similar issues in some formatting code.

[0.17.0] - 2022-12-17

Added

[0.16.0] - 2022-12-09

Added

  • Replicate the optimization used by Excel where it only stores one copy of a repeated/duplicate image in a workbook.

[0.15.0] - 2022-12-08

Added

[0.14.0] - 2022-12-05

Added

Removed

  • The Workbook::save() method has been extended to handle paths or strings. The workbook.save_to_path() method has been removed. See PR #15.

[0.13.0] - 2022-11-21

Added

See also the hyperlinks example in the user guide.

[0.12.1] - 2022-11-09

Changed

  • Dependency changes to make WASM compilation easier:

    • Reduced the zip dependency to the minimum import only.
    • Removed dependency on tempfile. The library now uses in memory files.

[0.12.0] - 2022-11-06

Added

[0.11.0] - 2022-11-04

Added

[0.10.0] - 2022-11-03

Added

[0.9.0] - 2022-10-31

Note, this version contains a major backward incompatible API change where it restructures the Workbook constructor/destructor sequence and introduces a save() method to replace close().

Changed

  • The Workbook::new() method no longer takes a filename. Instead the naming of the file has move to a Workbook::save() method which replaces workbook.close().

Added

[0.8.0] - 2022-10-28

Added

  • Added support for creating files from paths via workbook.new_from_path().

  • Added support for creating file to a buffer via workbook.new_from_buffer() and workbook.close_to_buffer().

[0.7.0] - 2022-10-22

Added

Fixes

  • Fix for cargo issue where chrono dependency had a RUSTSEC warning. GitHub Issue #6.

[0.6.0] - 2022-10-18

Added

[0.5.0] - 2022-10-16

Added

[0.4.0] - 2022-10-10

Added

See also the rust_xlsxwriter user documentation on Dynamic Array support.

[0.3.1] - 2022-10-01

Fixed

  • Fixed minor crate issue.

[0.3.0] - 2022-10-01

Added

[0.2.1] - 2022-09-22

Fixed

  • Fixed some minor crate/publishing issues.

[0.2.0] - 2022-09-24

Added

  • First functional version. Supports the main data types and formatting.

[0.1.0] - 2022-07-12

Added

  • Initial, non-functional crate, to initiate namespace.