diff --git a/docs/guide/basic-operations.md b/docs/guide/basic-operations.md index bd9400a06..06674f57f 100644 --- a/docs/guide/basic-operations.md +++ b/docs/guide/basic-operations.md @@ -380,11 +380,11 @@ const hf = HyperFormula.buildFromArray([ ['=COUNTBLANK(A1:A3)'], ]); -// Insert an empty row between the row 0 and the row 1 +// insert an empty row between the row 0 and the row 1 const changes = hf.addRows(0, [1, 1]); console.log(hf.getSheetSerialized(0)); -// Sheet after adding the row: +// sheet after adding the row: // [ // [0], // [], @@ -394,7 +394,7 @@ console.log(hf.getSheetSerialized(0)); // ] console.log(changes); -// Changes include only the COUNTBLANK cell: +// changes include only the COUNTBLANK cell: // [{ // address: { sheet: 0, row: 4, col: 0 }, // newValue: 1, diff --git a/docs/guide/batch-operations.md b/docs/guide/batch-operations.md index 8c23ef62e..98fc5c39c 100644 --- a/docs/guide/batch-operations.md +++ b/docs/guide/batch-operations.md @@ -6,14 +6,6 @@ It allows you to combine multiple data modification actions into a single operat In some cases, batch operations can result in better performance, especially when your app requires doing a large number of operations. -::: tip -It's not possible to include read operations in a batch. -Methods such as [`getCellValue`](../api/classes/hyperformula.md#getcellvalue), [`getSheetSerialized`](../api/classes/hyperformula.md#getsheetserialized), or [`getFillRangeData`](../api/classes/hyperformula.md#getfillrangedata) will result in an error when called inside a [batch callback](#using-the-batch-method) or when the evaluation is [suspended](#using-the-suspendevaluation-and-resumeevaluation-methods). - - -Note: [paste](../api/classes/hyperformula.md#paste) method also cannot be called when batching as it reads the contents of the copied cells. -::: - ## How to batch ### Using the [`batch`](../api/classes/hyperformula.md#batch) method @@ -121,6 +113,14 @@ Batching can also be useful when you decide to use HyperFormula on the [server-side](server-side-installation). Several operations can be sent as a single one. +## What you can't batch + +You can't batch read operations. + +Methods such as [`getCellValue`](../api/classes/hyperformula.md#getcellvalue), [`getSheetSerialized`](../api/classes/hyperformula.md#getsheetserialized), or [`getFillRangeData`](../api/classes/hyperformula.md#getfillrangedata) will result in an error when called inside a [batch callback](#using-the-batch-method) or when the evaluation is [suspended](#using-the-suspendevaluation-and-resumeevaluation-methods). + +The [paste](../api/classes/hyperformula.md#paste) method also can't be called when batching as it reads the contents of the copied cells. + ## Demo