
Can I use excel operators as averande and variance with ClosedXML?



There is no AVERANDE function in excel and to get the variance you must use one of the VAR functions. If you meant to get the average you have to use one of the AVERAGE functions. You have to input the formulas the same way you would type them in Excel.
See
Using Formulas and
Using Tables



Thanks for the answer, I'm sorry for the mistake.
However I tried to input the formulas the same way you would type them in Excel but in excel cell appears
When I click on the cell appears the correct formula. Where am I doing wrong?
Thanks for your time
Ruggiero



Try the following:
var wb = new XLWorkbook();
var ws = wb.Worksheets.Add("Sheet1");
ws.Cell(1, 1).SetValue(1)
.CellBelow().SetValue(2)
.CellBelow().SetValue(3)
.CellBelow().FormulaA1 = "=AVERAGE(A1:A3)";
wb.SaveAs("Example.xlsx");



I realized the error. I was writing the operator in Italian (e.g. "= MEDIA (...)")
thank you very much
Ruggiero

