import type { CellStyle, Color } from './style'; import type { SerializedValueType } from './value-type'; import type { IArea } from './area'; import type { AnnotationLayout } from './layout'; import type { Table } from './table'; import type { DataValidation, AnnotationType, ConditionalFormat } from '../../treb-data-model/src/index'; export interface CellParseResult { row: number; column: number; type: SerializedValueType; value: number | string | undefined | boolean; calculated?: number | string | undefined | boolean; calculated_type?: SerializedValueType; style_ref?: number; hyperlink?: string; validation?: DataValidation; merge_area?: IArea; area?: IArea; /** dynamic arrays */ spill?: IArea; table?: Table; } export interface AnchoredAnnotation { layout: AnnotationLayout; type?: AnnotationType; formula?: string; data?: any; } /** * this is moved from export to avoid a circular reference */ export interface ImportedSheetData { name: string | undefined; cells: CellParseResult[]; default_column_width: number; column_widths: number[]; row_heights: number[]; styles: CellStyle[]; conditional_formats: ConditionalFormat[]; data_validations?: DataValidation[]; sheet_style?: number; column_styles?: number[]; row_styles?: number[]; annotations?: AnchoredAnnotation[]; outline?: number[]; tab_color?: Color; hidden?: boolean; }