xlsxwriter-rs
Rust binding of libxlsxwriter
Supported Features
- 100% compatible Excel XLSX files.
- Full Excel formatting.
- Merged cells.
- Autofilters.
- Data validation and drop down lists.
- Worksheet PNG/JPEG images.
Coming soon
- Charts.
Feature Flags
no-md5: Disable image de-duplication and remove md5 function. (See upstream document to learn more).use-openssl-md5: Use OpenSSL implementation of md5 function. (See upstream document to learn more).system-zlib: Use system zlib instead of included zlib.
Build requirements
- LLVM and clang
How to build on windows
- Install Visual Studio
- Install LLVM
- Set environment variable
LIBCLANG_PATHasC:\Program Files\LLVM\bin - Run build
Example

let workbook = new?;
let mut sheet1 = workbook.add_worksheet?;
sheet1.write_string?;
sheet1.write_number?;
sheet1.write_formula_num?;
sheet1.write_url?;
sheet1.merge_range?;
sheet1.set_selection;
sheet1.set_tab_color;
workbook.close?;
Run Example with Cargo
You can explore this example locally following the steps below:
- Install LLVM and set LIBCLANG_PATH if you are using windows. (see bindgen doc for details)
- clone or fork this repository
git submodule update --init --recursive- The above command downloads the required C library so we can compile
cargo run --example hello_spreadsheet
You should then see the example in target/simple1.xlsx. Enjoy!