Closed sunnyboy00 closed 1 year ago
I only change one data of the table, but it takes a long time to save
Thank you for your report. Does Sheet1 of the file that is causing the problem contain a large amount of data? If so, lazy_read will not be very effective. It takes a long time to read and save the file.
In the case of lazy_read, it is effective when editing a sheet that does not contain a large amount of data.
You can refer to the implementation of golang, which read and write file fast
github.com/xuri/excelize
Thank you very much. That sounds like a good hint about speeding up the process. I will refer to it.
The write process has been reviewed and is now 4 times faster. Please try the latest version.
It solved the problem perfectly.
Thank you for your work.
let path = std::path::Path::new("./1.xlsx"); let mut book = umya_spreadsheet::reader::xlsx::lazy_read(path).unwrap(); let sheet1=book.get_sheet_by_name_mut("Sheet1").unwrap(); sheet1.get_cell_by_column_and_row_mut(&1, &1).set_value("value");
//save let _ = umya_spreadsheet::writer::xlsx::write(&book, path).expect("save error!");