diff --git a/src/officecli/Handlers/Excel/ExcelHandler.Import.cs b/src/officecli/Handlers/Excel/ExcelHandler.Import.cs index 6608a6a42..14a6f84d4 100644 --- a/src/officecli/Handlers/Excel/ExcelHandler.Import.cs +++ b/src/officecli/Handlers/Excel/ExcelHandler.Import.cs @@ -237,6 +237,9 @@ public string Import(string parentPath, string csvContent, char delimiter, bool sheetView.InsertAt(pane, 0); } + // Mark modified so Dispose flushes the import (the !Modified + // byte-preserving discard path would otherwise drop it). + Modified = true; SaveWorksheet(worksheet); return $"Imported {rows.Count} rows x {maxCols} cols into /{sheetName} starting at {startCell.ToUpperInvariant()}"; }