|
|
|
| | | |
| |
Essential Calculate allows you to add extensive formula support to your application. Easily parse and evaluate formulas with automatic recalculation of dependent formulas in their natural order. The use-cases for Essential Calculate can be summarized under the following three scenarios: Case 1:Ideal for situations where you want to let end users specify custom formulas and parse and evaluate them dynamically during run time.In the engine, enter any number of variable names or value pairs and then enter one or more variable names or formula pairs referencing other variables. Then retrieve the evaluated formula values using indexers.
Example:
//1) Instantiate a CalcQuick objectcalculator = new CalcQuick();
//2) Add variable-name/value pairs and variable-name/formula pairs to the engine:/br>calculator["A"] = "12";calculator["B"] = "3";calculator["C"] = "= [A] + 2 * [B]";
//3) Mark as dirty so any formulas will be recomputed calculator.SetDirty();
//4) Retrieve computed values: double computedValue = Double.Parse(calculator["C"]);
Case 2: Create virtual spreadsheets by implementing a simple spreadsheet interface, called ICalcData.public interface ICalcData
{
object GetValueRowCol(int row, int col);
void SetValueRowCol(object value, int row, int col);
event ValueChangedEventHandler ValueChanged;
void WireParentObject(); } Populate this spreadsheet implementation with data from a database or fill it with formulas representing your custom business rules.Bind this virtual spreadsheet to CalcEngine, which will automatically parse and evaluate all formulas in the spreadsheet cells, including their dependencies. CalcEngine will also automatically recalculate formula cells when the dependant cell's values change—just like Excel. You can also bind multiple spreadsheets to the engine and include cross-spreadsheet references in the formulas.Case 3:Use Essential Calculate to open Excel (.xls) files in memory, add session-specific values to input cells, and evaluate formula values in the output cells; all this without using Microsoft Excel (Essential XlsIO is used in the background).
The light-weight, high-performance Essential Calculate engine is a great alternative to using Microsoft Excel Automation on the server side to perform such Excel manipulations.
|
|
|
|
|
|
|
|
|
|
|

|
|
Extensive Function Library
The CalcDataGrid class in Essential Calculate gives you easy way to add calculation support to a Windows Forms DataGrid.
| |
|
|
|
|
|
|
|
|