justkawal / excel

Excel Library for Flutter and Dart - https://pub.dev/packages/excel
MIT License
403 stars 212 forks source link

Bug reading SpannedItems as empty #341

Open openXu opened 3 months ago

openXu commented 3 months ago

There are several merged cells in my Excel file, but it reads as empty。 Version: excel: ^4.0.3

企业微信截图_17124568557905

Sample excel file : testMerge.xlsx

Code:

    var bytes = File(file).readAsBytesSync();
    var excel = Excel.decodeBytes(bytes);
    for (var table in excel.tables.keys) {
      Sheet? sheet = excel.tables[table];
      if(sheet == null){
        continue;
      }
      List<String> spannedCells = sheet.spannedItems;
      print("   merge info :$spannedCells");     //!!! print : []
   }
AlexanderJohr commented 3 months ago

PR https://github.com/justkawal/excel/pull/343 will fix this error.

openXu commented 2 months ago

I see that the code in the repository has fixed this issue, but a new version of the plugin has not been released yet. Can you update the plugin? thanks