/** * Options for Excel data extraction */ export interface ExcelExtractOptions { /** * Specific sheet name to extract (if not provided, all sheets are extracted) */ sheetName?: string; /** * Sheet index to extract (0-based) */ sheetIndex?: number; /** * Include empty cells in output * @default false */ includeEmptyCells?: boolean; /** * Format for output * @default 'json' */ format?: 'json' | 'csv' | 'html' | 'text'; } /** * Result of Excel data extraction */ export interface ExcelExtractResult { /** * Sheet name */ sheetName: string; /** * Extracted data (format depends on options) */ data: any; /** * Number of rows */ rowCount: number; /** * Number of columns */ columnCount: number; } /** * Result of Excel metadata extraction */ export interface ExcelMetadataResult { fileName: string; filePath: string; fileSize: number; lastModified: Date; sheetNames: string[]; sheetCount: number; properties?: { [key: string]: any; }; } /** * Parser for Excel (xlsx/xls) documents */ export declare class ExcelParser { /** * Extract data from an Excel file * * @param filePath - Absolute path to the Excel file * @param options - Extraction options * @returns Extracted data from sheet(s) * * @example * ```typescript * const parser = new ExcelParser(); * const results = await parser.extractData('spreadsheet.xlsx'); * console.log(results[0].data); * ``` */ extractData(filePath: string, options?: ExcelExtractOptions): Promise; /** * Extract text from all sheets * * @param filePath - Absolute path to the Excel file * @returns Concatenated text from all sheets */ extractText(filePath: string): Promise; /** * Get metadata from an Excel file * * @param filePath - Absolute path to the Excel file * @returns Workbook metadata * * @example * ```typescript * const parser = new ExcelParser(); * const metadata = await parser.getMetadata('spreadsheet.xlsx'); * console.log(metadata.sheetNames); * ``` */ getMetadata(filePath: string): Promise; /** * Search for text in an Excel file * * @param filePath - Absolute path to the Excel file * @param query - Search query * @param caseSensitive - Whether the search should be case-sensitive * @returns Array of matches with sheet name, cell reference, and value */ searchText(filePath: string, query: string, caseSensitive?: boolean): Promise>; /** * Get specific sheet names * * @param filePath - Absolute path to the Excel file * @returns Array of sheet names */ getSheetNames(filePath: string): Promise; /** * Extract specific cells by range * * @param filePath - Absolute path to the Excel file * @param sheetName - Sheet name * @param range - Cell range (e.g., 'A1:C10') * @returns Data from specified range */ extractRange(filePath: string, sheetName: string, range: string): Promise; } //# sourceMappingURL=ExcelParser.d.ts.map