Skip to main content

CalcBuilder Tutorial

Calc Builder 6: the spreadsheet engine

If your logic already lives in an Excel workbook, you do not have to re-implement it in PHP. The Spreadsheet screen lets Calc Builder run the workbook for you.

Spreadsheet screen

Steps

  1. Prepare an .xlsx file with clearly identified input cells and output cells (formulas).
  2. Upload it on the Spreadsheet screen.
  3. Map form fields to input cells — e.g. field loan_amountSheet1!B2.
  4. Map output cells to variables — e.g. Sheet1!B10$monthly.

When the visitor calculates, Calc Builder writes the inputs into the workbook, recalculates the formulas and reads the outputs back. Those variables are then available in the PHP code (via the //[EXCEL] marker) and in the Exit Layout as ##monthly##.

You can mix approaches: let the spreadsheet do the heavy maths and use a few lines of PHP to format or to build an HTML summary.

See it end to end in the worked example a loan calculator with an amortization schedule (Excel spreadsheet) — and compare it with the PHP-code version of the same calculator.

...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!