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!;
}