I want to see information such as:
- [A1:A20]
- Data in column A
after receiving the Excel information through the 'file_picker 5.2.5' and 'excel 2.0.1' package in flutter web.
I used this code And I could print "sheetName" in last:
void _giveExcel() async {
FilePickerResult? excelFile = await FilePicker.platform.pickFiles(
type: FileType.custom,
allowedExtensions: ['xlsx'],
allowMultiple: false,
);
if (excelFile != null) {
var bytes = excelFile .files.single.bytes;
var excel = Excel.decodeBytes(bytes as List<int>);
for (var table in excel.tables.keys) {
print(excel.tables[table]?.sheetName);
}
}
}
Thank you for telling me how to find this information.