How to tell whether a formula in a cell is a regular formula vs. an array formula?

My code needs to change the contents of some formulas in a worksheet. In order to know whether to use the Cell.Formula or Cell.SetArrayFormula to make these changes, I need to be able to determine whether the existing formula is a regular formula or an array formula.

I haven't been able to find out how to determine this. Is it possible?


Thanks for your inquiry.

Well, there no such API available to find out if the formula is an array formula or a simple/conventional formula. You are to find out himself using Cell.Formula attribute to get the formula (if it is an array formula or standard formula). We will find out if we can support this, we will get back to you soon. Anyways, your issue has been logged into our issue tracking system with issue id: CELLSNET-11242.

Thank you.


Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have added the following methods as per your need:

Cell.IsInArray: whether the cell formula is array formula.
Cell.IsArrayHeader: the cell’s formula is array formula and it is the first cell of the array.
Cell.GetArrayRange: Gets the array range if the cell’s formula is an array formula.

Thank You & Best Regards,

The IsInArray method is just what I needed, and it works great.

Thanks so much for your timely response!

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

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