Added missing Autofilter assignment for DataTable export (#610)

* Added missing Autofilter assignment for DataTable export

* Fixed autofilter being written before EndSheetData
This commit is contained in:
Timon Arendt 2024-05-27 17:35:03 +02:00 committed by GitHub
parent c79c64d478
commit 0c878b1542
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -328,6 +328,12 @@ namespace MiniExcelLibs.OpenXml
}
await writer.WriteAsync(WorksheetXml.EndSheetData);
if (_configuration.AutoFilter)
{
await writer.WriteAsync(WorksheetXml.Autofilter(GetDimensionRef(maxRowIndex, maxColumnIndex)));
}
await writer.WriteAsync(WorksheetXml.EndWorksheet);
}

View File

@ -364,6 +364,12 @@ namespace MiniExcelLibs.OpenXml
}
writer.Write(WorksheetXml.EndSheetData);
if (_configuration.AutoFilter)
{
writer.Write(WorksheetXml.Autofilter(GetDimensionRef(maxRowIndex, maxColumnIndex)));
}
writer.Write(WorksheetXml.EndWorksheet);
}