rust_xlsxwriter
The rust_xlsxwriter library is a Rust library for writing Excel files in
the xlsx format.
The rust_xlsxwriter library can be used to write text, numbers, dates and
formulas to multiple worksheets in a new Excel 2007+ xlsx file. It has a focus
on performance and on fidelity with the file format created by Excel. It cannot
be used to modify an existing file.
Example
Sample code to generate the Excel file shown above.
use *;
rust_xlsxwriter is a port of the XlsxWriter Python module by the same
author. Feature porting is a work in progress. The currently supported
features are:
- Support for writing all basic Excel data types.
- Full cell formatting support.
- Formula support, including new Excel 365 dynamic functions.
- Charts.
- Hyperlink support.
- Page/Printing Setup support.
- Merged ranges.
- Worksheet PNG/JPEG/GIF/BMP images.
- Rich multi-format strings.
- Defined names.
- Autofilters.
- Worksheet Tables.
rust_xlsxwriter is under active development and new features will be added
frequently.
Features
-
default: Includes all the standard functionality. Has dependencies onzip,regexandlazy_static. -
chrono: Adds supports for Chrono date/time types to the API. This is off by default. -
zlib: Adds dependency onzliband a C compiler. This includes the same features asdefaultbut is 1.5x faster for large files. -
polars: Add support for mapping betweenPolarsErrorandrust_xlsxwriter::XlsxErrorto make code that handles both types of error easier to write. -
wasm: Adds dependency onjs-sysandwasm-bindgento allow compilation for wasm/JavaScript targets. -
test-resave: Developer only testing feature.
Release notes
Recent changes:
- Added chart trendlines and gradient fills.
- Added custom functions to table totals.
- Added Wasm and Polars feature flags for compatibility.
See the full Release Notes and Changelog.
See also
- User Guide: Working with the
rust_xlsxwriterlibrary.- Getting started: A simple getting started guide on how to use
rust_xlsxwriterin a project and write a Hello World example. - Tutorial: A larger example of using
rust_xlsxwriterto write some expense data to a spreadsheet. - Cookbook.
- Getting started: A simple getting started guide on how to use
- The rust_xlsxwriter crate.
- The rust_xlsxwriter API docs at docs.rs.
- The rust_xlsxwriter repository.
- Roadmap of planned features.