microsoft-graph 2.4.0 → 2.6.0
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/README.md +24 -10
- package/biome.jsonc +2 -2
- package/dist/models/CellRangeValues.d.ts +3 -0
- package/dist/models/CellRangeValues.d.ts.map +1 -0
- package/dist/models/CellRangeValues.js +1 -0
- package/dist/models/CellValue.d.ts +2 -0
- package/dist/models/CellValue.d.ts.map +1 -0
- package/dist/models/CellValue.js +1 -0
- package/dist/models/RowRangeValues.d.ts +3 -0
- package/dist/models/RowRangeValues.d.ts.map +1 -0
- package/dist/models/RowRangeValues.js +1 -0
- package/dist/operations/workbookTable/deleteWorkbookTable.d.ts +10 -0
- package/dist/operations/workbookTable/deleteWorkbookTable.d.ts.map +1 -0
- package/dist/operations/workbookTable/deleteWorkbookTable.js +22 -0
- package/dist/operations/workbookTable/deleteWorkbookTable.test.d.ts +2 -0
- package/dist/operations/workbookTable/deleteWorkbookTable.test.d.ts.map +1 -0
- package/dist/operations/workbookTable/deleteWorkbookTable.test.js +48 -0
- package/dist/operations/workbookTable/deleteWorkbookTablePreservingValues.d.ts +10 -0
- package/dist/operations/workbookTable/deleteWorkbookTablePreservingValues.d.ts.map +1 -0
- package/dist/operations/workbookTable/deleteWorkbookTablePreservingValues.js +20 -0
- package/dist/operations/workbookTable/deleteWorkbookTablePreservingValues.test.d.ts +2 -0
- package/dist/operations/workbookTable/deleteWorkbookTablePreservingValues.test.d.ts.map +1 -0
- package/dist/operations/workbookTable/deleteWorkbookTablePreservingValues.test.js +48 -0
- package/dist/services/addressManipulation.d.ts +36 -0
- package/dist/services/addressManipulation.d.ts.map +1 -1
- package/dist/services/addressManipulation.js +72 -18
- package/dist/services/addressManipulation.test.js +75 -1
- package/dist/tasks/iterateWorkbookRangeValues.d.ts +11 -0
- package/dist/tasks/iterateWorkbookRangeValues.d.ts.map +1 -0
- package/dist/tasks/iterateWorkbookRangeValues.js +47 -0
- package/dist/tasks/iterateWorkbookRangeValues.test.d.ts +2 -0
- package/dist/tasks/iterateWorkbookRangeValues.test.d.ts.map +1 -0
- package/dist/tasks/iterateWorkbookRangeValues.test.js +61 -0
- package/dist/tasks/setColumnHidden.d.ts.map +1 -1
- package/dist/tasks/setColumnHidden.js +6 -0
- package/dist/tasks/setColumnHidden.test.js +27 -2
- package/dist/tasks/setRowHidden.d.ts.map +1 -1
- package/dist/tasks/setRowHidden.js +6 -0
- package/dist/tasks/setRowHidden.test.js +27 -2
- package/dist/tasks/setWorkbookRangeValues.d.ts +11 -0
- package/dist/tasks/setWorkbookRangeValues.d.ts.map +1 -0
- package/dist/tasks/setWorkbookRangeValues.js +23 -0
- package/dist/tasks/setWorkbookRangeValues.test.d.ts +2 -0
- package/dist/tasks/setWorkbookRangeValues.test.d.ts.map +1 -0
- package/dist/tasks/setWorkbookRangeValues.test.js +35 -0
- package/package.json +29 -1
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@ Something like this, but whatever works in your context.
|
|
|
14
14
|
const tenantId = getEnvironmentVariable("AZURE_TENANT_ID") as TenantId;
|
|
15
15
|
const clientId = getEnvironmentVariable("AZURE_CLIENT_ID") as ClientId;
|
|
16
16
|
const clientSecret = getEnvironmentVariable("AZURE_CLIENT_SECRET") as ClientSecret;
|
|
17
|
-
const siteId = getEnvironmentVariable("
|
|
18
|
-
const driveId = getEnvironmentVariable("
|
|
17
|
+
const siteId = getEnvironmentVariable("SHAREPOINT_DEFAULT_SITE_ID") as SiteId;
|
|
18
|
+
const driveId = getEnvironmentVariable("SHAREPOINT_DEFAULT_DRIVE_ID") as DriveId;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### Get reference to drive
|
|
@@ -35,16 +35,30 @@ const folder = await createFolder(driveRef, "folder-name");
|
|
|
35
35
|
const workbook = await createWorkbookAndStartSession(folder, "workbook-name");
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
## Getting worksheet
|
|
39
|
+
```typescript
|
|
40
|
+
const workbook = await getWorkbookWorksheetByName(workbook, "Sheet1");
|
|
41
|
+
|
|
42
|
+
// OR this cheat to get the default sheet for a newly-created book
|
|
43
|
+
const worksheetRef = createDefaultWorkbookWorksheetRef(workbook);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Writing values to a range
|
|
39
47
|
```typescript
|
|
40
|
-
const worksheet = await getWorkbookWorksheetByName(workbook, "Sheet1");
|
|
41
48
|
const rangeRef = createWorkbookRangeRef(worksheet, "A1:B2");
|
|
42
|
-
await
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
await setWorkbookRangeValues(rangeRef, [
|
|
50
|
+
[1, 2],
|
|
51
|
+
[3, 4],
|
|
52
|
+
[5, 6],
|
|
53
|
+
]);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Reading values from a range
|
|
57
|
+
```typescript
|
|
58
|
+
for await (const rowValues of iterateWorkbookRangeValues(rangeRef)) {
|
|
59
|
+
// This automatically uses multiple requests if the range is too big for a single request
|
|
60
|
+
debug(` ${rowValues}`);
|
|
61
|
+
}
|
|
48
62
|
```
|
|
49
63
|
|
|
50
64
|
### List files
|
package/biome.jsonc
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"defaultBranch": "main"
|
|
8
8
|
},
|
|
9
9
|
"files": {
|
|
10
|
-
"include": ["src/*.ts"],
|
|
10
|
+
"include": ["src/*.ts", "demo/*.ts"],
|
|
11
11
|
"maxSize": 2097152 // 2MB to cover generated models
|
|
12
12
|
},
|
|
13
13
|
"formatter": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"rules": {
|
|
21
21
|
"all": true // Maximize consistency
|
|
22
22
|
},
|
|
23
|
-
"include": ["
|
|
23
|
+
"include": ["*.ts"]
|
|
24
24
|
},
|
|
25
25
|
"overrides": [
|
|
26
26
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellRangeValues.d.ts","sourceRoot":"","sources":["../../src/models/CellRangeValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellValue.d.ts","sourceRoot":"","sources":["../../src/models/CellValue.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RowRangeValues.d.ts","sourceRoot":"","sources":["../../src/models/RowRangeValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
2
|
+
import type { WorkbookTableRef } from "../../models/WorkbookTableRef.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Delete a workbook table. All data in the table will be cleared.
|
|
5
|
+
*
|
|
6
|
+
* @param tableRef - A reference to the table, optionally including session information.
|
|
7
|
+
* @see https://learn.microsoft.com/en-us/graph/api/table-delete
|
|
8
|
+
*/
|
|
9
|
+
export default function deleteWorkbookTable(tableRef: WorkbookTableRef): GraphOperation<void>;
|
|
10
|
+
//# sourceMappingURL=deleteWorkbookTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteWorkbookTable.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookTable/deleteWorkbookTable.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,cAAc,CAAC,IAAI,CAAC,CAW5F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// https://learn.microsoft.com/en-us/graph/api/table-delete
|
|
2
|
+
// DELETE /sites/{site-id}/drives/{drive-id/items/{item-id}/workbook/tables/{table-id}
|
|
3
|
+
import { operation } from "../../graphApi.js";
|
|
4
|
+
import { generatePath } from "../../services/templatedPaths.js";
|
|
5
|
+
/**
|
|
6
|
+
* Delete a workbook table. All data in the table will be cleared.
|
|
7
|
+
*
|
|
8
|
+
* @param tableRef - A reference to the table, optionally including session information.
|
|
9
|
+
* @see https://learn.microsoft.com/en-us/graph/api/table-delete
|
|
10
|
+
*/
|
|
11
|
+
export default function deleteWorkbookTable(tableRef) {
|
|
12
|
+
return operation({
|
|
13
|
+
contextId: tableRef.contextId,
|
|
14
|
+
method: "DELETE",
|
|
15
|
+
path: generatePath("/sites/{site-id}/drives/{drive-id}/items/{item-id}/workbook/tables/{table-id}", tableRef),
|
|
16
|
+
headers: {
|
|
17
|
+
"workbook-session-id": tableRef.sessionId,
|
|
18
|
+
},
|
|
19
|
+
body: null,
|
|
20
|
+
responseTransform: () => undefined,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteWorkbookTable.test.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookTable/deleteWorkbookTable.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { getDefaultDriveRef } from "../../services/drive.js";
|
|
3
|
+
import { driveItemPath } from "../../services/driveItem.js";
|
|
4
|
+
import { generateTempFileName } from "../../services/temporaryFiles.js";
|
|
5
|
+
import { createWorkbookRangeRef } from "../../services/workbookRange.js";
|
|
6
|
+
import { createDefaultWorkbookWorksheetRef } from "../../services/workbookWorksheet.js";
|
|
7
|
+
import tryDeleteDriveItem from "../../tasks/tryDeleteDriveItem.js";
|
|
8
|
+
import createWorkbook from "../workbook/createWorkbook.js";
|
|
9
|
+
import getWorkbookWorksheetRange from "../workbookRange/getWorkbookWorksheetRange.js";
|
|
10
|
+
import updateWorkbookRange from "../workbookRange/updateWorkbookRange.js";
|
|
11
|
+
import createWorkbookTable from "./createWorkbookTable.js";
|
|
12
|
+
import deleteWorkbookTable from "./deleteWorkbookTable.js";
|
|
13
|
+
import getWorkbookTable from "./getWorkbookTable.js";
|
|
14
|
+
describe("deleteWorkbookTable", () => {
|
|
15
|
+
it("can delete a workbook table", async () => {
|
|
16
|
+
const workbookName = generateTempFileName("xlsx");
|
|
17
|
+
const workbookPath = driveItemPath(workbookName);
|
|
18
|
+
const driveRef = getDefaultDriveRef();
|
|
19
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
20
|
+
try {
|
|
21
|
+
const worksheetRef = createDefaultWorkbookWorksheetRef(workbook);
|
|
22
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:D4");
|
|
23
|
+
const table = await createWorkbookTable(rangeRef, true);
|
|
24
|
+
await updateWorkbookRange(rangeRef, {
|
|
25
|
+
values: [
|
|
26
|
+
["A", "B", "C", "D"],
|
|
27
|
+
[1, 2, 3, 4],
|
|
28
|
+
[5, 6, 7, 8],
|
|
29
|
+
[9, 10, 11, 12],
|
|
30
|
+
],
|
|
31
|
+
});
|
|
32
|
+
await deleteWorkbookTable(table);
|
|
33
|
+
await expect(async () => {
|
|
34
|
+
await getWorkbookTable(table);
|
|
35
|
+
}).rejects.toThrow();
|
|
36
|
+
const range = await getWorkbookWorksheetRange(rangeRef);
|
|
37
|
+
expect(range.values).toEqual([
|
|
38
|
+
["", "", "", ""],
|
|
39
|
+
["", "", "", ""],
|
|
40
|
+
["", "", "", ""],
|
|
41
|
+
["", "", "", ""],
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
await tryDeleteDriveItem(workbook);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
2
|
+
import type { WorkbookTableRef } from "../../models/WorkbookTableRef.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Converts the table into a normal range of cells. All data is preserved.
|
|
5
|
+
*
|
|
6
|
+
* @param tableRef - A reference to the table, optionally including session information.
|
|
7
|
+
* @see https://learn.microsoft.com/en-us/graph/api/table-converttorange
|
|
8
|
+
*/
|
|
9
|
+
export default function deleteWorkbookTablePreservingValues(tableRef: WorkbookTableRef): GraphOperation<void>;
|
|
10
|
+
//# sourceMappingURL=deleteWorkbookTablePreservingValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteWorkbookTablePreservingValues.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookTable/deleteWorkbookTablePreservingValues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mCAAmC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,cAAc,CAAC,IAAI,CAAC,CAW5G"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { operation } from "../../graphApi.js";
|
|
2
|
+
import { generatePath } from "../../services/templatedPaths.js";
|
|
3
|
+
/**
|
|
4
|
+
* Converts the table into a normal range of cells. All data is preserved.
|
|
5
|
+
*
|
|
6
|
+
* @param tableRef - A reference to the table, optionally including session information.
|
|
7
|
+
* @see https://learn.microsoft.com/en-us/graph/api/table-converttorange
|
|
8
|
+
*/
|
|
9
|
+
export default function deleteWorkbookTablePreservingValues(tableRef) {
|
|
10
|
+
return operation({
|
|
11
|
+
contextId: tableRef.contextId,
|
|
12
|
+
method: "POST",
|
|
13
|
+
path: generatePath("/sites/{site-id}/drives/{drive-id}/items/{item-id}/workbook/tables/{table-id}/convertToRange", tableRef),
|
|
14
|
+
headers: {
|
|
15
|
+
"workbook-session-id": tableRef.sessionId,
|
|
16
|
+
},
|
|
17
|
+
body: null,
|
|
18
|
+
responseTransform: () => undefined,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteWorkbookTablePreservingValues.test.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookTable/deleteWorkbookTablePreservingValues.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { getDefaultDriveRef } from "../../services/drive.js";
|
|
3
|
+
import { driveItemPath } from "../../services/driveItem.js";
|
|
4
|
+
import { generateTempFileName } from "../../services/temporaryFiles.js";
|
|
5
|
+
import { createWorkbookRangeRef } from "../../services/workbookRange.js";
|
|
6
|
+
import { createDefaultWorkbookWorksheetRef } from "../../services/workbookWorksheet.js";
|
|
7
|
+
import tryDeleteDriveItem from "../../tasks/tryDeleteDriveItem.js";
|
|
8
|
+
import createWorkbook from "../workbook/createWorkbook.js";
|
|
9
|
+
import getWorkbookWorksheetRange from "../workbookRange/getWorkbookWorksheetRange.js";
|
|
10
|
+
import updateWorkbookRange from "../workbookRange/updateWorkbookRange.js";
|
|
11
|
+
import createWorkbookTable from "./createWorkbookTable.js";
|
|
12
|
+
import deleteWorkbookTablePreservingValues from "./deleteWorkbookTablePreservingValues.js";
|
|
13
|
+
import getWorkbookTable from "./getWorkbookTable.js";
|
|
14
|
+
describe("deleteWorkbookTablePreservingValues", () => {
|
|
15
|
+
it("can convert a table to a normal range while preserving values", async () => {
|
|
16
|
+
const workbookName = generateTempFileName("xlsx");
|
|
17
|
+
const workbookPath = driveItemPath(workbookName);
|
|
18
|
+
const driveRef = getDefaultDriveRef();
|
|
19
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
20
|
+
try {
|
|
21
|
+
const worksheetRef = createDefaultWorkbookWorksheetRef(workbook);
|
|
22
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:D4");
|
|
23
|
+
const table = await createWorkbookTable(rangeRef, true);
|
|
24
|
+
await updateWorkbookRange(rangeRef, {
|
|
25
|
+
values: [
|
|
26
|
+
["A", "B", "C", "D"],
|
|
27
|
+
[1, 2, 3, 4],
|
|
28
|
+
[5, 6, 7, 8],
|
|
29
|
+
[9, 10, 11, 12],
|
|
30
|
+
],
|
|
31
|
+
});
|
|
32
|
+
await deleteWorkbookTablePreservingValues(table);
|
|
33
|
+
await expect(async () => {
|
|
34
|
+
await getWorkbookTable(table);
|
|
35
|
+
}).rejects.toThrow();
|
|
36
|
+
const range = await getWorkbookWorksheetRange(rangeRef);
|
|
37
|
+
expect(range.values).toEqual([
|
|
38
|
+
["A", "B", "C", "D"],
|
|
39
|
+
[1, 2, 3, 4],
|
|
40
|
+
[5, 6, 7, 8],
|
|
41
|
+
[9, 10, 11, 12],
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
await tryDeleteDriveItem(workbook);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -84,4 +84,40 @@ export declare function decrementRowAddress(address: Address): Address;
|
|
|
84
84
|
* @returns True if the addresses overlap, otherwise false.
|
|
85
85
|
*/
|
|
86
86
|
export declare function isAddressOverlapping(address1: Address, address2: Address): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Checks if the address components represent a single row.
|
|
89
|
+
* @param address - The address to check.
|
|
90
|
+
* @returns True if the components represent a single riw, otherwise false.
|
|
91
|
+
*/
|
|
92
|
+
export declare function isSingleRowAddress(address: Address): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Checks if the address components represent a single column.
|
|
95
|
+
* @param address - The address to check.
|
|
96
|
+
* @returns True if the components represent single columns, otherwise false.
|
|
97
|
+
*/
|
|
98
|
+
export declare function isSingleColumnAddress(address: Address): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Checks if the address components represent all columns.
|
|
101
|
+
* @param address - The address to check.
|
|
102
|
+
* @returns True if the components represent all columns, otherwise false.
|
|
103
|
+
*/
|
|
104
|
+
export declare function isAllColumnsAddress(address: Address): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Checks if the address components represent all rows.
|
|
107
|
+
* @param address - The address to check.
|
|
108
|
+
* @returns True if the components represent all rows, otherwise false.
|
|
109
|
+
*/
|
|
110
|
+
export declare function isAllRowsAddress(address: Address): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Counts the number of rows in a given address.
|
|
113
|
+
* @param address - The address to analyze.
|
|
114
|
+
* @returns The number of rows in the address.
|
|
115
|
+
*/
|
|
116
|
+
export declare function countAddressRows(address: Address): number;
|
|
117
|
+
/**
|
|
118
|
+
* Counts the number of columns in a given address.
|
|
119
|
+
* @param address - The address to analyze.
|
|
120
|
+
* @returns The number of columns in the address.
|
|
121
|
+
*/
|
|
122
|
+
export declare function countAddressColumns(address: Address): number;
|
|
87
123
|
//# sourceMappingURL=addressManipulation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addressManipulation.d.ts","sourceRoot":"","sources":["../../src/services/addressManipulation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAoB,aAAa,EAAsB,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAmBnJ,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,UAAU,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAcpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CA6BrE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAqChG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAKlF"}
|
|
1
|
+
{"version":3,"file":"addressManipulation.d.ts","sourceRoot":"","sources":["../../src/services/addressManipulation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAoB,aAAa,EAAsB,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAmBnJ,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,UAAU,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAcpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CA6BrE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAqChG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAKlF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG7D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAGzD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAG5D"}
|
|
@@ -32,16 +32,16 @@ export function decomposeAddress(address) {
|
|
|
32
32
|
* @throws InvalidArgumentError if the components are invalid.
|
|
33
33
|
*/
|
|
34
34
|
export function composeAddress(components) {
|
|
35
|
-
if (isSingleColumn(components) &&
|
|
35
|
+
if (isSingleColumn(components) && isAllRows(components)) {
|
|
36
36
|
return composeColumnAddress(components.startColumn);
|
|
37
37
|
}
|
|
38
|
-
if (isSingleRow(components) &&
|
|
38
|
+
if (isSingleRow(components) && isAllColumns(components)) {
|
|
39
39
|
return composeRowAddress(components.startRow);
|
|
40
40
|
}
|
|
41
|
-
if (
|
|
41
|
+
if (isAllRows(components)) {
|
|
42
42
|
return composeColumnRangeAddress(components.startColumn, components.endColumn);
|
|
43
43
|
}
|
|
44
|
-
if (
|
|
44
|
+
if (isAllColumns(components)) {
|
|
45
45
|
return composeRowRangeAddress(components.startRow, components.endRow);
|
|
46
46
|
}
|
|
47
47
|
if (isSingleColumn(components) && isSingleRow(components)) {
|
|
@@ -140,10 +140,10 @@ export function getLastColumnAddress(address) {
|
|
|
140
140
|
*/
|
|
141
141
|
export function offsetAddress(address, columnOffset, rowOffset) {
|
|
142
142
|
const components = decomposeAddress(address);
|
|
143
|
-
if (
|
|
143
|
+
if (isAllRows(components) && rowOffset !== 0) {
|
|
144
144
|
throw new UnsupportedAddressTypeError("All rows are selected. Cannot offset rows.");
|
|
145
145
|
}
|
|
146
|
-
if (
|
|
146
|
+
if (isAllColumns(components) && columnOffset !== 0) {
|
|
147
147
|
throw new UnsupportedAddressTypeError("All columns are selected. Cannot offset columns.");
|
|
148
148
|
}
|
|
149
149
|
const newStartRowIndex = rowAddressToOffset(components.startRow) + rowOffset;
|
|
@@ -194,6 +194,72 @@ export function isAddressOverlapping(address1, address2) {
|
|
|
194
194
|
const components2 = decomposeAddress(address2);
|
|
195
195
|
return components1.startColumn <= components2.endColumn && components1.endColumn >= components2.startColumn && rowAddressToOffset(components1.startRow) <= rowAddressToOffset(components2.endRow) && rowAddressToOffset(components1.endRow) >= rowAddressToOffset(components2.startRow);
|
|
196
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Checks if the address components represent a single row.
|
|
199
|
+
* @param address - The address to check.
|
|
200
|
+
* @returns True if the components represent a single riw, otherwise false.
|
|
201
|
+
*/
|
|
202
|
+
export function isSingleRowAddress(address) {
|
|
203
|
+
const components = decomposeAddress(address);
|
|
204
|
+
return isSingleRow(components);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Checks if the address components represent a single column.
|
|
208
|
+
* @param address - The address to check.
|
|
209
|
+
* @returns True if the components represent single columns, otherwise false.
|
|
210
|
+
*/
|
|
211
|
+
export function isSingleColumnAddress(address) {
|
|
212
|
+
const components = decomposeAddress(address);
|
|
213
|
+
return isSingleColumn(components);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Checks if the address components represent all columns.
|
|
217
|
+
* @param address - The address to check.
|
|
218
|
+
* @returns True if the components represent all columns, otherwise false.
|
|
219
|
+
*/
|
|
220
|
+
export function isAllColumnsAddress(address) {
|
|
221
|
+
const components = decomposeAddress(address);
|
|
222
|
+
return isAllColumns(components);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Checks if the address components represent all rows.
|
|
226
|
+
* @param address - The address to check.
|
|
227
|
+
* @returns True if the components represent all rows, otherwise false.
|
|
228
|
+
*/
|
|
229
|
+
export function isAllRowsAddress(address) {
|
|
230
|
+
const components = decomposeAddress(address);
|
|
231
|
+
return isAllRows(components);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Counts the number of rows in a given address.
|
|
235
|
+
* @param address - The address to analyze.
|
|
236
|
+
* @returns The number of rows in the address.
|
|
237
|
+
*/
|
|
238
|
+
export function countAddressRows(address) {
|
|
239
|
+
const components = decomposeAddress(address);
|
|
240
|
+
return rowAddressToOffset(components.endRow) - rowAddressToOffset(components.startRow) + 1;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Counts the number of columns in a given address.
|
|
244
|
+
* @param address - The address to analyze.
|
|
245
|
+
* @returns The number of columns in the address.
|
|
246
|
+
*/
|
|
247
|
+
export function countAddressColumns(address) {
|
|
248
|
+
const components = decomposeAddress(address);
|
|
249
|
+
return columnAddressToOffset(components.endColumn) - columnAddressToOffset(components.startColumn) + 1;
|
|
250
|
+
}
|
|
251
|
+
function isSingleRow(components) {
|
|
252
|
+
return components.startRow === components.endRow;
|
|
253
|
+
}
|
|
254
|
+
function isSingleColumn(components) {
|
|
255
|
+
return components.startColumn === components.endColumn;
|
|
256
|
+
}
|
|
257
|
+
function isAllColumns(components) {
|
|
258
|
+
return components.startColumn === firstColumn && components.endColumn === lastColumn;
|
|
259
|
+
}
|
|
260
|
+
function isAllRows(components) {
|
|
261
|
+
return components.startRow === firstRow && components.endRow === lastRow;
|
|
262
|
+
}
|
|
197
263
|
function composeCellRangeAddress(startColumn, startRow, endColumn, endRow) {
|
|
198
264
|
return `${startColumn}${startRow}:${endColumn}${endRow}`;
|
|
199
265
|
}
|
|
@@ -212,15 +278,3 @@ function composeRowAddress(startRow) {
|
|
|
212
278
|
function composeColumnAddress(startColumn) {
|
|
213
279
|
return startColumn;
|
|
214
280
|
}
|
|
215
|
-
function isSingleRow(components) {
|
|
216
|
-
return components.startRow === components.endRow;
|
|
217
|
-
}
|
|
218
|
-
function isSingleColumn(components) {
|
|
219
|
-
return components.startColumn === components.endColumn;
|
|
220
|
-
}
|
|
221
|
-
function isMaxColumns(components) {
|
|
222
|
-
return components.startColumn === firstColumn && components.endColumn === lastColumn;
|
|
223
|
-
}
|
|
224
|
-
function isMaxRows(components) {
|
|
225
|
-
return components.startRow === firstRow && components.endRow === lastRow;
|
|
226
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import InvalidArgumentError from "../errors/InvalidArgumentError.js";
|
|
3
|
-
import { composeAddress, decomposeAddress, decrementRowAddress, getFirstCellAddress, getFirstColumnAddress, getFirstRowAddress, getLastCellAddress, getLastColumnAddress, getLastRowAddress, incrementRowAddress, isAddressOverlapping, offsetAddress } from "./addressManipulation.js";
|
|
3
|
+
import { composeAddress, countAddressColumns, countAddressRows, decomposeAddress, decrementRowAddress, getFirstCellAddress, getFirstColumnAddress, getFirstRowAddress, getLastCellAddress, getLastColumnAddress, getLastRowAddress, incrementRowAddress, isAddressOverlapping, isAllColumnsAddress, isAllRowsAddress, isSingleColumnAddress, isSingleRowAddress, offsetAddress, } from "./addressManipulation.js";
|
|
4
4
|
describe("getFirstCellAddress", () => {
|
|
5
5
|
it("should return the start cell of a range address", () => {
|
|
6
6
|
expect(getFirstCellAddress("C3:D4")).toBe("C3");
|
|
@@ -308,3 +308,77 @@ describe("isAddressOverlapping", () => {
|
|
|
308
308
|
expect(isAddressOverlapping("A1", "B1")).toBe(false); // Different columns
|
|
309
309
|
});
|
|
310
310
|
});
|
|
311
|
+
describe("isSingleRowAddress", () => {
|
|
312
|
+
it("should return true for single row addresses", () => {
|
|
313
|
+
expect(isSingleRowAddress("1")).toBe(true);
|
|
314
|
+
expect(isSingleRowAddress("A1:A1")).toBe(true);
|
|
315
|
+
});
|
|
316
|
+
it("should return false for multi-row addresses", () => {
|
|
317
|
+
expect(isSingleRowAddress("1:2")).toBe(false);
|
|
318
|
+
expect(isSingleRowAddress("A1:A2")).toBe(false);
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
describe("isSingleColumnAddress", () => {
|
|
322
|
+
it("should return true for single column addresses", () => {
|
|
323
|
+
expect(isSingleColumnAddress("A")).toBe(true);
|
|
324
|
+
expect(isSingleColumnAddress("A1:A1")).toBe(true);
|
|
325
|
+
});
|
|
326
|
+
it("should return false for multi-column addresses", () => {
|
|
327
|
+
expect(isSingleColumnAddress("A:B")).toBe(false);
|
|
328
|
+
expect(isSingleColumnAddress("A1:B1")).toBe(false);
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
describe("isAllColumnsAddress", () => {
|
|
332
|
+
it("should return true for addresses spanning all columns", () => {
|
|
333
|
+
expect(isAllColumnsAddress("1")).toBe(true);
|
|
334
|
+
expect(isAllColumnsAddress("1:10")).toBe(true);
|
|
335
|
+
});
|
|
336
|
+
it("should return false for addresses not spanning all columns", () => {
|
|
337
|
+
expect(isAllColumnsAddress("A")).toBe(false);
|
|
338
|
+
expect(isAllColumnsAddress("A1:B1")).toBe(false);
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
describe("isAllRowsAddress", () => {
|
|
342
|
+
it("should return true for addresses spanning all rows", () => {
|
|
343
|
+
expect(isAllRowsAddress("A")).toBe(true);
|
|
344
|
+
expect(isAllRowsAddress("A:C")).toBe(true);
|
|
345
|
+
});
|
|
346
|
+
it("should return false for addresses not spanning all rows", () => {
|
|
347
|
+
expect(isAllRowsAddress("1")).toBe(false);
|
|
348
|
+
expect(isAllRowsAddress("A1:A10")).toBe(false);
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
describe("countAddressRows", () => {
|
|
352
|
+
it("should return the correct number of rows for a cell range", () => {
|
|
353
|
+
expect(countAddressRows("A1:C5")).toBe(5);
|
|
354
|
+
});
|
|
355
|
+
it("should return the correct number of rows for a row range", () => {
|
|
356
|
+
expect(countAddressRows("1:5")).toBe(5);
|
|
357
|
+
});
|
|
358
|
+
it("should return 1 for a single cell address", () => {
|
|
359
|
+
expect(countAddressRows("A1")).toBe(1);
|
|
360
|
+
});
|
|
361
|
+
it("should return the correct number of rows for a column address", () => {
|
|
362
|
+
expect(countAddressRows("A")).toBe(1048576);
|
|
363
|
+
});
|
|
364
|
+
it("should return the correct number of rows for a column range address", () => {
|
|
365
|
+
expect(countAddressRows("A:C")).toBe(1048576);
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
describe("countAddressColumns", () => {
|
|
369
|
+
it("should return the correct number of columns for a cell range", () => {
|
|
370
|
+
expect(countAddressColumns("A1:C5")).toBe(3);
|
|
371
|
+
});
|
|
372
|
+
it("should return the correct number of columns for a column range", () => {
|
|
373
|
+
expect(countAddressColumns("A:C")).toBe(3);
|
|
374
|
+
});
|
|
375
|
+
it("should return 1 for a single cell address", () => {
|
|
376
|
+
expect(countAddressColumns("A1")).toBe(1);
|
|
377
|
+
});
|
|
378
|
+
it("should return the correct number of columns for a row address", () => {
|
|
379
|
+
expect(countAddressColumns("1")).toBe(16384);
|
|
380
|
+
});
|
|
381
|
+
it("should return the correct number of columns for a row range address", () => {
|
|
382
|
+
expect(countAddressColumns("1:5")).toBe(16384);
|
|
383
|
+
});
|
|
384
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RowRangeValues } from "../models/RowRangeValues.ts";
|
|
2
|
+
import type { WorkbookRangeRef } from "../models/WorkbookRangeRef.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Iterates over the values of a workbook range in chunks, fetching data in manageable sizes.
|
|
5
|
+
*
|
|
6
|
+
* @param rangeRef - A reference to the workbook range to iterate over.
|
|
7
|
+
* @param overwriteRowsPerRequest - Optional. The number of rows to fetch per request. If omitted, it is automatically calculated.
|
|
8
|
+
* @returns An async iterable that yields rows of range values.
|
|
9
|
+
*/
|
|
10
|
+
export default function iterateWorkbookRangeValues(rangeRef: WorkbookRangeRef, overwriteRowsPerRequest?: number | null): AsyncIterable<RowRangeValues>;
|
|
11
|
+
//# sourceMappingURL=iterateWorkbookRangeValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterateWorkbookRangeValues.d.ts","sourceRoot":"","sources":["../../src/tasks/iterateWorkbookRangeValues.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AActE;;;;;;GAMG;AACH,wBAA+B,0BAA0B,CAAC,QAAQ,EAAE,gBAAgB,EAAE,uBAAuB,GAAE,MAAM,GAAG,IAAW,GAAG,aAAa,CAAC,cAAc,CAAC,CAoClK"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import InvalidArgumentError from "../errors/InvalidArgumentError.js";
|
|
2
|
+
import getWorkbookWorksheetRange from "../operations/workbookRange/getWorkbookWorksheetRange.js";
|
|
3
|
+
import { composeAddress, decomposeAddress } from "../services/addressManipulation.js";
|
|
4
|
+
import { columnAddressToOffset, offsetToRowAddress, rowAddressToOffset } from "../services/addressOffset.js";
|
|
5
|
+
import { createWorkbookRangeRef } from "../services/workbookRange.js";
|
|
6
|
+
/**
|
|
7
|
+
* Maximum number of cells that can be retrieved in a single request, unless overwritten.
|
|
8
|
+
* @remarks The Microsoft Graph API documentation does not specify a fixed maximum number of cells that can be retrieved in a single request.
|
|
9
|
+
* However, it mentions that large ranges may result in errors due to resource constraints. Additionally, discussions in developer
|
|
10
|
+
* communities suggest that requests exceeding 10,000 cells may encounter issues.
|
|
11
|
+
*/
|
|
12
|
+
const maxCellsPerRequest = 10_000;
|
|
13
|
+
/**
|
|
14
|
+
* Iterates over the values of a workbook range in chunks, fetching data in manageable sizes.
|
|
15
|
+
*
|
|
16
|
+
* @param rangeRef - A reference to the workbook range to iterate over.
|
|
17
|
+
* @param overwriteRowsPerRequest - Optional. The number of rows to fetch per request. If omitted, it is automatically calculated.
|
|
18
|
+
* @returns An async iterable that yields rows of range values.
|
|
19
|
+
*/
|
|
20
|
+
export default async function* iterateWorkbookRangeValues(rangeRef, overwriteRowsPerRequest = null) {
|
|
21
|
+
const address = rangeRef.address;
|
|
22
|
+
const components = decomposeAddress(address);
|
|
23
|
+
const columnsPerRow = columnAddressToOffset(components.endColumn) - columnAddressToOffset(components.startColumn) + 1;
|
|
24
|
+
if (overwriteRowsPerRequest !== null && overwriteRowsPerRequest < 1) {
|
|
25
|
+
throw new InvalidArgumentError("overwriteRowsPerRequest must be greater than 0");
|
|
26
|
+
}
|
|
27
|
+
const rowsPerRequest = overwriteRowsPerRequest ?? Math.floor(maxCellsPerRequest / columnsPerRow);
|
|
28
|
+
const rangeStartRowOffset = rowAddressToOffset(components.startRow);
|
|
29
|
+
const rangeEndRowOffset = rowAddressToOffset(components.endRow);
|
|
30
|
+
for (let chunkRowOffset = rangeStartRowOffset; chunkRowOffset <= rangeEndRowOffset; chunkRowOffset = (chunkRowOffset + rowsPerRequest)) {
|
|
31
|
+
const requestStartRowOffset = chunkRowOffset;
|
|
32
|
+
const requestEndRowOffset = Math.min(chunkRowOffset + rowsPerRequest - 1, rangeEndRowOffset);
|
|
33
|
+
const chunkStartRow = offsetToRowAddress(requestStartRowOffset);
|
|
34
|
+
const chunkEndRow = offsetToRowAddress(requestEndRowOffset);
|
|
35
|
+
const requestAddress = composeAddress({
|
|
36
|
+
startRow: chunkStartRow,
|
|
37
|
+
endRow: chunkEndRow,
|
|
38
|
+
startColumn: components.startColumn,
|
|
39
|
+
endColumn: components.endColumn,
|
|
40
|
+
});
|
|
41
|
+
const requestRef = createWorkbookRangeRef(rangeRef, requestAddress);
|
|
42
|
+
const range = await getWorkbookWorksheetRange(requestRef);
|
|
43
|
+
for (const row of range.values) {
|
|
44
|
+
yield row;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterateWorkbookRangeValues.test.d.ts","sourceRoot":"","sources":["../../src/tasks/iterateWorkbookRangeValues.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import calculateWorkbook from "../operations/workbook/calculateWorkbook.js";
|
|
3
|
+
import createWorkbook from "../operations/workbook/createWorkbook.js";
|
|
4
|
+
import { getDefaultDriveRef } from "../services/drive.js";
|
|
5
|
+
import { driveItemPath } from "../services/driveItem.js";
|
|
6
|
+
import { generateTempFileName } from "../services/temporaryFiles.js";
|
|
7
|
+
import { createWorkbookRangeRef } from "../services/workbookRange.js";
|
|
8
|
+
import { createWorkbookWorksheetRef, defaultWorkbookWorksheetId } from "../services/workbookWorksheet.js";
|
|
9
|
+
import iterateWorkbookRangeValues from "./iterateWorkbookRangeValues.js";
|
|
10
|
+
import setWorkbookRangeValues from "./setWorkbookRangeValues.js";
|
|
11
|
+
import tryDeleteDriveItem from "./tryDeleteDriveItem.js";
|
|
12
|
+
describe("iterateWorkbookRangeValues", () => {
|
|
13
|
+
it("Single request", async () => {
|
|
14
|
+
const workbookName = generateTempFileName("xlsx");
|
|
15
|
+
const workbookPath = driveItemPath(workbookName);
|
|
16
|
+
const driveRef = getDefaultDriveRef();
|
|
17
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
18
|
+
const worksheetRef = createWorkbookWorksheetRef(workbook, defaultWorkbookWorksheetId);
|
|
19
|
+
try {
|
|
20
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:C3");
|
|
21
|
+
const values = [
|
|
22
|
+
[1, 2, 3],
|
|
23
|
+
[4, 5, 6],
|
|
24
|
+
[7, 8, 9],
|
|
25
|
+
];
|
|
26
|
+
await setWorkbookRangeValues(rangeRef, values);
|
|
27
|
+
await calculateWorkbook(workbook);
|
|
28
|
+
let idx = 0;
|
|
29
|
+
for await (const row of iterateWorkbookRangeValues(rangeRef)) {
|
|
30
|
+
expect(row).toEqual(values[idx++]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
await tryDeleteDriveItem(workbook);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
it("Multiple requests", async () => {
|
|
38
|
+
const workbookName = generateTempFileName("xlsx");
|
|
39
|
+
const workbookPath = driveItemPath(workbookName);
|
|
40
|
+
const driveRef = getDefaultDriveRef();
|
|
41
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
42
|
+
const worksheetRef = createWorkbookWorksheetRef(workbook, defaultWorkbookWorksheetId);
|
|
43
|
+
try {
|
|
44
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:C3");
|
|
45
|
+
const values = [
|
|
46
|
+
[1, 2, 3],
|
|
47
|
+
[4, 5, 6],
|
|
48
|
+
[7, 8, 9],
|
|
49
|
+
];
|
|
50
|
+
await setWorkbookRangeValues(rangeRef, values);
|
|
51
|
+
await calculateWorkbook(workbook);
|
|
52
|
+
let idx = 0;
|
|
53
|
+
for await (const row of iterateWorkbookRangeValues(rangeRef, 1)) {
|
|
54
|
+
expect(row).toEqual(values[idx++]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
await tryDeleteDriveItem(workbook);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setColumnHidden.d.ts","sourceRoot":"","sources":["../../src/tasks/setColumnHidden.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"setColumnHidden.d.ts","sourceRoot":"","sources":["../../src/tasks/setColumnHidden.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE;;;;;;GAMG;AACH,wBAA8B,eAAe,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,GAAG,gBAAgB,CAAC,CAWpI"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import updateWorkbookRange from "../operations/workbookRange/updateWorkbookRange.js";
|
|
2
|
+
import { decomposeAddress, isAllColumnsAddress } from "../services/addressManipulation.js";
|
|
2
3
|
/**
|
|
3
4
|
* Hide or show one or more columns.
|
|
4
5
|
*
|
|
@@ -7,6 +8,11 @@ import updateWorkbookRange from "../operations/workbookRange/updateWorkbookRange
|
|
|
7
8
|
* @returns The updated workbook range.
|
|
8
9
|
*/
|
|
9
10
|
export default async function setColumnHidden(rangeRef, hidden) {
|
|
11
|
+
if (isAllColumnsAddress(rangeRef.address)) {
|
|
12
|
+
throw new Error("Cannot hide all columns");
|
|
13
|
+
}
|
|
14
|
+
const components = decomposeAddress(rangeRef.address);
|
|
15
|
+
rangeRef.address = `${components.startColumn}:${components.endColumn}`; // Workaround API explicitly wanting a range
|
|
10
16
|
return await updateWorkbookRange(rangeRef, {
|
|
11
17
|
columnHidden: hidden,
|
|
12
18
|
});
|
|
@@ -11,7 +11,7 @@ import { createWorkbookWorksheetRef, defaultWorkbookWorksheetId } from "../servi
|
|
|
11
11
|
import setColumnHidden from "./setColumnHidden.js";
|
|
12
12
|
import tryDeleteDriveItem from "./tryDeleteDriveItem.js";
|
|
13
13
|
describe("setColumnHidden", () => {
|
|
14
|
-
it("hides a column in an existing workbook", async () => {
|
|
14
|
+
it("hides a single column in an existing workbook", async () => {
|
|
15
15
|
const workbookName = generateTempFileName("xlsx");
|
|
16
16
|
const workbookPath = driveItemPath(workbookName);
|
|
17
17
|
const driveRef = getDefaultDriveRef();
|
|
@@ -26,7 +26,7 @@ describe("setColumnHidden", () => {
|
|
|
26
26
|
[7, 8, 9],
|
|
27
27
|
],
|
|
28
28
|
});
|
|
29
|
-
const hiddenRange = createWorkbookRangeRef(worksheetRef, "B
|
|
29
|
+
const hiddenRange = createWorkbookRangeRef(worksheetRef, "B");
|
|
30
30
|
await setColumnHidden(hiddenRange, true);
|
|
31
31
|
await calculateWorkbook(workbook);
|
|
32
32
|
const visibleView = await getWorkbookVisibleRange(rangeRef);
|
|
@@ -40,4 +40,29 @@ describe("setColumnHidden", () => {
|
|
|
40
40
|
await tryDeleteDriveItem(workbook);
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
+
it("hides a multiple columns in an existing workbook", async () => {
|
|
44
|
+
const workbookName = generateTempFileName("xlsx");
|
|
45
|
+
const workbookPath = driveItemPath(workbookName);
|
|
46
|
+
const driveRef = getDefaultDriveRef();
|
|
47
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
48
|
+
const worksheetRef = createWorkbookWorksheetRef(workbook, defaultWorkbookWorksheetId);
|
|
49
|
+
try {
|
|
50
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:C3");
|
|
51
|
+
await updateWorkbookRange(rangeRef, {
|
|
52
|
+
values: [
|
|
53
|
+
[1, 2, 3],
|
|
54
|
+
[4, 5, 6],
|
|
55
|
+
[7, 8, 9],
|
|
56
|
+
],
|
|
57
|
+
});
|
|
58
|
+
const hiddenRange = createWorkbookRangeRef(worksheetRef, "B:C");
|
|
59
|
+
await setColumnHidden(hiddenRange, true);
|
|
60
|
+
await calculateWorkbook(workbook);
|
|
61
|
+
const visibleView = await getWorkbookVisibleRange(rangeRef);
|
|
62
|
+
expect(visibleView.values).toEqual([[1], [4], [7]]);
|
|
63
|
+
}
|
|
64
|
+
finally {
|
|
65
|
+
await tryDeleteDriveItem(workbook);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
43
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setRowHidden.d.ts","sourceRoot":"","sources":["../../src/tasks/setRowHidden.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"setRowHidden.d.ts","sourceRoot":"","sources":["../../src/tasks/setRowHidden.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE;;;;;;GAMG;AACH,wBAA8B,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,GAAG,gBAAgB,CAAC,CAWjI"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import updateWorkbookRange from "../operations/workbookRange/updateWorkbookRange.js";
|
|
2
|
+
import { decomposeAddress, isAllRowsAddress } from "../services/addressManipulation.js";
|
|
2
3
|
/**
|
|
3
4
|
* Hide or show one or more rows.
|
|
4
5
|
*
|
|
@@ -7,6 +8,11 @@ import updateWorkbookRange from "../operations/workbookRange/updateWorkbookRange
|
|
|
7
8
|
* @returns The updated workbook range.
|
|
8
9
|
*/
|
|
9
10
|
export default async function setRowHidden(rangeRef, hidden) {
|
|
11
|
+
if (isAllRowsAddress(rangeRef.address)) {
|
|
12
|
+
throw new Error("Cannot hide all rows");
|
|
13
|
+
}
|
|
14
|
+
const components = decomposeAddress(rangeRef.address);
|
|
15
|
+
rangeRef.address = `${components.startRow}:${components.endRow}`; // Workaround API explicitly wanting a range
|
|
10
16
|
return await updateWorkbookRange(rangeRef, {
|
|
11
17
|
rowHidden: hidden,
|
|
12
18
|
});
|
|
@@ -11,7 +11,7 @@ import { createWorkbookWorksheetRef, defaultWorkbookWorksheetId } from "../servi
|
|
|
11
11
|
import setRowHidden from "./setRowHidden.js";
|
|
12
12
|
import tryDeleteDriveItem from "./tryDeleteDriveItem.js";
|
|
13
13
|
describe("setRowHidden", () => {
|
|
14
|
-
it("hides a row in an existing workbook", async () => {
|
|
14
|
+
it("hides a single row in an existing workbook", async () => {
|
|
15
15
|
const workbookName = generateTempFileName("xlsx");
|
|
16
16
|
const workbookPath = driveItemPath(workbookName);
|
|
17
17
|
const driveRef = getDefaultDriveRef();
|
|
@@ -26,7 +26,7 @@ describe("setRowHidden", () => {
|
|
|
26
26
|
[7, 8, 9],
|
|
27
27
|
],
|
|
28
28
|
});
|
|
29
|
-
const hiddenRange = createWorkbookRangeRef(worksheetRef, "2
|
|
29
|
+
const hiddenRange = createWorkbookRangeRef(worksheetRef, "2");
|
|
30
30
|
await setRowHidden(hiddenRange, true);
|
|
31
31
|
await calculateWorkbook(workbook);
|
|
32
32
|
const visibleView = await getWorkbookVisibleRange(rangeRef);
|
|
@@ -39,4 +39,29 @@ describe("setRowHidden", () => {
|
|
|
39
39
|
await tryDeleteDriveItem(workbook);
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
it("hides multiple rows in an existing workbook", async () => {
|
|
43
|
+
const workbookName = generateTempFileName("xlsx");
|
|
44
|
+
const workbookPath = driveItemPath(workbookName);
|
|
45
|
+
const driveRef = getDefaultDriveRef();
|
|
46
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
47
|
+
const worksheetRef = createWorkbookWorksheetRef(workbook, defaultWorkbookWorksheetId);
|
|
48
|
+
try {
|
|
49
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:C3");
|
|
50
|
+
await updateWorkbookRange(rangeRef, {
|
|
51
|
+
values: [
|
|
52
|
+
[1, 2, 3],
|
|
53
|
+
[4, 5, 6],
|
|
54
|
+
[7, 8, 9],
|
|
55
|
+
],
|
|
56
|
+
});
|
|
57
|
+
const hiddenRange = createWorkbookRangeRef(worksheetRef, "2:3");
|
|
58
|
+
await setRowHidden(hiddenRange, true);
|
|
59
|
+
await calculateWorkbook(workbook);
|
|
60
|
+
const visibleView = await getWorkbookVisibleRange(rangeRef);
|
|
61
|
+
expect(visibleView.values).toEqual([[1, 2, 3]]);
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
await tryDeleteDriveItem(workbook);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
42
67
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CellRangeValues } from "../models/CellRangeValues.ts";
|
|
2
|
+
import type { WorkbookRangeRef } from "../models/WorkbookRangeRef.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Sets the values of a specified workbook range.
|
|
5
|
+
*
|
|
6
|
+
* @param {WorkbookRangeRef} rangeRef - A reference to the workbook range to update.
|
|
7
|
+
* @param {CellRangeValues} values - The values to set in the specified workbook range. Must match the range's dimensions.
|
|
8
|
+
* @returns Nothing
|
|
9
|
+
*/
|
|
10
|
+
export default function setWorkbookRangeValues(rangeRef: WorkbookRangeRef, values: CellRangeValues): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=setWorkbookRangeValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setWorkbookRangeValues.d.ts","sourceRoot":"","sources":["../../src/tasks/setWorkbookRangeValues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE;;;;;;GAMG;AACH,wBAA8B,sBAAsB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,iBAcvG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import InvalidArgumentError from "../errors/InvalidArgumentError.js";
|
|
2
|
+
import updateWorkbookRange from "../operations/workbookRange/updateWorkbookRange.js";
|
|
3
|
+
import { countAddressColumns, countAddressRows } from "../services/addressManipulation.js";
|
|
4
|
+
/**
|
|
5
|
+
* Sets the values of a specified workbook range.
|
|
6
|
+
*
|
|
7
|
+
* @param {WorkbookRangeRef} rangeRef - A reference to the workbook range to update.
|
|
8
|
+
* @param {CellRangeValues} values - The values to set in the specified workbook range. Must match the range's dimensions.
|
|
9
|
+
* @returns Nothing
|
|
10
|
+
*/
|
|
11
|
+
export default async function setWorkbookRangeValues(rangeRef, values) {
|
|
12
|
+
const rowCount = countAddressRows(rangeRef.address);
|
|
13
|
+
if (values.length !== rowCount) {
|
|
14
|
+
throw new InvalidArgumentError(`The number of rows in the values array (${values.length}) does not match the number of rows in the range (${rowCount}).`);
|
|
15
|
+
}
|
|
16
|
+
const columnCount = countAddressColumns(rangeRef.address);
|
|
17
|
+
if (values.some((row) => row.length !== columnCount)) {
|
|
18
|
+
throw new InvalidArgumentError(`The number of columns in the values array does not match the number of columns in the range (${columnCount}).`);
|
|
19
|
+
}
|
|
20
|
+
await updateWorkbookRange(rangeRef, {
|
|
21
|
+
values: values,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setWorkbookRangeValues.test.d.ts","sourceRoot":"","sources":["../../src/tasks/setWorkbookRangeValues.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import calculateWorkbook from "../operations/workbook/calculateWorkbook.js";
|
|
3
|
+
import createWorkbook from "../operations/workbook/createWorkbook.js";
|
|
4
|
+
import getWorkbookWorksheetUsedRange from "../operations/workbookWorksheet/getWorkbookWorksheetUsedRange.js";
|
|
5
|
+
import { getDefaultDriveRef } from "../services/drive.js";
|
|
6
|
+
import { driveItemPath } from "../services/driveItem.js";
|
|
7
|
+
import { generateTempFileName } from "../services/temporaryFiles.js";
|
|
8
|
+
import { createWorkbookRangeRef } from "../services/workbookRange.js";
|
|
9
|
+
import { createWorkbookWorksheetRef, defaultWorkbookWorksheetId } from "../services/workbookWorksheet.js";
|
|
10
|
+
import setWorkbookRangeValues from "./setWorkbookRangeValues.js";
|
|
11
|
+
import tryDeleteDriveItem from "./tryDeleteDriveItem.js";
|
|
12
|
+
describe("setWorkbookRangeValues", () => {
|
|
13
|
+
it("calls updateWorkbookRange with the correct arguments when values match the range dimensions", async () => {
|
|
14
|
+
const workbookName = generateTempFileName("xlsx");
|
|
15
|
+
const workbookPath = driveItemPath(workbookName);
|
|
16
|
+
const driveRef = getDefaultDriveRef();
|
|
17
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
18
|
+
const worksheetRef = createWorkbookWorksheetRef(workbook, defaultWorkbookWorksheetId);
|
|
19
|
+
try {
|
|
20
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:C3");
|
|
21
|
+
const values = [
|
|
22
|
+
[1, 2, 3],
|
|
23
|
+
[4, 5, 6],
|
|
24
|
+
[7, 8, 9],
|
|
25
|
+
];
|
|
26
|
+
await setWorkbookRangeValues(rangeRef, values);
|
|
27
|
+
await calculateWorkbook(workbook);
|
|
28
|
+
const visibleView = await getWorkbookWorksheetUsedRange(rangeRef);
|
|
29
|
+
expect(visibleView.values).toEqual(values);
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
await tryDeleteDriveItem(workbook);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microsoft-graph",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Microsoft GraphAPI SDK for NodeJS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -109,6 +109,14 @@
|
|
|
109
109
|
"import": "./dist/models/Cell.js",
|
|
110
110
|
"types": "./dist/models/Cell.d.ts"
|
|
111
111
|
},
|
|
112
|
+
"./models/CellRangeValues": {
|
|
113
|
+
"import": "./dist/models/CellRangeValues.js",
|
|
114
|
+
"types": "./dist/models/CellRangeValues.d.ts"
|
|
115
|
+
},
|
|
116
|
+
"./models/CellValue": {
|
|
117
|
+
"import": "./dist/models/CellValue.js",
|
|
118
|
+
"types": "./dist/models/CellValue.d.ts"
|
|
119
|
+
},
|
|
112
120
|
"./models/ClientId": {
|
|
113
121
|
"import": "./dist/models/ClientId.js",
|
|
114
122
|
"types": "./dist/models/ClientId.d.ts"
|
|
@@ -193,6 +201,10 @@
|
|
|
193
201
|
"import": "./dist/models/RowOffset.js",
|
|
194
202
|
"types": "./dist/models/RowOffset.d.ts"
|
|
195
203
|
},
|
|
204
|
+
"./models/RowRangeValues": {
|
|
205
|
+
"import": "./dist/models/RowRangeValues.js",
|
|
206
|
+
"types": "./dist/models/RowRangeValues.d.ts"
|
|
207
|
+
},
|
|
196
208
|
"./models/Scope": {
|
|
197
209
|
"import": "./dist/models/Scope.js",
|
|
198
210
|
"types": "./dist/models/Scope.d.ts"
|
|
@@ -385,6 +397,14 @@
|
|
|
385
397
|
"import": "./dist/operations/workbookTable/createWorkbookTable.js",
|
|
386
398
|
"types": "./dist/operations/workbookTable/createWorkbookTable.d.ts"
|
|
387
399
|
},
|
|
400
|
+
"./operations/workbookTable/deleteWorkbookTable": {
|
|
401
|
+
"import": "./dist/operations/workbookTable/deleteWorkbookTable.js",
|
|
402
|
+
"types": "./dist/operations/workbookTable/deleteWorkbookTable.d.ts"
|
|
403
|
+
},
|
|
404
|
+
"./operations/workbookTable/deleteWorkbookTablePreservingValues": {
|
|
405
|
+
"import": "./dist/operations/workbookTable/deleteWorkbookTablePreservingValues.js",
|
|
406
|
+
"types": "./dist/operations/workbookTable/deleteWorkbookTablePreservingValues.d.ts"
|
|
407
|
+
},
|
|
388
408
|
"./operations/workbookTable/getWorkbookTable": {
|
|
389
409
|
"import": "./dist/operations/workbookTable/getWorkbookTable.js",
|
|
390
410
|
"types": "./dist/operations/workbookTable/getWorkbookTable.d.ts"
|
|
@@ -557,6 +577,10 @@
|
|
|
557
577
|
"import": "./dist/tasks/getWorkbookWorksheetByName.js",
|
|
558
578
|
"types": "./dist/tasks/getWorkbookWorksheetByName.d.ts"
|
|
559
579
|
},
|
|
580
|
+
"./tasks/iterateWorkbookRangeValues": {
|
|
581
|
+
"import": "./dist/tasks/iterateWorkbookRangeValues.js",
|
|
582
|
+
"types": "./dist/tasks/iterateWorkbookRangeValues.d.ts"
|
|
583
|
+
},
|
|
560
584
|
"./tasks/safeDeleteWorkbook": {
|
|
561
585
|
"import": "./dist/tasks/safeDeleteWorkbook.js",
|
|
562
586
|
"types": "./dist/tasks/safeDeleteWorkbook.d.ts"
|
|
@@ -569,6 +593,10 @@
|
|
|
569
593
|
"import": "./dist/tasks/setRowHidden.js",
|
|
570
594
|
"types": "./dist/tasks/setRowHidden.d.ts"
|
|
571
595
|
},
|
|
596
|
+
"./tasks/setWorkbookRangeValues": {
|
|
597
|
+
"import": "./dist/tasks/setWorkbookRangeValues.js",
|
|
598
|
+
"types": "./dist/tasks/setWorkbookRangeValues.d.ts"
|
|
599
|
+
},
|
|
572
600
|
"./tasks/setWorkbookTableBodyVisibleRows": {
|
|
573
601
|
"import": "./dist/tasks/setWorkbookTableBodyVisibleRows.js",
|
|
574
602
|
"types": "./dist/tasks/setWorkbookTableBodyVisibleRows.d.ts"
|