saveAsStream method
Saves workbook as stream.
Workbook workbook = new Workbook();
Worksheet sheet = workbook.worksheets[0];
List<int> bytes = workbook.saveAsStream();
File('ExcelSave.xlsx').writeAsBytes(bytes);
workbook.dispose();
Implementation
List<int> saveAsStream() {
isSaving = true;
final SerializeWorkbook serializer = SerializeWorkbook(this);
serializer.saveInternal();
final List<int>? bytes = ZipEncoder().encode(archive);
isSaving = false;
return bytes!;
}