I'm a student of Economic Sciences and i'm making a Program for my Final Paper about stock market. But, when i try to run my code in C# using EPPLUS, it doesn't working well. The STOCKHISTORY Formula isn't calculating and "@" is being inserted before the formula.
string Equity = "PETR4", FDate = "01/01/2019", LDate = "01/01/2022";
using (ExcelPackage Excel = new ExcelPackage(new FileInfo("Stock.xlsx")))
{
var Plan = Excel.Workbook.Worksheets.Add("Base");
Plan.Cells[1, 1].Value = FDate;
Plan.Cells[1, 2].Value = LDate;
Plan.Cells[1, 3].Value = Equity;
Plan.Cells[2, 1].Formula = $"STOCKHISTORY(C1, A1, B1)";
Excel.Workbook.Calculate();
Excel.Save();
Excel.Dispose();
}