fix(engine): set default workbook author (#2448)

This commit is contained in:
AnhNgoo
2026-10-27 16:10:46 +07:00
parent 45f5ab18e4
commit fa6ccc6ae5
+1
View File
@@ -547,6 +547,7 @@ impl Session {
pub fn new_workbook(&mut self) -> usize {
let n = (1..).find(|n| !self.docs.iter().any(|d| d.title == format!("Book{n}") && d.path.is_none())).unwrap_or(1);
let mut wb = Workbook::new();
wb.props.author = self.prefs.user_name.clone();
for _ in 1..self.prefs.sheets_in_new_workbook.clamp(1, 255) {
let name = wb.next_sheet_name();
wb.sheets.push(Arc::new(gridcraft_model::Sheet::new(name)));