@mertdeveci55/univer-import-export
Version:
Excel/CSV import and export library for Univer spreadsheets with full format preservation
45 lines (44 loc) • 1.25 kB
TypeScript
/**
* FormulaCleaner - Handles formula cleaning for Excel export
*
* This class fixes common issues with formulas when exporting to Excel:
* 1. @ symbols incorrectly added by ExcelJS
* 2. Double equals (==) issues
* 3. Invalid formula syntax
* 4. Special character handling
*/
export declare class FormulaCleaner {
/**
* Clean formula for Excel export
* This is the main method that applies all cleaning rules
*/
static cleanFormula(formula: string): string;
/**
* Remove @ symbols that ExcelJS incorrectly places
*/
private static removeIncorrectAtSymbols;
/**
* Fix Excel function names and syntax
*/
private static fixFunctionNames;
/**
* Validate and fix basic formula syntax
*/
private static validateSyntax;
/**
* Handle special characters in formulas
*/
private static handleSpecialCharacters;
/**
* Get summary of changes made during cleaning
*/
private static getChanges;
/**
* Check if a formula is valid for Excel export
*/
static isValidFormula(formula: string): boolean;
/**
* Special handling for array formulas
*/
static cleanArrayFormula(formula: string, range?: string): string;
}