Skip to content

Commit a35752c

Browse files
ElizabethSamuel-MSFTgithub-actions
andauthored
Automatically generated docs (#2304)
Co-authored-by: github-actions <[email protected]>
1 parent 3b5f1ca commit a35752c

27 files changed

+402
-300
lines changed

docs/docs-ref-autogen/excel/excel/excel.doublecellvalue.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,41 @@ properties:
8282
1.19](/javascript/api/requirement-sets/excel/excel-api-requirement-sets)
8383
\]
8484
85+
86+
#### Examples
87+
88+
89+
```TypeScript
90+
91+
// Link to full sample:
92+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
93+
94+
95+
// This function creates a double data type,
96+
97+
// and sets the format of this data type as a currency.
98+
99+
await Excel.run(async (context) => {
100+
// Get the Sample worksheet and a range on that sheet.
101+
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
102+
const currencyRange = sheet.getRange("A2");
103+
104+
// Write a number formatted as currency to cell A2.
105+
currencyRange.valuesAsJson = [
106+
[
107+
{
108+
type: Excel.CellValueType.double,
109+
basicValue: 12.34,
110+
numberFormat: "$* #,##0.00"
111+
}
112+
]
113+
];
114+
115+
await context.sync();
116+
});
117+
118+
```
119+
85120
isPreview: false
86121
isDeprecated: false
87122
syntax:
@@ -157,6 +192,40 @@ properties:
157192
1.16](/javascript/api/requirement-sets/excel/excel-api-requirement-sets)
158193
\]
159194
195+
196+
#### Examples
197+
198+
199+
```TypeScript
200+
201+
// Link to full sample:
202+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
203+
204+
205+
// This function creates a double data type,
206+
207+
// and sets the format of this data type as a date.
208+
209+
await Excel.run(async (context) => {
210+
// Get the Sample worksheet and a range on that sheet.
211+
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
212+
const dateRange = sheet.getRange("A1");
213+
214+
// Write a number formatted as a date to cell A1.
215+
dateRange.valuesAsJson = [
216+
[
217+
{
218+
type: Excel.CellValueType.double,
219+
basicValue: 32889.0,
220+
numberFormat: "m/d/yyyy"
221+
}
222+
]
223+
];
224+
await context.sync();
225+
});
226+
227+
```
228+
160229
isPreview: false
161230
isDeprecated: false
162231
syntax:

docs/docs-ref-autogen/excel/excel/excel.formattednumbercellvalue.yml

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -78,41 +78,6 @@ properties:
7878
1.16](/javascript/api/requirement-sets/excel/excel-api-requirement-sets)
7979
\]
8080
81-
82-
#### Examples
83-
84-
85-
```TypeScript
86-
87-
// Link to full sample:
88-
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
89-
90-
91-
// This function creates a formatted number data type,
92-
93-
// and sets the format of this data type as a currency.
94-
95-
await Excel.run(async (context) => {
96-
// Get the Sample worksheet and a range on that sheet.
97-
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
98-
const currencyRange = sheet.getRange("A2");
99-
100-
// Write a number formatted as currency to cell A2.
101-
currencyRange.valuesAsJson = [
102-
[
103-
{
104-
type: Excel.CellValueType.formattedNumber,
105-
basicValue: 12.34,
106-
numberFormat: "$* #,##0.00"
107-
}
108-
]
109-
];
110-
111-
await context.sync();
112-
});
113-
114-
```
115-
11681
isPreview: false
11782
isDeprecated: true
11883
customDeprecatedMessage: 'Deprecated since \[Api set: ExcelApi 1.19\].'
@@ -130,40 +95,6 @@ properties:
13095
1.16](/javascript/api/requirement-sets/excel/excel-api-requirement-sets)
13196
\]
13297
133-
134-
#### Examples
135-
136-
137-
```TypeScript
138-
139-
// Link to full sample:
140-
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
141-
142-
143-
// This function creates a formatted number data type,
144-
145-
// and sets the format of this data type as a date.
146-
147-
await Excel.run(async (context) => {
148-
// Get the Sample worksheet and a range on that sheet.
149-
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
150-
const dateRange = sheet.getRange("A1");
151-
152-
// Write a number formatted as a date to cell A1.
153-
dateRange.valuesAsJson = [
154-
[
155-
{
156-
type: Excel.CellValueType.formattedNumber,
157-
basicValue: 32889.0,
158-
numberFormat: "m/d/yyyy"
159-
}
160-
]
161-
];
162-
await context.sync();
163-
});
164-
165-
```
166-
16798
isPreview: false
16899
isDeprecated: true
169100
customDeprecatedMessage: 'Deprecated since \[Api set: ExcelApi 1.19\].'

docs/docs-ref-autogen/excel/excel/excel.range.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ properties:
820820
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
821821
822822
823-
// This function creates a formatted number data type,
823+
// This function creates a double data type,
824824
825825
// and sets the format of this data type as a date.
826826
@@ -833,7 +833,7 @@ properties:
833833
dateRange.valuesAsJson = [
834834
[
835835
{
836-
type: Excel.CellValueType.formattedNumber,
836+
type: Excel.CellValueType.double,
837837
basicValue: 32889.0,
838838
numberFormat: "m/d/yyyy"
839839
}

docs/docs-ref-autogen/excel_1_16/excel/excel.doublecellvalue.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,40 @@ properties:
5858
1.16](/javascript/api/requirement-sets/excel/excel-api-requirement-sets)
5959
\]
6060
61+
62+
#### Examples
63+
64+
65+
```TypeScript
66+
67+
// Link to full sample:
68+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
69+
70+
71+
// This function creates a double data type,
72+
73+
// and sets the format of this data type as a date.
74+
75+
await Excel.run(async (context) => {
76+
// Get the Sample worksheet and a range on that sheet.
77+
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
78+
const dateRange = sheet.getRange("A1");
79+
80+
// Write a number formatted as a date to cell A1.
81+
dateRange.valuesAsJson = [
82+
[
83+
{
84+
type: Excel.CellValueType.double,
85+
basicValue: 32889.0,
86+
numberFormat: "m/d/yyyy"
87+
}
88+
]
89+
];
90+
await context.sync();
91+
});
92+
93+
```
94+
6195
isPreview: false
6296
isDeprecated: false
6397
syntax:

docs/docs-ref-autogen/excel_1_16/excel/excel.range.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ properties:
775775
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
776776
777777
778-
// This function creates a formatted number data type,
778+
// This function creates a double data type,
779779
780780
// and sets the format of this data type as a date.
781781
@@ -788,7 +788,7 @@ properties:
788788
dateRange.valuesAsJson = [
789789
[
790790
{
791-
type: Excel.CellValueType.formattedNumber,
791+
type: Excel.CellValueType.double,
792792
basicValue: 32889.0,
793793
numberFormat: "m/d/yyyy"
794794
}

docs/docs-ref-autogen/excel_1_17/excel/excel.doublecellvalue.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,40 @@ properties:
5858
1.16](/javascript/api/requirement-sets/excel/excel-api-requirement-sets)
5959
\]
6060
61+
62+
#### Examples
63+
64+
65+
```TypeScript
66+
67+
// Link to full sample:
68+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
69+
70+
71+
// This function creates a double data type,
72+
73+
// and sets the format of this data type as a date.
74+
75+
await Excel.run(async (context) => {
76+
// Get the Sample worksheet and a range on that sheet.
77+
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
78+
const dateRange = sheet.getRange("A1");
79+
80+
// Write a number formatted as a date to cell A1.
81+
dateRange.valuesAsJson = [
82+
[
83+
{
84+
type: Excel.CellValueType.double,
85+
basicValue: 32889.0,
86+
numberFormat: "m/d/yyyy"
87+
}
88+
]
89+
];
90+
await context.sync();
91+
});
92+
93+
```
94+
6195
isPreview: false
6296
isDeprecated: false
6397
syntax:

docs/docs-ref-autogen/excel_1_17/excel/excel.range.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ properties:
775775
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
776776
777777
778-
// This function creates a formatted number data type,
778+
// This function creates a double data type,
779779
780780
// and sets the format of this data type as a date.
781781
@@ -788,7 +788,7 @@ properties:
788788
dateRange.valuesAsJson = [
789789
[
790790
{
791-
type: Excel.CellValueType.formattedNumber,
791+
type: Excel.CellValueType.double,
792792
basicValue: 32889.0,
793793
numberFormat: "m/d/yyyy"
794794
}

docs/docs-ref-autogen/excel_1_18/excel/excel.doublecellvalue.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,40 @@ properties:
5858
1.16](/javascript/api/requirement-sets/excel/excel-api-requirement-sets)
5959
\]
6060
61+
62+
#### Examples
63+
64+
65+
```TypeScript
66+
67+
// Link to full sample:
68+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
69+
70+
71+
// This function creates a double data type,
72+
73+
// and sets the format of this data type as a date.
74+
75+
await Excel.run(async (context) => {
76+
// Get the Sample worksheet and a range on that sheet.
77+
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
78+
const dateRange = sheet.getRange("A1");
79+
80+
// Write a number formatted as a date to cell A1.
81+
dateRange.valuesAsJson = [
82+
[
83+
{
84+
type: Excel.CellValueType.double,
85+
basicValue: 32889.0,
86+
numberFormat: "m/d/yyyy"
87+
}
88+
]
89+
];
90+
await context.sync();
91+
});
92+
93+
```
94+
6195
isPreview: false
6296
isDeprecated: false
6397
syntax:

docs/docs-ref-autogen/excel_1_18/excel/excel.range.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ properties:
820820
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
821821
822822
823-
// This function creates a formatted number data type,
823+
// This function creates a double data type,
824824
825825
// and sets the format of this data type as a date.
826826
@@ -833,7 +833,7 @@ properties:
833833
dateRange.valuesAsJson = [
834834
[
835835
{
836-
type: Excel.CellValueType.formattedNumber,
836+
type: Excel.CellValueType.double,
837837
basicValue: 32889.0,
838838
numberFormat: "m/d/yyyy"
839839
}

0 commit comments

Comments
 (0)