New to Kendo UI for jQuery? Start a free 30-day trial
About
Accessing Computed Cell Values in Formula Cells Using Kendo UI for jQuery Spreadsheet
Updated on Oct 13, 2025
Environment
| Product | Spreadsheet for Kendo UI for jQuery |
| Version | 2025.3.1002 |
Description
I want to retrieve the computed value of a cell containing a formula in Kendo UI for jQuery Spreadsheet. For example, a formula cell that calculates the sum of a column may return null when attempting to access its value. This occurs because the Spreadsheet does not calculate formulas immediately or during certain operations, like sheet.batch().
This knowledge base article also answers the following questions:
- How to get the computed value of formula cells in Kendo UI Spreadsheet?
- Why does
.value()return null for formula cells in Kendo UI Spreadsheet? - How to access cell values after batch operations in Kendo UI Spreadsheet?
Solution
To retrieve the computed value of a formula cell, follow these steps:
- If using a batch operation, pass
{ recalc: true }as an option to ensure formulas are recalculated after the batch completes. - Access the cell value only after the batch operation has finished. Formula recalculation occurs after the batch, not during it.
Example of Accessing Computed Values After Batch
javascript
sheet.batch(function() {
// Perform changes in the Spreadsheet
}, { recalc: true });
// Access the computed value after the batch completes
var computedValue = sheet.range("U10").value();
console.log(computedValue); // Logs the computed value
Important Notes
- Accessing formula values inside
sheet.batch()will always return the value before recalculation. - Use the Spreadsheet's
changeevent to trigger logic after recalculation if needed. - To access values from formulas on non-active sheets, activate the relevant sheet first.
About .recalc() and .refresh()
.recalc()is not a public API method and should not be used..refresh()redraws the UI but does not trigger formula recalculation.
Script Loading Issues
Ensure proper script loading to avoid errors:
- Do not use
type="module"for Kendo UI files. Use:html<script src="lib/kendo-telerik/js/kendo.all.min.js"></script> - Load
telerik-license.jsafter all Kendo UI scripts.