f7
f7 is a spreadsheet formula execution library
git clone https://git.vogt.world/f7.git
Log | Files | README.md | LICENSE.md
← All files
name: src/main/js/spreadsheet/CellObject.ts
-rw-r--r--
734
 1import { ExcelDataType, excelDataTypeFromActualType } from "./ExcelDataType";
 2
 3/** Worksheet Cell Object */
 4export interface CellObject {
 5  /** The raw value of the cell.  Can be omitted if a formula is specified */
 6  v?: string | number | boolean;
 7
 8  /** Formatted text (if applicable) */
 9  w?: string;
10
11  /**
12   * The Excel Data Type of the cell.
13   * b Boolean, n Number, e Error, s String, d Date, z Empty
14   */
15  t: ExcelDataType;
16
17  /** Cell formula (if applicable) */
18  f?: string;
19
20  /** Range of enclosing array if formula is array formula (if applicable) */
21  F?: string;
22}
23
24export function cellObjectFromProjection(v: string | number | boolean): CellObject {
25  return {
26    v,
27    t: excelDataTypeFromActualType(v),
28  };
29}