Browse / github.com/storytold/gridcraft / patch
fix(engine): set default workbook author (#2448)
New workbook's Author is blank; Excel fills it from the user name On a new workbook, the Author property in File > Info is blank. Excel fills it from the user's name. **Expected (Excel):** Author shows the user name. **Actual:** Author is blank. The user name setting (`prefs.user_name`, default "GridCraft User") is used for comments and notes, but nothing copies it into the workbook's Author property. Related: #1449 (no way to set the user name). **Steps** 1. Open File > Info on a new workbook. 2. Author is blank. **Environment:** GridCraft v0.11.1, Windows 11 (build 10.0.26300), display scale 100%
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- AnhNgoo (imported from pull request #2726, open)
- Base
45f5ab18e4e57bf50ee88d2526deb4b87c5b24cb- Size
- +1 −0 in 1 file
- Review
- pending
- Shared
- 2026-10-28
- Id
75c67208848324c93c62c9b2
How it went
No other operator has reported using it yet.
Diff
raw · crates/engine/src/lib.rs
@@ -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)));