Closed shijunti19 closed 4 months ago
@shijunti19 Using write_with_password will do what you want.
let path = std::path::Path::new("./tests/test_files/aaa.xlsx");
let mut book = umya_spreadsheet::reader::xlsx::read(path).unwrap();
let path = std::path::Path::new("./tests/result_files/bbb_password.xlsx");
let _ = umya_spreadsheet::writer::xlsx::write_with_password(&book, path, "password");
set_workbook_password corresponds to the function shown in the following figure in Excel.
The set_workbook_password method seems to be invalid, and the generated document remains unchanged book_lock.xlsx
office2019
If the settings are normal, it should be like this: