Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(filter): fix the issue when importing Excel files with hidden rows filtered (#6076)

wpxp1234563efa1fe1742a
diff --git a/packages/sheets-filter/src/models/filter-model.ts b/packages/sheets-filter/src/models/filter-model.ts
index 3f02bf5615..9dfba82308 100644
--- a/packages/sheets-filter/src/models/filter-model.ts
+++ b/packages/sheets-filter/src/models/filter-model.ts
@@ -115,6 +115,10 @@ export class FilterModel extends Disposable {
if (autoFilter.cachedFilteredOut) {
this._alreadyFilteredOutRows = new Set(autoFilter.cachedFilteredOut);
this._emit();
+ } else if (autoFilter.filterColumns && autoFilter.filterColumns.length > 0) {
+ // If there is no cached filtered out rows, we need to re-calc all columns.
+ this._reCalcAllColumns();
+ this._emit();
}
this._emitHasCriteria();