import type { SerializedModel, SerializedSheet } from '../../treb-data-model/src/index'; import type { CellStyle, AnnotationLayout, Cell, Rectangle } from '../../treb-base-types/src/index'; import type { XmlBuilderOptions } from 'fast-xml-parser'; import { SharedStrings } from './shared-strings'; import { StyleCache } from './workbook-style'; import type { RelationshipMap } from './relationship'; import type { UnitAddress, UnitRange } from '../../treb-parser/src/index'; import { Parser } from '../../treb-parser/src/index'; import type { ChartOptions } from './drawing/chart'; import type { ImageOptions } from './drawing/embedded-image'; import type { TwoCellAnchor } from './drawing/drawing'; import { ZipWrapper } from './zip-wrapper'; export declare class Exporter { zip?: ZipWrapper; xmloptions: Partial; xmlbuilder1: import("fast-xml-parser").XMLBuilder; parser: Parser; decorated_functions: Record; /** * init used to load the template file. we added a parameter to * pass in the list of functions that need decoration (_xlfn). * * @param decorated_functions */ Init(decorated_functions?: Record): void; WriteRels(rels: RelationshipMap, path: string, dump?: boolean): void; /** * format and write styles */ WriteStyleCache(style_cache: StyleCache): void; /** * format and write shared strings file to the zip archive. this will * replace any existing shared strings file. */ WriteSharedStrings(shared_strings: SharedStrings): void; /** * FIXME: we might not always need this. */ SheetStyle(sheet: SerializedSheet, style_cache: StyleCache): number; RowStyle(sheet: SerializedSheet, style_cache: StyleCache, row: number): number; ColumnStyle(sheet: SerializedSheet, style_cache: StyleCache, column: number): number; StyleFromCell(sheet: SerializedSheet, style_cache: StyleCache, row: number, column: number, style?: CellStyle): number; /** overload for return type */ NormalizeAddress(unit: UnitAddress, sheet: SerializedSheet): UnitAddress; /** overload for return type */ NormalizeAddress(unit: UnitRange, sheet: SerializedSheet): UnitRange; /** extra overload */ NormalizeAddress(unit: UNIT, sheet: SerializedSheet): UNIT; EnsureRange(unit: UnitAddress | UnitRange): UnitRange; /** * new-style annotation layout (kind of a two-cell anchor) to two-cell anchor */ AnnotationLayoutToAnchor(layout: AnnotationLayout, sheet: SerializedSheet): TwoCellAnchor; /** * convert a rectangle (pixels) to a two-cell anchor. note that * our offsets are in pixels, they'll need to be changed to whatever * the target units are. */ AnnotationRectToAnchor(src_rect: Partial, sheet: SerializedSheet): TwoCellAnchor; ParseImages(sheet_source: SerializedSheet): Array<{ anchor: TwoCellAnchor; options: ImageOptions; }>; ParseCharts(sheet_source: SerializedSheet): Array<{ anchor: TwoCellAnchor; options: ChartOptions; }>; FormulaText(text: string, context: Cell): string; Export(source: SerializedModel): void; ArrayBuffer(): ArrayBuffer; Blob(): Blob; }