[]
DsExcel Java provides you with comprehensive computing features via a built-in calculation engine that is capable of performing even the most complex operations on the data in the spreadsheets. This calculation engine can be integrated with spreadsheets to achieve the desired results with complete accuracy and within fraction of seconds.
Some of the advantages of using calculation engine are shared below:
Bulk Data Analysis:
Involves significantly less programming effort to handle complex spreadsheet calculations and display accurate results for effective analysis of tons of data.
Ease of Use:
Easy-to-configure calculation engine with the ability to quickly fetch data from cells within the spreadsheets and perform accurate calculations on the data.
Saves Time and Efforts:
Pre-defined functions and built-in methods to save implementation time and minimize programming efforts.
In order to enable the calculation engine, refer to the following example code.
// Enable the calculation engine
worksheet.getRange("A1").setValue(1);
worksheet.getRange("A2").setFormula("=A1");
workbook.setEnableCalculation(true);
// Calculates formula while getting values. A2's value is 1
Object value1 = worksheet.getRange("A2").getValue();
In order to disable calculation engine, refer to the following example code.
// Disable the calculation engine
workbook.setEnableCalculation(false);
worksheet.getRange("A1").setValue(1);
worksheet.getRange("A2").setFormula("=A1");
// A2's value is zero
Object value = worksheet.getRange("A2").getValue();