RedNeath / ExcelFormulaCalculationEngine

A pure C library that works as an interface to compute Excel formulas, given a data context. It is a recreation of Excel's language calculation engine, with an extra level of abstraction to separate it from the sheet context; allowing lightweight integration within smaller systems.
MIT License
1 stars 0 forks source link

Calculation input context #1

Closed RedNeath closed 4 months ago

RedNeath commented 5 months ago

Creating the structure to handle the use of variables (equivalent of the value of a cell in a spreadsheet) in the calculation.

NOTE: Those variables can be of the following types (may be extended in the future)

  • Number (with or without decimals)
  • Rate (to handle percentages)
  • String (formats not supported, a formatted string will remain formatted)
  • Date (as UNIX timestamp, basically a big number)

This structure will be a "data transfer" structure (not quite a DTO, as C is not object oriented, but the principle remains the same). That means there won't be any logic in the data from this structure, as it only aims at passing input data to the programme.

Its name should be formula_variable. A context is formed of n variables, which means it in fact is an array of formula_variables.

It should contain the following:

RedNeath commented 5 months ago

Not up-to-date, see README.md

RedNeath commented 5 months ago

Base done. => Handling functions still to be done

RedNeath commented 5 months ago

See incoherences with the main readme (and update what needs to be updated, especially the code blocks presenting examples).

To check:

The rest is mostly correct, if the code works

RedNeath commented 4 months ago

Almost done testing, some tests need a bit more work to really ensure the functions works as described in their documentation.