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