@univerjs/engine-formula 0.10.6 → 0.10.7

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.
@@ -38,3 +38,16 @@ export declare enum ErrorType {
38
38
  }
39
39
  export declare const ERROR_TYPE_SET: Set<ErrorType>;
40
40
  export declare const ERROR_TYPE_COUNT_ARRAY: number[];
41
+ /** Interface for sheet formula errors */
42
+ export interface ISheetFormulaError {
43
+ /** sheet name */
44
+ sheetName: string;
45
+ /** cell row */
46
+ row: number;
47
+ /** cell column */
48
+ column: number;
49
+ /** formula string (e.g., "=SUM(A1:B10)") */
50
+ formula: string;
51
+ /** error type, refer to ErrorType enum */
52
+ errorType: ErrorType;
53
+ }
@@ -1,2 +1,9 @@
1
1
  import { ICellData, Nullable } from '@univerjs/core';
2
+ import { ErrorType } from '../../basics/error-type';
2
3
  export declare function getCellValue(cell: Nullable<ICellData>): import('@univerjs/core').CellValue;
4
+ /**
5
+ * Extract the formula error from the cell
6
+ * @param cell
7
+ * @returns
8
+ */
9
+ export declare function extractFormulaError(cell: Nullable<ICellData>, isArrayFormulaCell?: boolean): ErrorType | null;
@@ -19,6 +19,7 @@ export { type IOtherFormulaData } from './basics/common';
19
19
  export { type IUnitRowData } from './basics/common';
20
20
  export { isInDirtyRange } from './basics/dirty';
21
21
  export { ERROR_TYPE_SET, ErrorType } from './basics/error-type';
22
+ export { type ISheetFormulaError } from './basics/error-type';
22
23
  export { FunctionType, type IFunctionInfo, type IFunctionParam } from './basics/function';
23
24
  export { type IFunctionNames } from './basics/function';
24
25
  export { includeFormulaLexerToken, isFormulaLexerToken, normalizeSheetName } from './basics/match-token';
@@ -62,6 +63,7 @@ export { BaseReferenceObject, type FunctionVariantType } from './engine/referenc
62
63
  export { AsyncArrayObject, AsyncObject } from './engine/reference-object/base-reference-object';
63
64
  export { RangeReferenceObject } from './engine/reference-object/range-reference-object';
64
65
  export { generateExecuteAstNodeData } from './engine/utils/ast-node-tool';
66
+ export { extractFormulaError } from './engine/utils/cell';
65
67
  export { generateAstNode } from './engine/utils/generate-ast-node';
66
68
  export { strip, stripErrorMargin } from './engine/utils/math-kit';
67
69
  export { handleNumfmtInCell } from './engine/utils/numfmt-kit';