I have a function ApplyFormulas() that will obviously apply formulas like so
detailWs.Range(companyModel.RevenueFormulaRangeDollars).FormulaR1C1 = companyModel.RevenueFormulaDollars;
However Now I need to copy that range and paste it in the same spot so the values are real and not just formula references.
I am able to do this in VBA with excel interop but I am utilizing ClosedXML. Does anyone know of a way to do this? I tried CopyTo() but there is no paste special etc.
I also attempted
detailWs.Range(companyModel.NoChargeFormulaRangePercent).Value = detailWs.Range(companyModel.NoChargeFormulaRangePercent).Value;
but im getting a property or indexer cant be used because it lacks a getter but from what I can tell both have a get; set; property.
I've tried a couple for things and still not working..
var test = detailWs.Range(companyModel.NoChargeFormulaRangePercent).CellsUsed();
foreach(var c in test)
{
c.Value = c.Value.ToString();
}