microsoft-graph 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/models/Cell.d.ts.map +1 -1
- package/dist/cjs/tasks/iterateWorkbookRangeRows.d.ts +2 -0
- package/dist/cjs/tasks/iterateWorkbookRangeRows.d.ts.map +1 -1
- package/dist/cjs/tasks/iterateWorkbookRangeRows.js +9 -2
- package/dist/esm/models/Cell.d.ts.map +1 -1
- package/dist/esm/tasks/iterateWorkbookRangeRows.d.ts +2 -0
- package/dist/esm/tasks/iterateWorkbookRangeRows.d.ts.map +1 -1
- package/dist/esm/tasks/iterateWorkbookRangeRows.js +10 -3
- package/docs/api/Cell.md +31 -31
- package/docs/api/iterateWorkbookRangeRows.md +7 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../src/models/Cell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG;IAClB;;;OAGG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;;;OAIG;IACH,KAAK,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IAEF;;;OAGG;IACH,SAAS,EAAE;QACV,UAAU,CAAC,EAAE,uBAAuB,CAAC;QACrC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,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AAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @category Tasks
|
|
5
5
|
* @experimental
|
|
6
6
|
*/
|
|
7
|
+
import type { RowAddress } from "../models/Address.ts";
|
|
7
8
|
import type { Cell, CellScope } from "../models/Cell.ts";
|
|
8
9
|
import type { RowOffset } from "../models/Row.ts";
|
|
9
10
|
import type { WorkbookRangeRef } from "../models/WorkbookRange.ts";
|
|
@@ -16,6 +17,7 @@ import type { WorkbookRangeRef } from "../models/WorkbookRange.ts";
|
|
|
16
17
|
*/
|
|
17
18
|
export type IteratedRow = {
|
|
18
19
|
cells: Cell[];
|
|
20
|
+
address: RowAddress;
|
|
19
21
|
offset: RowOffset;
|
|
20
22
|
isFirst: boolean;
|
|
21
23
|
isLast: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iterateWorkbookRangeRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateWorkbookRangeRows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"iterateWorkbookRangeRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateWorkbookRangeRows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,IAAI,EAAuC,SAAS,EAA6D,MAAM,mBAAmB,CAAC;AAIzJ,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAuB,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,KAAK,GAAE,OAAO,CAAC,SAAS,CAAoB,EAAE,oBAAoB,GAAE,MAAM,GAAG,IAAW,GAAG,aAAa,CAAC,WAAW,CAAC,CAuDhM"}
|
|
@@ -17,6 +17,7 @@ const getWorkbookRangeFont_ts_1 = __importDefault(require("../operations/workboo
|
|
|
17
17
|
const getWorkbookWorksheetRange_ts_1 = __importDefault(require("../operations/workbookRange/getWorkbookWorksheetRange.js"));
|
|
18
18
|
const listWorkbookRangeBorders_ts_1 = __importDefault(require("../operations/workbookRange/listWorkbookRangeBorders.js"));
|
|
19
19
|
const addressManipulation_ts_1 = require("../services/addressManipulation.js");
|
|
20
|
+
const addressOffset_ts_1 = require("../services/addressOffset.js");
|
|
20
21
|
const batch_ts_1 = require("../services/batch.js");
|
|
21
22
|
const cell_ts_1 = require("../services/cell.js");
|
|
22
23
|
/**
|
|
@@ -35,6 +36,9 @@ async function* iterateWorkbookRangeRows(rangeRef, scope = cell_ts_1.defaultCell
|
|
|
35
36
|
const totalRowCount = (0, addressManipulation_ts_1.countAddressRows)(rangeRef.address);
|
|
36
37
|
const maxRowsPerOperation = calculateMaxRowsPerOperation(totalColumnCount, maxCellsPerOperation);
|
|
37
38
|
const rangeSelect = scopeToRangeSelect(scope);
|
|
39
|
+
// Calculate the absolute row offset from the top of the sheet
|
|
40
|
+
const { startRow } = (0, addressManipulation_ts_1.decomposeAddress)(rangeRef.address);
|
|
41
|
+
const absoluteStartRowOffset = (0, addressOffset_ts_1.rowAddressToOffset)(startRow);
|
|
38
42
|
for (let operationRowStart = 0; operationRowStart < totalRowCount; operationRowStart += maxRowsPerOperation) {
|
|
39
43
|
const operationRowCount = Math.min(maxRowsPerOperation, totalRowCount - operationRowStart);
|
|
40
44
|
const operationRangeRef = (0, addressManipulation_ts_1.subRange)(rangeRef, operationRowStart, operationRowCount);
|
|
@@ -61,12 +65,15 @@ async function* iterateWorkbookRangeRows(rangeRef, scope = cell_ts_1.defaultCell
|
|
|
61
65
|
font,
|
|
62
66
|
});
|
|
63
67
|
}
|
|
64
|
-
|
|
68
|
+
// Calculate the absolute offset from the top of the sheet
|
|
69
|
+
const offset = (absoluteStartRowOffset + operationRowStart + operationRowOffset);
|
|
70
|
+
const address = (0, addressOffset_ts_1.rowOffsetToAddress)(offset);
|
|
65
71
|
const isFirst = offset === 0;
|
|
66
|
-
const isLast = offset === totalRowCount - 1;
|
|
72
|
+
const isLast = offset === absoluteStartRowOffset + totalRowCount - 1;
|
|
67
73
|
yield {
|
|
68
74
|
cells,
|
|
69
75
|
offset,
|
|
76
|
+
address,
|
|
70
77
|
isFirst,
|
|
71
78
|
isLast,
|
|
72
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../src/models/Cell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG;IAClB;;;OAGG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;;;OAIG;IACH,KAAK,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IAEF;;;OAGG;IACH,SAAS,EAAE;QACV,UAAU,CAAC,EAAE,uBAAuB,CAAC;QACrC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAC/B,CAAC;IAEF;;;O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@ -4,6 +4,7 @@
|
|
|
4
4
|
* @category Tasks
|
|
5
5
|
* @experimental
|
|
6
6
|
*/
|
|
7
|
+
import type { RowAddress } from "../models/Address.ts";
|
|
7
8
|
import type { Cell, CellScope } from "../models/Cell.ts";
|
|
8
9
|
import type { RowOffset } from "../models/Row.ts";
|
|
9
10
|
import type { WorkbookRangeRef } from "../models/WorkbookRange.ts";
|
|
@@ -16,6 +17,7 @@ import type { WorkbookRangeRef } from "../models/WorkbookRange.ts";
|
|
|
16
17
|
*/
|
|
17
18
|
export type IteratedRow = {
|
|
18
19
|
cells: Cell[];
|
|
20
|
+
address: RowAddress;
|
|
19
21
|
offset: RowOffset;
|
|
20
22
|
isFirst: boolean;
|
|
21
23
|
isLast: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iterateWorkbookRangeRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateWorkbookRangeRows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"iterateWorkbookRangeRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateWorkbookRangeRows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,IAAI,EAAuC,SAAS,EAA6D,MAAM,mBAAmB,CAAC;AAIzJ,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAuB,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,KAAK,GAAE,OAAO,CAAC,SAAS,CAAoB,EAAE,oBAAoB,GAAE,MAAM,GAAG,IAAW,GAAG,aAAa,CAAC,WAAW,CAAC,CAuDhM"}
|
|
@@ -10,7 +10,8 @@ import getWorkbookRangeFill from "../operations/workbookRange/getWorkbookRangeFi
|
|
|
10
10
|
import getWorkbookRangeFont from "../operations/workbookRange/getWorkbookRangeFont.js";
|
|
11
11
|
import getWorkbookWorksheetRange from "../operations/workbookRange/getWorkbookWorksheetRange.js";
|
|
12
12
|
import listWorkbookRangeBorders from "../operations/workbookRange/listWorkbookRangeBorders.js";
|
|
13
|
-
import { countAddressColumns, countAddressRows, subRange } from "../services/addressManipulation.js";
|
|
13
|
+
import { countAddressColumns, countAddressRows, decomposeAddress, subRange } from "../services/addressManipulation.js";
|
|
14
|
+
import { rowAddressToOffset, rowOffsetToAddress } from "../services/addressOffset.js";
|
|
14
15
|
import { maxCellsPerRequest } from "../services/batch.js";
|
|
15
16
|
import { defaultCellScope } from "../services/cell.js";
|
|
16
17
|
/**
|
|
@@ -29,6 +30,9 @@ export async function* iterateWorkbookRangeRows(rangeRef, scope = defaultCellSco
|
|
|
29
30
|
const totalRowCount = countAddressRows(rangeRef.address);
|
|
30
31
|
const maxRowsPerOperation = calculateMaxRowsPerOperation(totalColumnCount, maxCellsPerOperation);
|
|
31
32
|
const rangeSelect = scopeToRangeSelect(scope);
|
|
33
|
+
// Calculate the absolute row offset from the top of the sheet
|
|
34
|
+
const { startRow } = decomposeAddress(rangeRef.address);
|
|
35
|
+
const absoluteStartRowOffset = rowAddressToOffset(startRow);
|
|
32
36
|
for (let operationRowStart = 0; operationRowStart < totalRowCount; operationRowStart += maxRowsPerOperation) {
|
|
33
37
|
const operationRowCount = Math.min(maxRowsPerOperation, totalRowCount - operationRowStart);
|
|
34
38
|
const operationRangeRef = subRange(rangeRef, operationRowStart, operationRowCount);
|
|
@@ -55,12 +59,15 @@ export async function* iterateWorkbookRangeRows(rangeRef, scope = defaultCellSco
|
|
|
55
59
|
font,
|
|
56
60
|
});
|
|
57
61
|
}
|
|
58
|
-
|
|
62
|
+
// Calculate the absolute offset from the top of the sheet
|
|
63
|
+
const offset = (absoluteStartRowOffset + operationRowStart + operationRowOffset);
|
|
64
|
+
const address = rowOffsetToAddress(offset);
|
|
59
65
|
const isFirst = offset === 0;
|
|
60
|
-
const isLast = offset === totalRowCount - 1;
|
|
66
|
+
const isLast = offset === absoluteStartRowOffset + totalRowCount - 1;
|
|
61
67
|
yield {
|
|
62
68
|
cells,
|
|
63
69
|
offset,
|
|
70
|
+
address,
|
|
64
71
|
isFirst,
|
|
65
72
|
isLast,
|
|
66
73
|
};
|
package/docs/api/Cell.md
CHANGED
|
@@ -27,23 +27,23 @@ Contrary to common expectation, while a cell does contain a single value, it als
|
|
|
27
27
|
| `alignment.vertical?` | [`CellVerticalAlignment`](#cellverticalalignment) | - | [src/models/Cell.ts:48](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L48) |
|
|
28
28
|
| `alignment.wrapText?` | `boolean` | - | [src/models/Cell.ts:49](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L49) |
|
|
29
29
|
| <a id="borders"></a> `borders` | `object` | **`Experimental`** Borders around the cell. | [src/models/Cell.ts:56](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L56) |
|
|
30
|
-
| `borders.diagonalDown?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
31
|
-
| `borders.diagonalUp?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
32
|
-
| `borders.edgeBottom?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
33
|
-
| `borders.edgeLeft?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
34
|
-
| `borders.edgeRight?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
35
|
-
| `borders.edgeTop?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
36
|
-
| `borders.insideHorizontal?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
37
|
-
| `borders.insideVertical?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:
|
|
38
|
-
| <a id="fill"></a> `fill` | `object` | **`Experimental`** Fill color of the cell. | [src/models/Cell.ts:
|
|
39
|
-
| `fill.color?` | [`Color`](Color.md#color) | - | [src/models/Cell.ts:
|
|
40
|
-
| <a id="font"></a> `font` | `object` | **`Experimental`** Font settings for the cell. | [src/models/Cell.ts:
|
|
41
|
-
| `font.bold?` | `boolean` | - | [src/models/Cell.ts:
|
|
42
|
-
| `font.color?` | [`Color`](Color.md#color) | - | [src/models/Cell.ts:
|
|
43
|
-
| `font.italic?` | `boolean` | - | [src/models/Cell.ts:
|
|
44
|
-
| `font.name?` | [`FontName`](FontName.md#fontname) | - | [src/models/Cell.ts:
|
|
45
|
-
| `font.size?` | `number` | - | [src/models/Cell.ts:
|
|
46
|
-
| `font.underline?` | [`CellUnderline`](#cellunderline) | - | [src/models/Cell.ts:
|
|
30
|
+
| `borders.diagonalDown?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:64](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L64) |
|
|
31
|
+
| `borders.diagonalUp?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:65](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L65) |
|
|
32
|
+
| `borders.edgeBottom?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:59](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L59) |
|
|
33
|
+
| `borders.edgeLeft?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:60](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L60) |
|
|
34
|
+
| `borders.edgeRight?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:61](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L61) |
|
|
35
|
+
| `borders.edgeTop?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:58](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L58) |
|
|
36
|
+
| `borders.insideHorizontal?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:63](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L63) |
|
|
37
|
+
| `borders.insideVertical?` | [`Border`](Border.md#border) | - | [src/models/Cell.ts:62](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L62) |
|
|
38
|
+
| <a id="fill"></a> `fill` | `object` | **`Experimental`** Fill color of the cell. | [src/models/Cell.ts:72](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L72) |
|
|
39
|
+
| `fill.color?` | [`Color`](Color.md#color) | - | [src/models/Cell.ts:73](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L73) |
|
|
40
|
+
| <a id="font"></a> `font` | `object` | **`Experimental`** Font settings for the cell. | [src/models/Cell.ts:79](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L79) |
|
|
41
|
+
| `font.bold?` | `boolean` | - | [src/models/Cell.ts:83](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L83) |
|
|
42
|
+
| `font.color?` | [`Color`](Color.md#color) | - | [src/models/Cell.ts:82](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L82) |
|
|
43
|
+
| `font.italic?` | `boolean` | - | [src/models/Cell.ts:84](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L84) |
|
|
44
|
+
| `font.name?` | [`FontName`](FontName.md#fontname) | - | [src/models/Cell.ts:80](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L80) |
|
|
45
|
+
| `font.size?` | `number` | - | [src/models/Cell.ts:81](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L81) |
|
|
46
|
+
| `font.underline?` | [`CellUnderline`](#cellunderline) | - | [src/models/Cell.ts:85](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L85) |
|
|
47
47
|
| <a id="format"></a> `format` | [`CellFormat`](#cellformat-1) | Formatting that is applied to the value to derive the text representation. | [src/models/Cell.ts:30](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L30) |
|
|
48
48
|
| <a id="merge"></a> `merge` | `object` | **`Experimental`** Number of cell merges (WRITE ONLY). **Remarks** Due to API limitations, this value is never populated when reading a cell, but it can be set when writing a cell. | [src/models/Cell.ts:37](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L37) |
|
|
49
49
|
| `merge.down?` | `number` | - | [src/models/Cell.ts:39](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L39) |
|
|
@@ -57,7 +57,7 @@ Contrary to common expectation, while a cell does contain a single value, it als
|
|
|
57
57
|
|
|
58
58
|
> **CellFormat** = `string` & `object`
|
|
59
59
|
|
|
60
|
-
Defined in: [src/models/Cell.ts:
|
|
60
|
+
Defined in: [src/models/Cell.ts:105](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L105)
|
|
61
61
|
|
|
62
62
|
Format to be applied to a cell value to convert it to text to display to the user.
|
|
63
63
|
|
|
@@ -77,7 +77,7 @@ Format to be applied to a cell value to convert it to text to display to the use
|
|
|
77
77
|
|
|
78
78
|
> **CellHorizontalAlignment** = `"General"` \| `"Left"` \| `"Center"` \| `"Right"` \| `"Fill"` \| `"Justify"` \| `"CenterAcrossSelection"` \| `"Distributed"`
|
|
79
79
|
|
|
80
|
-
Defined in: [src/models/Cell.ts:
|
|
80
|
+
Defined in: [src/models/Cell.ts:135](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L135)
|
|
81
81
|
|
|
82
82
|
***
|
|
83
83
|
|
|
@@ -85,7 +85,7 @@ Defined in: [src/models/Cell.ts:134](https://github.com/Future-Secure-AI/microso
|
|
|
85
85
|
|
|
86
86
|
> **CellScope** = `object`
|
|
87
87
|
|
|
88
|
-
Defined in: [src/models/Cell.ts:
|
|
88
|
+
Defined in: [src/models/Cell.ts:112](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L112)
|
|
89
89
|
|
|
90
90
|
The amount of detail that we're reading from a cell.
|
|
91
91
|
|
|
@@ -93,13 +93,13 @@ The amount of detail that we're reading from a cell.
|
|
|
93
93
|
|
|
94
94
|
| Property | Type | Description | Defined in |
|
|
95
95
|
| ------ | ------ | ------ | ------ |
|
|
96
|
-
| <a id="alignment-1"></a> `alignment` | `boolean` | Content position with the cell. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:
|
|
97
|
-
| <a id="border"></a> `border` | `boolean` | Cell borders. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:
|
|
98
|
-
| <a id="fill-1"></a> `fill` | `boolean` | Background fill style. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:
|
|
99
|
-
| <a id="font-1"></a> `font` | `boolean` | Text style. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:
|
|
100
|
-
| <a id="format-1"></a> `format` | `boolean` | Logic used to format values to text. CHEAP (+1 op per 10K cells, no additional call op `values` or `text`) | [src/models/Cell.ts:
|
|
101
|
-
| <a id="text-1"></a> `text` | `boolean` | Formatted value, as presented to the user. CHEAP (+1 op per 10K cells, no additional call op `values` or `format`) | [src/models/Cell.ts:
|
|
102
|
-
| <a id="value-1"></a> `value` | `boolean` | Raw cell value. CHEAP (+1 op per 10K cells, no additional op with `text` or `format`) | [src/models/Cell.ts:
|
|
96
|
+
| <a id="alignment-1"></a> `alignment` | `boolean` | Content position with the cell. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:123](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L123) |
|
|
97
|
+
| <a id="border"></a> `border` | `boolean` | Cell borders. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:126](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L126) |
|
|
98
|
+
| <a id="fill-1"></a> `fill` | `boolean` | Background fill style. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:129](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L129) |
|
|
99
|
+
| <a id="font-1"></a> `font` | `boolean` | Text style. VERY EXPENSIVE (+1 op per cell) | [src/models/Cell.ts:132](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L132) |
|
|
100
|
+
| <a id="format-1"></a> `format` | `boolean` | Logic used to format values to text. CHEAP (+1 op per 10K cells, no additional call op `values` or `text`) | [src/models/Cell.ts:120](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L120) |
|
|
101
|
+
| <a id="text-1"></a> `text` | `boolean` | Formatted value, as presented to the user. CHEAP (+1 op per 10K cells, no additional call op `values` or `format`) | [src/models/Cell.ts:117](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L117) |
|
|
102
|
+
| <a id="value-1"></a> `value` | `boolean` | Raw cell value. CHEAP (+1 op per 10K cells, no additional op with `text` or `format`) | [src/models/Cell.ts:114](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L114) |
|
|
103
103
|
|
|
104
104
|
***
|
|
105
105
|
|
|
@@ -107,7 +107,7 @@ The amount of detail that we're reading from a cell.
|
|
|
107
107
|
|
|
108
108
|
> **CellText** = `string`
|
|
109
109
|
|
|
110
|
-
Defined in: [src/models/Cell.ts:
|
|
110
|
+
Defined in: [src/models/Cell.ts:99](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L99)
|
|
111
111
|
|
|
112
112
|
Text content of a cell in a worksheet.
|
|
113
113
|
|
|
@@ -121,7 +121,7 @@ This is a string that represents the text displayed in the cell, which may diffe
|
|
|
121
121
|
|
|
122
122
|
> **CellUnderline** = `"None"` \| `"Single"` \| `"Double"` \| `"SingleAccountant"` \| `"DoubleAccountant"`
|
|
123
123
|
|
|
124
|
-
Defined in: [src/models/Cell.ts:
|
|
124
|
+
Defined in: [src/models/Cell.ts:139](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L139)
|
|
125
125
|
|
|
126
126
|
***
|
|
127
127
|
|
|
@@ -129,7 +129,7 @@ Defined in: [src/models/Cell.ts:138](https://github.com/Future-Secure-AI/microso
|
|
|
129
129
|
|
|
130
130
|
> **CellValue** = `string` \| `number` \| `boolean`
|
|
131
131
|
|
|
132
|
-
Defined in: [src/models/Cell.ts:
|
|
132
|
+
Defined in: [src/models/Cell.ts:93](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L93)
|
|
133
133
|
|
|
134
134
|
CellValue represents the value of a cell in a spreadsheet.
|
|
135
135
|
|
|
@@ -143,4 +143,4 @@ CellValue represents the value of a cell in a spreadsheet.
|
|
|
143
143
|
|
|
144
144
|
> **CellVerticalAlignment** = `"Top"` \| `"Center"` \| `"Bottom"` \| `"Justify"` \| `"Distributed"`
|
|
145
145
|
|
|
146
|
-
Defined in: [src/models/Cell.ts:
|
|
146
|
+
Defined in: [src/models/Cell.ts:137](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/Cell.ts#L137)
|
|
@@ -12,7 +12,7 @@ Iterate over the rows in a given worksheet range.
|
|
|
12
12
|
|
|
13
13
|
> **IteratedRow** = `object`
|
|
14
14
|
|
|
15
|
-
Defined in: [src/tasks/iterateWorkbookRangeRows.ts:
|
|
15
|
+
Defined in: [src/tasks/iterateWorkbookRangeRows.ts:35](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateWorkbookRangeRows.ts#L35)
|
|
16
16
|
|
|
17
17
|
**`Experimental`**
|
|
18
18
|
|
|
@@ -22,10 +22,11 @@ Represents a row yielded by the [iterateWorkbookRangeRows](#iterateworkbookrange
|
|
|
22
22
|
|
|
23
23
|
| Property | Type | Description | Defined in |
|
|
24
24
|
| ------ | ------ | ------ | ------ |
|
|
25
|
-
| <a id="
|
|
26
|
-
| <a id="
|
|
27
|
-
| <a id="
|
|
28
|
-
| <a id="
|
|
25
|
+
| <a id="address"></a> `address` | [`RowAddress`](Address.md#rowaddress) | - | [src/tasks/iterateWorkbookRangeRows.ts:37](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateWorkbookRangeRows.ts#L37) |
|
|
26
|
+
| <a id="cells"></a> `cells` | [`Cell`](Cell.md#cell)[] | Array of cells in the row, each containing value, text, format, and optionally style information depending on the scope. | [src/tasks/iterateWorkbookRangeRows.ts:36](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateWorkbookRangeRows.ts#L36) |
|
|
27
|
+
| <a id="isfirst"></a> `isFirst` | `boolean` | If this is the first row in the iteration. | [src/tasks/iterateWorkbookRangeRows.ts:39](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateWorkbookRangeRows.ts#L39) |
|
|
28
|
+
| <a id="islast"></a> `isLast` | `boolean` | If this is the last row in the iteration. | [src/tasks/iterateWorkbookRangeRows.ts:40](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateWorkbookRangeRows.ts#L40) |
|
|
29
|
+
| <a id="offset"></a> `offset` | [`RowOffset`](Row.md#rowoffset) | Zero-based offset of the row within the original range. | [src/tasks/iterateWorkbookRangeRows.ts:38](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateWorkbookRangeRows.ts#L38) |
|
|
29
30
|
|
|
30
31
|
## Functions
|
|
31
32
|
|
|
@@ -33,7 +34,7 @@ Represents a row yielded by the [iterateWorkbookRangeRows](#iterateworkbookrange
|
|
|
33
34
|
|
|
34
35
|
> **iterateWorkbookRangeRows**(`rangeRef`, `scope`, `maxCellsPerOperation`): `AsyncIterable`\<[`IteratedRow`](#iteratedrow)\>
|
|
35
36
|
|
|
36
|
-
Defined in: [src/tasks/iterateWorkbookRangeRows.ts:
|
|
37
|
+
Defined in: [src/tasks/iterateWorkbookRangeRows.ts:54](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateWorkbookRangeRows.ts#L54)
|
|
37
38
|
|
|
38
39
|
**`Experimental`**
|
|
39
40
|
|