final response = await get(
Uri.parse("https://servicebus2.caixa.gov.br/portaldeloterias/api/resultados/download?modalidade=Mais-Milionaria"),
);
if (response.statusCode == 200) {
final Excel excel = Excel.decodeBytes(response.bodyBytes);
for (var table in excel.tables.keys) {
print(table); // Sheet Name
}
}
It throws the following exception when trying to print the table name:
Damaged Excel file: Corrupted Excel file.
I can't read this xlsx file, obtained from an http request: https://servicebus2.caixa.gov.br/portaldeloterias/api/resultados/download?modalidade=Mais-Milionaria
Example code:
It throws the following exception when trying to print the table name:
Damaged Excel file: Corrupted Excel file.