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 {
saving = true;
final SerializeWorkbook serializer = SerializeWorkbook(this);
List<int>? bytes;
await serializer.saveInternalAsync().then((_) async {
bytes = ZipEncoder().encode(archive);
saving = false;
});
return bytes!;
}