This is by design. If you want to write out the formulas, then you will have to reset them in the worksheets. You can do this by adding this method to the ExcelRWCalcWorkbook class.
public void ResetFormulas()
{
this.Engine.CalculatingSuspended = true;
foreach(ExcelRWCalcSheet sheet in this.calcSheets)
{
for(int row = 1; row <= sheet.RowCount; ++row)
{
for(int col = 1; col <= sheet.ColCount; ++col)
{
//object o = sheet.GetValueRowCol(row, col);
object o = this.Engine.GetFormulaRowCol(sheet, row, col);
if(o != null)
{
string s2 = o.ToString();
if(s2.Length > 0 && s2[0] == ''='')
sheet.SetValueRowCol(s2, row, col);
}
}
}
this.Engine.CalculatingSuspended = false;
}
}
You can then use this code to save the formulas.
private void button3_Click(object sender, System.EventArgs e)
{
this.calcWB.ResetFormulas();
this.calcWB.excelRWWB.SaveAs("test.xls");
}