DsExcel offers exceptional computing features with its built-in calculation engine that is capable of performing even the most complex operations on the data in the spreadsheets with complete accuracy and within fraction of seconds. This calculation engine can be integrated with spreadsheets to achieve the desired results. Some of the advantages of using a calculation engine are as follows:
Refer to the following example code to enable calculation engine.
C# |
Copy Code |
---|---|
//enable calc engine. worksheet2.Range["A1"].Value = 1; worksheet2.Range["A2"].Formula = "=A1"; workbook.EnableCalculation = true; //calc formula when get value. A2's value is 1d. var value1 = worksheet2.Range["A2"].Value; |
Refer to the following example code to disable calculation engine.
C# |
Copy Code |
---|---|
//disable calc engine. workbook.EnableCalculation = false; worksheet.Range["A1"].Value = 1; worksheet.Range["A2"].Formula = "=A1"; //A2's value is 0. var value = worksheet.Range["A2"].Value; |