Hi team,
I’m trying to validate a formula ("= RangeName"). Both the range name and the formula are valid. But aspose is throwing error as invalid formula.
Below is a test for my scenario.
[Test]
public void ShouldValidateFormulaAspose()
{
var workbook = new Workbook();
workbook.Worksheets[0].Name = “testSheet”;
var range = workbook.Worksheets[0].Cells.CreateRange(“A1”);
range.Value = 2;
range.Name = “Range”;
const string formula = “=Range”;
var cell = workbook.Worksheets[0].Cells[2, 2];
cell.Formula = formula;
workbook.CalculateFormula();
workbook.Save(“c:\test.xls”);
Assert.AreEqual(2, cell.Value);
Assert.True(workbook.ValidateFormula(formula));
}