/**
 * Browser-compatible XLSX ↔ Univer Converter
 *
 * Uses SheetJS (xlsx) for browser-side Excel file processing.
 * Works in both browser and Cloudflare Workers (no Node.js dependencies).
 */
import { type AIWorkbookOutput, type IWorkbookData } from './types';
export interface XlsxToUniverOptions {
    workbookId?: string;
    workbookName?: string;
}
export declare function xlsxToUniver(data: ArrayBuffer | Uint8Array, options?: XlsxToUniverOptions): IWorkbookData;
export declare function univerToXlsx(data: IWorkbookData): ArrayBuffer;
export declare function csvToUniver(csvContent: string, options?: {
    delimiter?: string;
    sheetName?: string;
    workbookName?: string;
    firstRowIsHeader?: boolean;
}): IWorkbookData;
export declare function univerToCsv(data: IWorkbookData, sheetId?: string): string;
export declare function fileToUniver(file: File): Promise<IWorkbookData>;
export declare function univerToBlob(data: IWorkbookData, format?: 'xlsx' | 'csv'): Blob;
export declare function downloadWorkbook(data: IWorkbookData, filename: string, format?: 'xlsx' | 'csv'): void;
/**
 * Convert AI output (array-based format) to Univer native format (sparse matrix)
 *
 * @param aiOutput - The AI-generated workbook data in array-based format
 * @returns Univer-compatible IWorkbookData in sparse matrix format
 */
export declare function aiOutputToUniver(aiOutput: AIWorkbookOutput): IWorkbookData;
/**
 * Validate AI output structure before conversion
 *
 * @param data - Raw parsed JSON from AI
 * @returns Validation result with errors if any
 */
export declare function validateAIOutput(data: unknown): {
    valid: boolean;
    errors: string[];
};
