MiniExcel
MiniExcel copied to clipboard
Freeze panes missing async implementation
Excel Type
- [x] XLSX
- [ ] XLSM
- [ ] CSV
- [ ] OTHER
MiniExcel Version
1.34.2
Description
PR #620 implemented the ability to freeze rows and columns. This feature seems to be missing in the async implementation (ExcelOpenXmlSheetWriter.Async.cs).
Using the configuration with the MemoryStream.SaveAsAsync() method doesn't freeze any rows or columns:
var stream = new MemoryStream();
var lines = new List<DigitaleWoonstcontroleExcelLine>();
foreach (var row in rows)
{
lines.AddRange(CreateRowObject(row));
}
var config = new OpenXmlConfiguration()
{
FreezeRowCount = 3,
FreezeColumnCount = 3
};
await stream.SaveAsAsync(lines, printHeader: true, sheetName: SheetName, ExcelType.XLSX, config, cancellationToken: cancellationToken);
stream.Seek(0, SeekOrigin.Begin);
return stream;