excel icon indicating copy to clipboard operation
excel copied to clipboard

Bug reading SpannedItems as empty

Open openXu opened this issue 10 months ago • 2 comments

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 : []
   }

openXu avatar Apr 07 '24 02:04 openXu

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

AlexanderJohr avatar Apr 07 '24 15:04 AlexanderJohr

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

openXu avatar May 17 '24 08:05 openXu