export type IColumn = { title: string; width?: number; notExport?: boolean; children?: IColumn[]; render?: (value: any, row: Record, rowIndex: number) => any | string; onCell?: Function | string; colSpan?: number; [key: string]: any; }; export interface ICellStyle { fontSize?: number; color?: string; bold?: boolean; background?: string; backgroundColor?: string; textAlign?: 'left' | 'center' | 'right'; borderColor?: string; } export interface ISheet { name?: string; columns: IColumn[]; dataSource: Record[]; hiddenHeader?: boolean; style?: { header?: ICellStyle; body?: ICellStyle; }; } export interface IExcel { sheets: ISheet[]; filename?: string; hiddenHeader?: boolean; worker?: boolean; } export type Point = { r: number; c: number; }; export type IMerge = { title?: string; s: Point; e: Point; }; export type getCellStyleType = ({ isTitle, style }: { isTitle: boolean; style?: ISheet['style']; }) => styleType; export type Side = 'top' | 'bottom' | 'left' | 'right'; export type borderType = Record; export type styleType = { font?: { sz?: number; color: { rgb?: string; }; bold?: Boolean; }; alignment: { horizontal?: ICellStyle['textAlign']; wrapText: Boolean; }; border: borderType; fill?: { fgColor: { rgb: string; }; }; };