CellsException due to line break inside cell spanning multiple rows

While using Aspose.Cells to convert HTML to XLSX, the constructor of class Workbook threw the following exception:

An unhandled exception of type ‘Aspose.Cells.CellsException’ occurred in Aspose.Cells.dll

Additional information: Cells in range A2:A3 cannot be merged because cells in range A1:A2 have already been merged.
My original HTML input was quite big, but I managed to narrow it down to this:

Test




One
Two




The problem does not occur if you make any of the following changes:
  1. Replace
    by
    (i.e. put a space in front of the slash).
  2. Remove the rowspan (or make it 1).
  3. Remove the surrounding
    .The first workaround works for me, so nothing urgent here. But I still consider this to be a bug.

Hi,


Thanks for your posting and using Aspose.Cells.

We have tested this issue with the following sample code using your sample html with the latest version: Aspose.Cells for .NET 16.11.0 and were able to observe the exception as per your description. We also found that if we do the changes as you have described, exception does not occur.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-44907 - CellsException due to line break inside cell spanning multiple rows

C#
Workbook wb = new Workbook(dirPath + “a.htm”);

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSNET-44907 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Hi,

Thanks for using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v16.11.6 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-44907) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Thanks for the fast fix; sorry I didn’t have time to test it earlier. The fix is a big improvement for cells with a rowspan, but I just discovered another (possibly related) problem with cells without a rowspan (or rowspan = 1). I don’t think this problem was introduced by aforementioned bugfix; I can reproduce the same problem in an earlier version (16.11.0). I cannot reproduce the problem in 8.9.0, though, so I suppose it was introduced earlier this year.

Anyway, I figured you’d like me to make a separate post for it:
Cell value truncated at line break when importing HTML

Hi Ruud,


First of all, thank you for creating a new thread for the new issues. It is always appropriate to create new threads for distinct inquires for easy management of the requests. Anyway, we have evaluated the cases in your new thread and have logged tickets against distinct problems. We will soon further analyze those scenarios and share our feedback on the relevant thread.