We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Array formula + SortNames


My Excel workbook contains named ranges and some array formulas (like "{=Test1*Test2}"). The array formulas are made with the named ranges. I open the workbook with AsPose.Cells, add some named ranges, then I use the function SortNames and save the workbook. After this operation the array formulas are wrong and reference bad named ranges.

I use Aspose.Cells.dll V4.4.0.5, here is a sample code I have made to reproduce the issue and a demo workbook is attached:

_workbook = new Workbook();


Worksheet worksheet = _workbook.Worksheets[_worksheet_codename];

Cell cell1 = worksheet.Cells[1,1];

Range range1 = worksheet.Cells.CreateRange(cell1.Row, cell1.Column, 1, 1);

range1.Name = "ASCell1";

Cell cell2 = worksheet.Cells[2, 2];

Range range2 = worksheet.Cells.CreateRange(cell2.Row, cell2.Column, 1, 1);

range2.Name = "ASCell2";



If I don't use SortNames the array formulas are good. But in my application, I really need to use SortNames because I create a large amout of named range.

Please, can you fix this issue, it is critical for us.

Thank you,


Hi Gregory,

Thanks for the template file.

Yes, we found the problem, we will fix it soon.

Thank you.

Please try this attached fix for this issue.

The fix works very well.

Thank you