We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Removing Formula's after calculation


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


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

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


Hope, this helps a bit.

Thanks , it works.


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.