You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/functions.md
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1311,9 +1311,17 @@ Check the example in our [snippet tool](https://snippet.dhtmlx.com/wux2b35b).
1311
1311
1312
1312
## Getting cell formula
1313
1313
1314
-
Starting with v4.1, you can get the formula applied to a cell via the [getFormula()](api/spreadsheet_getformula_method.md) method. The method takes the id of the cell as a parameter:
1314
+
Starting with v4.1, you can get the formula applied to a cell via the [`getFormula()`](api/spreadsheet_getformula_method.md) method. The method takes the id of the cell as a parameter:
1315
1315
1316
-
```js
1316
+
~~~js
1317
1317
var formula =spreadsheet.getFormula("B2");
1318
1318
// -> "ABS(C2)"
1319
-
```
1319
+
~~~
1320
+
1321
+
## Popup with formula description
1322
+
1323
+
When you enter a formula, a popup with description of the function and its parameters appears.
1324
+
1325
+

1326
+
1327
+
You can modify the default locale for the popup with formula parameters and add a custom locale. Check the details in the [Localization](localization.md/#default-locale-for-formulas) guide.
The i18n locale for the Spreadsheet popup with formulas is contained in the `dhx.i18n.formulas` object. The default locale for formulas is the following:
203
203
@@ -227,13 +227,13 @@ const en = {
227
227
"Optional. A number or cell reference that refers to numeric values."
228
228
]
229
229
],
230
-
// more formulas settings
230
+
// more formulas' descriptions
231
231
};
232
232
~~~
233
233
234
234
You can check the full default locale for formulas in the [HTML tab of the related snippet](https://snippet.dhtmlx.com/yn5hyyim).
235
235
236
-
## Custom formulas locale
236
+
## Custom locale for formulas
237
237
238
238
To apply a custom locale for Spreadsheet formulas, you need to use the `dhx.i18n.setLocale()` method in the following way:
239
239
@@ -261,7 +261,7 @@ You should pass the following parameters to the method:
261
261
</tr>
262
262
<tr>
263
263
<td>locale</td>
264
-
<td>(*required*) the locale object that contains formulas descriptions as <i>key:value</i> pairs, where:<ul><li>the <b>key</b> is the name of the formula</li><li>the <b>value</b> is an array of parameters the formula takes. Each parameter of the formula is an array of two elements, where:<ul><li>the first element is the name of the parameter</li><li>the second element is the description of the parameter</li></ul></li></ul></td>
264
+
<td>(*required*) the locale object that contains formulas' descriptions as <i>key:value</i> pairs, where:<ul><li>the <b>key</b> is the name of the function</li><li>the <b>value</b> is an array of parameters the function takes. Each parameter of the function is an array of two elements, where:<ul><li>the first element is the name of the parameter</li><li>the second element is the description of the parameter</li></ul></li></ul></td>
265
265
</tr>
266
266
</tbody>
267
267
</table>
@@ -274,7 +274,7 @@ const de = {
274
274
["Zahl1", "Erforderlich. Eine Zahl oder Zellreferenz, die sich auf numerische Werte bezieht."],
275
275
["Zahl2", "Optional. Eine Zahl oder Zellreferenz, die auf numerische Werte verweist."]
0 commit comments