Closed Christoph-AK closed 1 year ago
I would love to be able to write bools directly with
sheet.write(row, col, true)
.
I 100% meant to do that but somehow forgot. I've pushed an update to main with support added.
Excel should have some kind of representation for logic, maybe just the text TRUE and FALSE, but potentially some better values or cell types.
It has a boolean TRUE/FALSE
type which can be written with worksheet.write_boolean()
(link) and now write()
.
Thanks for the prompt.
Example:
use rust_xlsxwriter::{Workbook, XlsxError};
fn main() -> Result<(), XlsxError> {
let mut workbook = Workbook::new();
// Add a worksheet to the workbook.
let worksheet = workbook.add_worksheet();
worksheet.write(0, 0, true)?;
worksheet.write(1, 0, false)?;
workbook.save("worksheet.xlsx")?;
Ok(())
}
Output:
Perfect, thank you so much!
Feature Request
Hi and thanks for the crate!
I'm currently writing an sql export tool from MSSQL to xlsx.
I would love to be able to write bools directly with
sheet.write(row, col, true)
.Excel should have some kind of representation for logic, maybe just the text TRUE and FALSE, but potentially some better values or cell types.