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
[Excel] (Custom functions) Switch formatted number content to double (#5246)
* [Excel] (Custom functions) Switch formatted number content to double
* Fix broken cross link
* Adjust to emphasize purpose of a double
* Apply suggestions from code review
Co-authored-by: Alex Jerabek <[email protected]>
---------
Co-authored-by: Alex Jerabek <[email protected]>
Copy file name to clipboardExpand all lines: docs/excel/custom-functions-data-types-concepts.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
2
title: Custom functions and data types
3
3
description: Use Excel data types with your custom functions and Office Add-ins.
4
-
ms.date: 06/15/2025
4
+
ms.date: 06/22/2025
5
5
ms.topic: overview
6
6
ms.custom: scenarios:getting-started
7
7
ms.localizationpriority: medium
8
8
---
9
9
10
10
# Use data types with custom functions in Excel
11
11
12
-
Data types expand the Excel JavaScript API to support data types beyond the original four cell value types (string, number, boolean, and error). Data types include support for web images, formatted number values, entities, and arrays within entities.
12
+
Data types expand the Excel JavaScript API to support data types beyond the original four cell value types (string, number, boolean, and error). Data types include support for web images, formatted numbers, entities, and arrays within entities.
13
13
14
14
These data types amplify the power of custom functions, because custom functions accept data types as both input and output values. You can generate data types through custom functions, or take existing data types as function arguments into calculations. Once the JSON schema of a data type is set, this schema is maintained throughout the calculations.
15
15
@@ -28,21 +28,21 @@ Custom functions projects include a JSON metadata file. This JSON metadata file
28
28
29
29
For a full description of the manual JSON metadata creation process, see [Manually create JSON metadata for custom functions](custom-functions-json.md). See [allowCustomDataForDataTypeAny](custom-functions-json.md#allowcustomdatafordatatypeany) for additional details about this property.
30
30
31
-
## Output a formatted number value
31
+
## Output a formatted number
32
32
33
-
The following code sample shows how to create a [FormattedNumberCellValue](/javascript/api/excel/excel.formattednumbercellvalue) data type with a custom function. The function takes a basic number and a format setting as the input parameters and returns a formatted number value data type as the output.
33
+
The following code sample shows how to create a formatted number with a custom function. This uses the [DoubleCellValue](/javascript/api/excel/excel.doublecellvalue) object. The function takes a basic number and a format setting as the input parameters and returns a formatted number as double data type for the output.
34
34
35
35
```js
36
36
/**
37
-
* Take a number as the input value and return a formatted number value as the output.
37
+
* Take a number as the input value and return a double as the output.
Copy file name to clipboardExpand all lines: docs/excel/custom-functions-get-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
description: Tips and best practices for Excel custom functions in your Office Add-ins.
3
3
title: Best practices for custom functions in Excel
4
-
ms.date: 12/20/2024
4
+
ms.date: 06/22/2025
5
5
ms.topic: overview
6
6
ms.custom: scenarios:getting-started
7
7
ms.localizationpriority: medium
@@ -94,7 +94,7 @@ Another way to return multiple results is to use multiple functions and return a
94
94
95
95
### Complex data structures
96
96
97
-
[Data types](custom-functions-data-types-concepts.md) are the best way to handle complex data structures in custom functions add-ins. Data types support [Excel errors](custom-functions-errors.md) and [formatted number values](custom-functions-data-types-concepts.md#output-a-formatted-number-value). Data types also allow for designing [entity value cards](excel-data-types-entity-card.md), extending Excel data beyond the 2-dimensional grid.
97
+
[Data types](custom-functions-data-types-concepts.md) are the best way to handle complex data structures in custom functions add-ins. Data types support [Excel errors](custom-functions-errors.md) and formatted numbers as [doubles](custom-functions-data-types-concepts.md#output-a-formatted-number). Data types also allow for designing [entity value cards](excel-data-types-entity-card.md), extending Excel data beyond the 2-dimensional grid.
98
98
99
99
## Improve the user experience of calls to external services
0 commit comments