@simplysm/excel 13.0.29 → 13.0.30
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 +12 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -326,7 +326,7 @@ const records = [
|
|
|
326
326
|
{ name: "Jane Smith", age: 25, active: false },
|
|
327
327
|
];
|
|
328
328
|
|
|
329
|
-
// write() returns ExcelWorkbook, so resource management is required
|
|
329
|
+
// write() accepts Partial records and returns ExcelWorkbook, so resource management is required
|
|
330
330
|
await using wb = await wrapper.write("Users", records);
|
|
331
331
|
const bytes = await wb.getBytes();
|
|
332
332
|
```
|
|
@@ -390,8 +390,9 @@ Behavior of the `read()` method:
|
|
|
390
390
|
|
|
391
391
|
## ExcelCell API
|
|
392
392
|
|
|
393
|
-
|
|
|
393
|
+
| Member | Type / Return Type | Description |
|
|
394
394
|
|--------|-----------|------|
|
|
395
|
+
| `addr` | `ExcelAddressPoint` (readonly) | Cell address as 0-based row/column indices |
|
|
395
396
|
| `getVal()` | `Promise<ExcelValueType>` | Get cell value |
|
|
396
397
|
| `setVal(val)` | `Promise<void>` | Set cell value (deletes cell if undefined) |
|
|
397
398
|
| `getFormula()` | `Promise<string \| undefined>` | Get formula |
|
|
@@ -426,7 +427,7 @@ Behavior of the `read()` method:
|
|
|
426
427
|
|
|
427
428
|
## ExcelWorkbook API
|
|
428
429
|
|
|
429
|
-
|
|
|
430
|
+
| Member | Type / Return Type | Description |
|
|
430
431
|
|--------|-----------|------|
|
|
431
432
|
| `getWorksheet(nameOrIndex)` | `Promise<ExcelWorksheet>` | Get worksheet (name or 0-based index) |
|
|
432
433
|
| `createWorksheet(name)` | `Promise<ExcelWorksheet>` | Create new worksheet |
|
|
@@ -435,6 +436,14 @@ Behavior of the `read()` method:
|
|
|
435
436
|
| `getBlob()` | `Promise<Blob>` | Export as Blob |
|
|
436
437
|
| `close()` | `Promise<void>` | Release resources |
|
|
437
438
|
|
|
439
|
+
## ExcelWrapper API
|
|
440
|
+
|
|
441
|
+
| Member | Type / Return Type | Description |
|
|
442
|
+
|--------|-----------|------|
|
|
443
|
+
| `constructor(schema, displayNameMap)` | — | Create wrapper with a Zod schema and field-to-display-name map |
|
|
444
|
+
| `read(file, wsNameOrIndex?)` | `Promise<z.infer<TSchema>[]>` | Read records from Excel file (Uint8Array or Blob); defaults to first worksheet |
|
|
445
|
+
| `write(wsName, records)` | `Promise<ExcelWorkbook>` | Write partial records to a new workbook; caller must manage the returned workbook's lifecycle |
|
|
446
|
+
|
|
438
447
|
## Caveats
|
|
439
448
|
|
|
440
449
|
### All Cell Methods are Asynchronous
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/excel",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.30",
|
|
4
4
|
"description": "Excel 파일 처리 라이브러리",
|
|
5
5
|
"author": "김석래",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"mime": "^4.1.0",
|
|
22
22
|
"zod": "^4.3.6",
|
|
23
|
-
"@simplysm/core-common": "13.0.
|
|
23
|
+
"@simplysm/core-common": "13.0.30"
|
|
24
24
|
}
|
|
25
25
|
}
|