Skip to content

Commit fde0f6e

Browse files
authored
[Excel] (Custom functions) Tweak sample submitted by PM (#989)
1 parent 1e6cac6 commit fde0f6e

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

playlists-prod/excel.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,16 @@
288288
api_set:
289289
CustomFunctionsRuntime: 1.4
290290
- id: excel-custom-functions-custom-enum
291-
name: Function with custom enum parameters
291+
name: Function with custom enums
292292
fileName: custom-enum.yaml
293293
description: >-
294-
Use custom enum as parameters in a custom function that searches for
294+
Use custom enums as parameters in a custom function that searches for
295295
flights.
296296
rawUrl: >-
297297
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/16-custom-functions/custom-enum.yaml
298298
group: Custom Functions
299299
api_set:
300-
CustomFunctionsRuntime: '1.5'
300+
CustomFunctionsRuntime: 1.5
301301
- id: excel-custom-xml-parts-create-set-get-and-delete-custom-xml-parts
302302
name: Using custom XML parts
303303
fileName: create-set-get-and-delete-custom-xml-parts.yaml

playlists/excel.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,16 @@
288288
api_set:
289289
CustomFunctionsRuntime: 1.4
290290
- id: excel-custom-functions-custom-enum
291-
name: Function with custom enum parameters
291+
name: Function with custom enums
292292
fileName: custom-enum.yaml
293293
description: >-
294-
Use custom enum as parameters in a custom function that searches for
294+
Use custom enums as parameters in a custom function that searches for
295295
flights.
296296
rawUrl: >-
297297
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/excel/16-custom-functions/custom-enum.yaml
298298
group: Custom Functions
299299
api_set:
300-
CustomFunctionsRuntime: '1.5'
300+
CustomFunctionsRuntime: 1.5
301301
- id: excel-custom-xml-parts-create-set-get-and-delete-custom-xml-parts
302302
name: Using custom XML parts
303303
fileName: create-set-get-and-delete-custom-xml-parts.yaml

samples/excel/16-custom-functions/custom-enum.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
order: 7
22
id: excel-custom-functions-custom-enum
3-
name: Function with custom enum parameters
4-
description: Use custom enum as parameters in a custom function that searches for flights.
3+
name: Function with custom enums
4+
description: Use custom enums as parameters in a custom function that searches for flights.
55
host: EXCEL
66
api_set:
7-
CustomFunctionsRuntime: '1.5'
7+
CustomFunctionsRuntime: 1.5
88
script:
99
content: |
1010
/**
@@ -52,7 +52,10 @@ script:
5252
*/
5353
function fetchFlightSchedule(departure: Airports, destination: Airports, day: DayOfWeek[]): string[][] {
5454
const flights: string[][] = [];
55+
56+
// Use the `Airports` enum for both the `departure` and `destination` parameters.
5557
flights.push(["Flights from " + departure + " to " + destination, "", "", "", ""]);
58+
5659
flights.push(["Day", "Flight Number", "Departure Time", "Arrival Time", "Price"]);
5760
const daysOfWeek = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
5861

0 commit comments

Comments
 (0)