Copy & paste as values

Hi, is there a way to copy a cell that has a formula in it and paste the value without the formula back into the same cell? Thanks!

Hi,

Thanks for considering Aspose.

Please consult the following code for your need. It will calculate the formula of A1 cell and paste only the resultant value into A2 cell, Kindly check the output file(attached):

Workbook workbook = new Workbook();

Worksheet worksheet = workbook.Worksheets[0];

Cells cells = worksheet.Cells;

cells["A1"].Formula = "=SUM(4,5)";

workbook.CalculateFormula(true);

cells["A2"].PutValue(cells["A1"].IntValue);

workbook.Save("d:\\test\\copyformulavalue.xls");

Thank you

That works great! Thanks so much!