BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
cwb.excelRWWB = wb; //added
return cwb;
>cwb.excelRWWB = wb; //added
>return cwb;
>
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");
}