import { utils, WorkBook, WorkSheet, WritingOptions } from "@e965/xlsx"; import { ICellStyle, IStyledCell } from "./styles"; export { IBorderStyle, ICellStyle, ICellStyleColor, ICellType, IStyledCell } from "./styles"; export interface IColumn { label: string; value: string | ((value: IContent) => IContentValue); cellStyle?: ICellStyle; format?: string; headerStyle?: ICellStyle; } export type IContentValue = string | number | boolean | Date | IContent | IStyledCell | null; export interface IContent { [key: string]: IContentValue; } export interface IJsonSheetTable { columns: IColumn[]; content: IContent[]; } export interface IJsonSheet { sheet?: string; columns?: IColumn[]; content?: IContent[]; tables?: IJsonSheetTable[]; tablesLayout?: "vertical" | "horizontal"; tablesGap?: number; } export interface ISettings { enableStyles?: boolean; extraLength?: number; fileName?: string; writeOptions?: WritingOptions; writeMode?: string; RTL?: boolean; writeEmptyValuesAsBlankCells?: boolean; } export interface IEmptyCellOptions { writeEmptyValuesAsBlankCells?: boolean; } export interface IJsonSheetRow { [key: string]: IContentValue; } export interface IWorksheetColumnWidth { width: number; } export type IWorkbookCallback = (workbook: WorkBook) => void; export { utils, WorkBook, WorkSheet }; export declare function getContentProperty(content: IContent, property: string): Exclude; export declare function getContentProperty(content: IContent, property: string, options: IEmptyCellOptions & { writeEmptyValuesAsBlankCells: true; }): IContentValue; export declare function getContentProperty(content: IContent, property: string, options: IEmptyCellOptions): IContentValue; export declare const getJsonSheetRow: (content: IContent, columns: IColumn[], options?: IEmptyCellOptions) => IJsonSheetRow; export declare const getWorksheetColumnWidths: (worksheet: WorkSheet, extraLength?: number) => IWorksheetColumnWidth[]; export declare function xlsx(jsonSheets: IJsonSheet[], settings: ISettings & { writeMode: "write"; writeOptions: WritingOptions & { type: "array"; }; }, workbookCallback?: IWorkbookCallback): ArrayBuffer | undefined; export declare function xlsx(jsonSheets: IJsonSheet[], settings: ISettings & { writeMode: "write"; writeOptions: WritingOptions & { type: "base64" | "binary" | "string"; }; }, workbookCallback?: IWorkbookCallback): string | undefined; export declare function xlsx(jsonSheets: IJsonSheet[], settings: ISettings & { writeMode: "write"; writeOptions: WritingOptions & { type: "buffer"; }; }, workbookCallback?: IWorkbookCallback): Buffer | undefined; export declare function xlsx(jsonSheets: IJsonSheet[], settings: ISettings & { writeOptions: WritingOptions & { type: "buffer"; }; }, workbookCallback?: IWorkbookCallback): Buffer | undefined; export declare function xlsx(jsonSheets: IJsonSheet[], settings?: ISettings, workbookCallback?: IWorkbookCallback): Buffer | undefined; export default xlsx; export declare const libraryName = "json-as-xlsx";