Search code examples
c#.netexcelexcel-dna

How can I get a formulas array?


It's possible to get an array of values for a multi-cell selection:

var reference = new ExcelReference(i1, i2, j1, j2);
var vals = reference.GetValue();

However, a call to XlCall.Excel(XlCall.xlfGetFormula) return a single cell's formula only. Is there any way to get an array of formulas for all the cells in the selection?


Solution

  • Excel does not have a way to get the formula for more than one cell at once.