Removing Formula's after calculation

Hi,

Is there a way to remove the formula’s from a worksheet post formula calculation by retaining the formula calculated values ?

@santhoshsas,

Yes, it is possible. Please try using Worksheet.Cells.RemoveFormulas method for your needs. See the following sample code for your reference:
e.g
Sample code:

string filePath = @"e:\test2\Template1.xlsx";
            Workbook _wb = new Workbook(filePath);
            _wb.Settings.CreateCalcChain = false;
            Worksheet worksheet = _wb.Worksheets["Sheet1"];
            _wb.CalculateFormula();
            Cells cells = worksheet.Cells;
            cells.RemoveFormulas();

            _wb.Save("e:\\test2\\outTemplate1.xlsx"); 

Hope, this helps a bit.

Thanks , it works.

@santhoshsas,

Good to know that the suggested code works for your needs. Feel free to contact us any time if you need further help or have some other queries or comments, we will be happy to assist you soon.