@d0paminedriven/xlsxdown-wasm32-wasi 0.3.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d0paminedriven/xlsxdown-wasm32-wasi",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "cpu": [
5
5
  "wasm32"
6
6
  ],
@@ -41,6 +41,14 @@ export declare class XlsxDown {
41
41
  invoice(opts?: InvoiceOptions | undefined | null): InvoiceResult
42
42
  /** `invoice` on a worker thread. */
43
43
  invoiceAsync(opts?: InvoiceOptions | undefined | null): Promise<InvoiceResult>
44
+ /**
45
+ * What the workbook says about itself (title, author, dates) and counts of what it holds,
46
+ * sheet by sheet and in total: cells, formulas, merged ranges, tables, pictures, charts,
47
+ * pivot tables, links and comments. Hidden sheets are counted like any other.
48
+ */
49
+ metadata(): XlsxMeta
50
+ /** `metadata` on a worker thread. */
51
+ metadataAsync(): Promise<XlsxMeta>
44
52
  }
45
53
 
46
54
  /** `value` is `lines` joined with `
@@ -357,6 +365,41 @@ export interface SheetLine {
357
365
  wordCount: number
358
366
  }
359
367
 
368
+ /** One sheet's counts. */
369
+ export interface SheetMeta {
370
+ name: string
371
+ /** Position in the workbook, 0-based. */
372
+ index: number
373
+ hidden: boolean
374
+ /** The declared `<dimension>`, which a producer may overstate. */
375
+ dimension?: string
376
+ /**
377
+ * From the first to the last row and column that hold a cell, in A1 form: `A1:F20`. Absent
378
+ * for a sheet with no cells. A merged range counts by its first cell only.
379
+ */
380
+ usedRange?: string
381
+ /** The rows and the columns the used range spans. */
382
+ rowCount: number
383
+ columnCount: number
384
+ /**
385
+ * Cells that hold a value or a formula: what `spreadsheetCells` returns for the sheet with
386
+ * `hiddenCells` on.
387
+ */
388
+ cellCount: number
389
+ /** Cells with a formula, the ones that follow a shared formula included. */
390
+ formulaCount: number
391
+ mergedRangeCount: number
392
+ tableCount: number
393
+ /** Pictures on the sheet. */
394
+ imageCount: number
395
+ chartCount: number
396
+ pivotTableCount: number
397
+ /** Links the sheet lists. One link may cover a range of cells. */
398
+ linkCount: number
399
+ /** Cells with a note or a comment thread. */
400
+ commentCount: number
401
+ }
402
+
360
403
  /**
361
404
  * One selected sheet laid out as a page: every cell's text placed inside the cell's rectangle,
362
405
  * broken into words and grouped into lines, with the sheet facts a reader needs beside them.
@@ -458,3 +501,55 @@ export interface TaxDetail {
458
501
  base?: MoneyField
459
502
  category?: StringField
460
503
  }
504
+
505
+ /**
506
+ * What a workbook says about itself, and counts of what it holds. Hidden sheets, rows and
507
+ * columns are counted like any other: this describes the file, not a selection from it.
508
+ */
509
+ export interface XlsxMeta {
510
+ title?: string
511
+ author?: string
512
+ subject?: string
513
+ /** As written: one string, usually separated by commas or semicolons. */
514
+ keywords?: string
515
+ description?: string
516
+ category?: string
517
+ language?: string
518
+ lastModifiedBy?: string
519
+ revision?: string
520
+ /** When the workbook was created and last saved, as the file writes them. */
521
+ created?: string
522
+ modified?: string
523
+ /** The application that last saved the file, and its version. */
524
+ application?: string
525
+ appVersion?: string
526
+ company?: string
527
+ /** Every sheet, the hidden ones included. */
528
+ sheetCount: number
529
+ hiddenSheetCount: number
530
+ /** Cells that hold a value or a formula, over every sheet. */
531
+ cellCount: number
532
+ formulaCount: number
533
+ mergedRangeCount: number
534
+ /** Words of the cells that hold text, counted from what those cells show. */
535
+ wordCount: number
536
+ /** Characters of those cells that are not white space. */
537
+ characterCount: number
538
+ tableCount: number
539
+ imageCount: number
540
+ chartCount: number
541
+ pivotTableCount: number
542
+ /** Names the workbook defines, the built-in ones (a print area, a filter) left out. */
543
+ definedNameCount: number
544
+ /** Links and comments. */
545
+ annotationCount: number
546
+ linkCount: number
547
+ commentCount: number
548
+ /** Whether dates count from 1904, as workbooks from old versions of Excel for Mac do. */
549
+ date1904: boolean
550
+ /** The file is macro-enabled. Macros are never read or run. */
551
+ hasMacros: boolean
552
+ /** The file is a template. */
553
+ isTemplate: boolean
554
+ sheets: Array<SheetMeta>
555
+ }
Binary file