/// import { File, Sheet } from 'better-xlsx'; import { IStyle, IExcelColumn, ITbodyConfig } from '../app'; export declare class Excel { file: File; sheet: Sheet | undefined; columns: IExcelColumn[] | undefined; currentRow: number; currentCol: number; defaultTheadCellStyle: IStyle; defaultTbodyCellStyle: IStyle; rowHeight: number; constructor(); /** * 添加工作表 * @param name 工作表名称 */ addSheet(name: string): this; /** * 添加一行 * @returns */ addRow(): import("better-xlsx").Row; /** * 添加一列 * @returns */ addCol(): import("better-xlsx").Col; drawCell(x: number, y: number, props: ICellProps): this; /** * 设置行高 * @param value number * @param unit 单位 'cm' | 'px',默认为px */ setRowHeight(value: number, unit?: 'cm' | 'px'): this; /** * 添加表格配置 * @param columns antd table columns * @param direction 'h' | 'v' 添加的方向,适用于追加表 */ addColumns(columns: IExcelColumn[]): this; /** * 添加数据 * @param dataSource 数据 * @param config 表格体配置 */ addDataSource(dataSource: any[], config?: ITbodyConfig): this; /** * 更改默认的表格头单元格样式属性,不包含表格体 * @param style 单元格样式属性 */ setTHeadStyle(style: IStyle): this; /** * 更改默认的单元格样式属性,不包含表格头 * @param style 单元格样式属性 */ setTBodyStyle(style: IStyle): this; /** * 另存为 * @param name 名称 * @param type 保存类型 'blob' | 'base64' * @param compress 是否压缩 boolean */ saveAs(name: string, type?: 'blob', compress?: boolean): void; } export declare type TExcel = InstanceType;