umya-spreadsheet icon indicating copy to clipboard operation
umya-spreadsheet copied to clipboard

Feature request: a way to force formula recalculation in LibreOffice

Open Expurple opened this issue 1 year ago • 3 comments

I would like to see something like worksheet.set_formula_result_default("") from rust_xlsxwriter. Maybe this feature already exists, but I couldn't find it in the documentation.

Expurple avatar Jun 25 '24 10:06 Expurple

@Expurple Yes, sir. It will probably be easy to implement and will be addressed in the next version update.

MathNya avatar Jun 26 '24 00:06 MathNya

Oh, sorry. We have released the latest version, but just now we realized that it is not supported here. We will fix it soon.

MathNya avatar Jul 06 '24 01:07 MathNya

Oh, sorry. We have released the latest version, but just now we realized that it is not supported here. We will fix it soon.

@MathNya, kindly also update github releases for newer version

agentjill avatar Jul 06 '24 02:07 agentjill

@Expurple The latest version is now available. Please use this function.

let path = std::path::Path::new("./tests/test_files/issue_201.xlsx");
let mut book = umya_spreadsheet::reader::xlsx::read(path).unwrap();
let mut cell = book.get_sheet_mut(&0).unwrap().get_cell_mut("B1");
cell.set_formula_result_default("");

MathNya avatar Jul 09 '24 00:07 MathNya

Technically, this is equivalent to per-cell set_formula_result, rather than global per-sheet set_formula_result_default. But this should be enough for my use case, thank you. I'll close the issue and let someone else reopen it or open a new one, if they really need a global default.

Expurple avatar Jul 09 '24 08:07 Expurple