Undocumented API Change for Cells 7.4.3: GetMergedRange on a cell in a range by itself returns null

With Aspose Cells 7.4.3 another bug is introduced which makes Aspose.Cells
unusable for us. Please see the attachment “AsposeTests - E.txt”.
It’s a very simple test. I hope that my writing tests for you is helpful
and improves the quality of the released code so that these bugs don’t
happen again. :slight_smile:

for speed, the body of the test is:

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells.Merge(0, 0, 1, 1);

Cell currentCell = worksheet.Cells[0, 0];
Range cellRange = currentCell.GetMergedRange();

if (cellRange == null)
{
Assert.Fail(“Merged cell range is null. Wasn’t null prior to version Aspose Cells 7.4.3.”);
}



please let me know as quickly as you can about this.

Hi,

Thanks for your posting and using Aspose.Cells.

We have noticed the issue with your code. The range is null.We have logged this issue in our database. We will look into it and resolve it. 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-41623.

Hi,

Thanks for your posting and using Aspose.Cells.

It’s forbidden to merge a cell in MS Excel. Aspose.Cells works as MS
Excel since 7.4.3.

Please check the following code:

C#


Workbook workbook = new Workbook();

Worksheet worksheet = workbook.Worksheets[0];


worksheet.Cells.Merge(0, 0, 1, 2);


Cell currentCell = worksheet.Cells[0, 0];

Range cellRange = currentCell.GetMergedRange();



so, going forward this is the way this will work? i want to make sure
the Aspose API will not be changing again before i make the changes to
my code to support your API change.

Hi,

Thanks for your posting and using Aspose.Cells.

Yes, you can use these API in your work, these are officially supported and are not going to change anytime soon. So, you can safely use them without worrying.