Excel.decodeBytes constructor
Decodes an .xlsx file from a byte list.
Implementation
factory Excel.decodeBytes(List<int> data) {
final Archive archive;
try {
archive = ZipDecoder().decodeBytes(data);
} catch (e) {
throw ExcelArchiveException(
'Not a valid .xlsx file: the data could not be read as a ZIP archive.',
cause: e,
);
}
return _newExcel(archive);
}