import * as XLSX from 'xlsx';
import type { WorkBook, WorkSheet } from 'xlsx';
export declare function rowGenerator(range: string): Generator<number, void, unknown>;
export declare function columnGenerator(range: string): Generator<string, void, unknown>;
export declare function sheetToRowArray(sheet: WorkSheet): string[][];
export declare function cellArrayToMapByHeaderRow<T = Record<string, string>>(items: string[][], usingHeader: string[]): T[];
export declare function sanitizeSheetName(name: string): string;
/**
 * Append numbers to the end of sheet name to allow duplicate sheet names. Ensures that
 * sheet names follow Excel's limitations (max 31 characters, no special characters).
 *
 * Will throw an error if all possible sheet names are exhausted, which is highly unlikely
 * in practice given the large number of combinations available.
 */
export declare function uniqueSheetName(name: string, usedNames: Set<string>): string;
/** @returns workbook instead, use toWorkSheet instead */
export declare function toSheet(data: any[][], header: string[], sheetName?: string): XLSX.WorkBook;
/** @returns workbook instead, use toWorkSheet instead */
export declare function toWorkSheet(data: any[][], header: string[]): XLSX.WorkSheet;
/** @returns workbook instead, use toWorkSheet instead */
export declare function toWorkBook<T extends {
    [key: string]: XLSX.WorkSheet;
}>(workSheets: T, sheetNames?: (keyof T)[]): XLSX.WorkBook;
export declare function downloadExcel(workbook: WorkBook, filename: string): void;
export declare function readExcel(file: File): Promise<XLSX.WorkBook>;
