| Crates.io | xlsxwriter |
| lib.rs | xlsxwriter |
| version | 0.6.1 |
| created_at | 2019-11-17 16:05:21.831359+00 |
| updated_at | 2024-06-22 07:25:56.020862+00 |
| description | Write xlsx file with number, formula, string, formatting, autofilter, merged cells, data validation and more. |
| homepage | https://github.com/informationsea/xlsxwriter-rs |
| repository | https://github.com/informationsea/xlsxwriter-rs |
| max_upload_size | |
| id | 182023 |
| size | 344,049 |
Rust binding of libxlsxwriter
Coming soon
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.LIBCLANG_PATH as C:\Program Files\LLVM\bin
let workbook = Workbook::new("simple1.xlsx")?;
let mut sheet1 = workbook.add_worksheet(None)?;
sheet1.write_string(0, 0, "Red text", Some(&Format::new().set_font_color(FormatColor::Red)))?;
sheet1.write_number(0, 1, 20., None)?;
sheet1.write_formula_num(1, 0, "=10+B1", None, 30.)?;
sheet1.write_url(
1,
1,
"https://github.com/informationsea/xlsxwriter-rs",
Some(&Format::new().set_font_color(FormatColor::Blue).set_underline(FormatUnderline::Single)),
)?;
sheet1.merge_range(2, 0, 3, 2, "Hello, world", Some(
&Format::new().set_font_color(FormatColor::Green).set_align(FormatAlignment::CenterAcross)
.set_vertical_align(FormatVerticalAlignment::VerticalCenter)))?;
sheet1.set_selection(1, 0, 1, 2);
sheet1.set_tab_color(FormatColor::Cyan);
workbook.close()?;
You can explore this example locally following the steps below:
git submodule update --init --recursive
cargo run --example hello_spreadsheetYou should then see the example in target/simple1.xlsx. Enjoy!