type XmlAttributes = Record<string, string | null | undefined>;
type XmlElementRequired<Attrs extends XmlAttributes = XmlAttributes, Children extends XmlNode[] = XmlNode[]> = {
    name: string;
    attributes: Attrs;
    children: Children;
};
type XmlElementRequiredElem<Attrs extends XmlAttributes = XmlAttributes> = XmlElementRequired<Attrs, XmlElement[]>;
type XmlElement<Attrs extends XmlAttributes = XmlAttributes, Children extends XmlNodeOrGetter[] = XmlNode[]> = {
    name: string;
    attributes: Attrs;
    children?: Children;
};
type XmlNodeOrGetter = null | undefined | string | XmlElement<XmlAttributes, XmlNodeOrGetter[]> | {
    toXml: () => XmlNode | null | undefined;
};
type XmlNode = string | XmlElement<XmlAttributes, XmlNode[]>;
type HyperlinkOption = {
    /**
     * The hyperlink to set, can be a Cell or an internal/external string.
     */
    hyperlink?: string | Cell | null;
    /**
     * Additional text to help the user understand more about the hyperlink.
     */
    tooltip?: string;
    /**
     * Email address, ignored if opts.hyperlink is set.
     */
    email?: string;
    /**
     * Email subject, ignored if opts.hyperlink is set.
     */
    emailSubject?: string;
};
type AddressBaseOption = {
    /**
     * Include the sheet name in the address.
     */
    includeSheetName?: boolean;
    /**
     * Anchor the address
     */
    anchored?: boolean;
};
interface AddressCellOption extends AddressBaseOption {
    /**
     * Anchor the row.
     */
    rowAnchored?: boolean;
    /**
     * Anchor the column.
     */
    columnAnchored?: boolean;
}
interface AddressRangeOption extends AddressBaseOption {
    /**
     * Anchor the start row.
     */
    startRowAnchored?: boolean;
    /**
     * Anchor the start column.
     */
    startColumnAnchored?: boolean;
    /**
     * Anchor the end row.
     */
    endRowAnchored?: boolean;
    /**
     * Anchor the end column.
     */
    endColumnAnchored?: boolean;
}
type DataValidationType = 'none' | 'whole' | 'decimal' | 'list' | 'date' | 'time' | 'textLength' | 'custom';
type DataValidationOperator = '' | 'between' | 'notBetween' | 'equal' | 'notEqual' | 'lessThan' | 'lessThanOrEqual' | 'greaterThan' | 'greaterThanOrEqual';
type DataValidation = {
    type: DataValidationType;
    allowBlank: boolean;
    showInputMessage: boolean;
    prompt: string;
    promptTitle: string;
    showErrorMessage: boolean;
    error: string;
    errorTitle: string;
    operator: DataValidationOperator;
    sqref: string;
    formula1?: string;
    formula2?: string;
};

type XmlCompositeElem = XmlElementRequiredElem;
declare abstract class CompositeElement {
}

type DrawableType = 'placeholder' | 'unknown' | 'picture';
declare abstract class DrawableBase extends CompositeElement {
    abstract toXml(): XmlElement;
}

/**
 * @public
 */
type PictureFileOptions = {
    buffer: ArrayBuffer | Buffer;
    /**
     * @example
     * 'png'
     */
    fileExt: string;
    /**
     * Picture name
     */
    name: string;
    size: {
        px?: {
            width: number;
            height: number;
        };
        em?: {
            width: number;
            height: number;
        };
    };
};
/**
 * @public
 */
declare class Picture extends DrawableBase {
    private node;
    private nvPicPrNode;
    private blipFillNode;
    private spPrNode;
    private cNvPr;
    private shapeProp;
    private remainingNodes;
    drawableType: DrawableType;
    /**
     * Get name
     */
    name(): string;
    /**
     * Set name
     */
    name(value: string): Picture;
    /**
     * Get description
     */
    description(): string | null;
    /**
     * Set description
     */
    description(value: string | null): Picture;
    /**
     * Hidden the picture
     */
    hidden(hidden: boolean): void;
}

type DrawingPosPosition = {
    /**
     * X-Coordinate
     */
    x: number;
    /**
     * Y-Coordinate
     */
    y: number;
};
type DrawingPosAnchor = {
    /**
     * Column number (0-based)
     */
    col: number;
    /**
     * Column offset number (EMs)
     */
    colOff: number;
    /**
     * Row number (0-based)
     */
    row: number;
    /**
     * Row offset number (EMs)
     */
    rowOff: number;
};
type DrawingPosExtent = {
    /**
     * Extent Length
     */
    cx: number;
    /**
     * Extent Width
     */
    cy: number;
};
declare abstract class AnchorBase extends CompositeElement {
    protected nodeName: string;
    protected _drawing: Drawing;
    protected _mainDrawable?: DrawableBase;
    protected _remainingNodes: XmlElement[];
    constructor(nodeName: string, _drawing: Drawing);
    /** PUBLIC */
    type(): DrawableType;
    /**
     * Get picture
     */
    picture(): Picture | undefined;
    /**
     * Set picture or null to remove
     */
    picture(picture: Picture | PictureFileOptions | null): this;
}

/**
 * @public
 */
declare class AbsoluteAnchor extends AnchorBase {
    protected usedNodeNames: string[];
    private _ext;
    private _pos;
    /** PUBLIC */
    /**
     * Get the position
     */
    position(): DrawingPosPosition;
    /**
     * Set the position
     */
    position(value: DrawingPosPosition): this;
    /**
     * Get the extent
     */
    extent(): DrawingPosExtent;
    /**
     * Set the extent
     */
    extent(value: DrawingPosExtent): this;
}

/**
 * @public
 */
declare class OneCellAnchor extends AnchorBase {
    protected usedNodeNames: string[];
    private _fromAnchor;
    private _ext;
    /** PUBLIC */
    /**
     * Get the fromAnchor position
     */
    fromAnchor(): DrawingPosAnchor;
    /**
     * Set the fromAnchor position
     * @param pos - The anchor position
     */
    fromAnchor<S extends this>(pos: DrawingPosAnchor): S;
    /**
     * Get the extent
     */
    extent(): DrawingPosExtent;
    /**
     * Set the extent
     */
    extent(value: DrawingPosExtent): this;
}

type EditAs = 'absolute' | 'oneCell' | 'twoCell';
/**
 * @public
 */
declare class TwoCellAnchor extends AnchorBase {
    protected usedNodeNames: string[];
    private _fromAnchor;
    private _toAnchor;
    private _editAs?;
    /** PUBLIC */
    /**
     * Get the fromAnchor position
     */
    fromAnchor(): DrawingPosAnchor;
    /**
     * Set the fromAnchor position
     * @param pos - The anchor position
     */
    fromAnchor(pos: DrawingPosAnchor): this;
    /**
     * Get the toAnchor position
     */
    toAnchor(): DrawingPosAnchor;
    /**
     * Set the toAnchor position
     * @param pos - The anchor position
     */
    toAnchor(pos: DrawingPosAnchor): this;
    editAs(): EditAs;
    editAs(value: EditAs): this;
    /** PROTECTED */
    toXml(): XmlCompositeElem;
}

type InputDrawingPosAnchor = {
    /**
     * Column name or number (1-based)
     */
    column: number | string;
    /**
     * Column offset number (EMs)
     */
    columnOffset?: number;
    /**
     * Row number (1-based)
     */
    row: number;
    /**
     * Row offset number (EMs)
     */
    rowOffset?: number;
};
/**
 * Drawing file
 * @public
 */
declare class Drawing {
    private _workbook;
    private drawingNodes;
    private _composites;
    private _unknownComposites;
    /**
     * The workbook
     */
    workbook(): Workbook;
    /**
     * Remove all composites in the drawing
     */
    clear(): void;
    /**
     * Add a TwoCellAnchor to the drawing
     */
    addTwoCellAnchor(from: InputDrawingPosAnchor, to: InputDrawingPosAnchor, editAs: EditAs): TwoCellAnchor;
    /**
     * Add a OneCellAnchor to the drawing
     */
    addOneCellAnchor(from: InputDrawingPosAnchor, ext: DrawingPosExtent): OneCellAnchor;
    /**
     * Add an AbsoluteAnchor to the drawing
     */
    addAbsoluteAnchor(pos: DrawingPosPosition, ext: DrawingPosExtent): AbsoluteAnchor;
    /**
     * List all supported composites in the drawing
     */
    anchors(): (AbsoluteAnchor | OneCellAnchor | TwoCellAnchor)[];
    /** PRIVATE */
    /**
     * Parse the anchors from the drawing node
     */
    private parseAnchors;
}

type XmlPageBreakElem = XmlElementRequired<{
    count: string;
    manualBreakCount: string;
}, XmlElement<{
    id: string;
    max: string;
    man: string;
}>[]>;
/**
 * PageBreaks
 * @public
 */
declare class PageBreaks {
    private _node;
    private _count;
    private _manualBreakCount;
    constructor(node: XmlPageBreakElem);
    /**
     * add page-breaks by row/column id
     * @param id - row/column id (rowNumber/colNumber)
     * @returns the page-breaks
     */
    add(id: number): PageBreaks;
    /**
     * remove page-breaks by index
     * @param index - index of list
     * @returns the page-breaks
     */
    remove(index: number): PageBreaks;
    /**
     * get count of the page-breaks
     * @returns the page-breaks' count
     */
    get count(): number;
    private set count(value);
    private get manualBreakCount();
    private set manualBreakCount(value);
    /**
     * get list of page-breaks
     * @returns list of the page-breaks
     */
    get list(): Array<any>;
}

/**
 * @public
 */
type StyleFontScheme = 'minor' | 'major' | 'none';
/**
 * @public
 */
type StyleAlignment = 'subscript' | 'superscript';
/**
 * @public
 */
type StyleColor = {
    /**
     * RGB color code (e.g. 'ff0000'). Either rgb or theme is required.
     */
    rgb?: string;
    /**
     * Index of a theme color. Either rgb or theme is required.
     */
    theme?: number;
    /**
     * Optional tint value of the color from -1 to 1. Particularly useful for theme colors. 0.0 means no tint, -1.0 means 100% darken, and 1.0 means 100% lighten.
     */
    tint?: number;
};
/**
 * @public
 */
declare enum StyleGenericFamily {
    'Serif' = 1,
    'Sans Serif' = 2,
    'Monospace' = 3
}
/**
 * @public
 */
type HorizontalAlignment = 'left' | 'center' | 'right' | 'fill' | 'justify' | 'centerContinuous' | 'distributed';
/**
 * @public
 */
type VerticalAlignment = 'top' | 'center' | 'bottom' | 'justify' | 'distributed';
/**
 * @public
 */
type TextDirection = 'left-to-right' | 'right-to-left';
/**
 * @public
 */
type StyleFill = StyleFillSolid | StyleFillGradient | StyleFillPattern;
/**
 * @public
 * An object representing a solid fill.
 */
type StyleFillSolid = {
    type: 'solid';
    /**
     * Color of the fill.
  
     */
    color: StyleColor;
};
/**
 * @public
 */
type StyleFillPatternName = 'gray125' | 'darkGray' | 'mediumGray' | 'lightGray' | 'gray0625' | 'darkHorizontal' | 'darkVertical' | 'darkDown' | 'darkUp' | 'darkGrid' | 'darkTrellis' | 'lightHorizontal' | 'lightVertical' | 'lightDown' | 'lightUp' | 'lightGrid' | 'lightTrellis';
/**
 * @public
 * An object representing a pattern fill.
 */
type StyleFillPattern = {
    type: 'pattern';
    /**
     * Name of the pattern.
     */
    pattern: StyleFillPatternName;
    /**
     * Color of the foreground.
     */
    foreground: StyleColor;
    /**
     * Color of the background.
     */
    background: StyleColor;
};
/**
 * @public
 */
type StyleFillGradientGradientType = 'linear' | 'path';
/**
 * @public
 */
type StyleFillGradientLinear = {
    type: 'gradient';
    /**
     * Linear gradient.
     */
    gradientType: 'linear';
    stops: {
        /**
         * The position of the stop from 0 to 1.
         */
        position: number | null;
        /**
         * Color of the stop. If string, will set an RGB color. If number, will set a theme color.
         */
        color: StyleColor | null;
    }[];
    /**
     * If linear gradient, the angle of clockwise rotation of the gradient.
     */
    angle?: number;
};
/**
 * @public
 */
type StyleFillGradientPath = {
    type: 'gradient';
    /**
     * A path is drawn between the top, left, right, and bottom values and a gradient is draw from that path to the outside of the cell.
     */
    gradientType: 'path';
    stops: {
        /**
         * The position of the stop from 0 to 1.
         */
        position: number | null;
        /**
         * Color of the stop. If string, will set an RGB color. If number, will set a theme color.
         */
        color: StyleColor | null;
    }[];
    /**
     * If path gradient, the left position of the path as a percentage from 0 to 1.
     */
    left?: number;
    /**
     * If path gradient, the right position of the path as a percentage from 0 to 1.
     */
    right?: number;
    /**
     * If path gradient, the top position of the path as a percentage from 0 to 1.
     */
    top?: number;
    /**
     * If path gradient, the bottom position of the path as a percentage from 0 to 1.
     */
    bottom?: number;
};
/**
 * @public
 */
type StyleFillGradient = StyleFillGradientLinear | StyleFillGradientPath;
/**
 * @public
 */
type StyleBorderDirection = 'up' | 'down' | 'both';
/**
 * @public
 */
type StyleBorderStyle = 'hair' | 'dotted' | 'dashDotDot' | 'dashed' | 'mediumDashDotDot' | 'thin' | 'slantDashDot' | 'mediumDashDot' | 'mediumDashed' | 'medium' | 'thick' | 'double';
/**
 * @public
 */
type StyleBorder<Color = StyleColor> = {
    /**
     * Style of the given border.
     */
    style: null | StyleBorderStyle;
    /**
     * Color of the given border.
     */
    color: null | Color;
    /**
     * For diagonal border, the direction of the border(s) from left to right.
     */
    direction?: null | StyleBorderDirection;
};
/**
 * @public
 */
type StyleBorders<B = StyleBorder> = {
    left: null | B;
    right: null | B;
    top: null | B;
    bottom: null | B;
    diagonal?: null | B;
};
/**
 * @public
 */
type StyleBorderOptional = Partial<StyleBorder<Partial<StyleColor>>>;
/**
 * @public
 */
type StyleBordersOptional<B = StyleBorderOptional> = Partial<StyleBorders<B>>;
/**
 * @public
 */
type StylesBase = {
    bold: boolean;
    italic: boolean;
    underline: boolean | 'double';
    strikethrough: boolean;
    subscript: boolean;
    superscript: boolean;
    fontSize: number | null;
    fontFamily: string | null;
    fontGenericFamily: StyleGenericFamily | null;
    fontScheme: StyleFontScheme | null;
    fontColor?: StyleColor;
};
/**
 * @public
 */
declare abstract class StyleQueryBase {
    protected abstract fontNode: XmlElement;
    protected getColor(node: XmlElement, name: string): StyleColor | null;
    protected setColor(node: XmlElement, name: string, color: StyleColor | null): void;
    protected getFontVerticalAlignment(node: XmlElement): StyleAlignment | null | undefined;
    protected setFontVerticalAlignment(node: XmlElement, alignment: StyleAlignment | null | undefined): void;
    protected getTextRotation(node: XmlElement): number | null;
    protected setTextRotation(node: XmlElement, textRotation: number | null): void;
    protected getBorder(node: XmlElement): StyleBordersOptional;
    protected setBorder(node: XmlElement, settings: StyleBordersOptional<StyleBorderOptional | boolean | StyleBorderStyle>): void;
    /**
     * true for bold, false for not bold
     */
    bold(): boolean;
    bold(bold: boolean): this;
    /**
     * true for italic, false for not italic
     */
    italic(): boolean;
    italic(italic: boolean): this;
    /**
     * true for single underline, false for no underline, 'double' for double-underline
     */
    underline(): boolean | 'double';
    underline(underline: boolean | 'double'): this;
    /**
     * true for strikethrough false for not strikethrough
     */
    strikethrough(): boolean;
    strikethrough(strikethrough: boolean): this;
    /**
     * true for subscript, false for not subscript (cannot be combined with superscript)
     */
    subscript(): boolean;
    subscript(subscript: boolean): this;
    /**
     * true for superscript, false for not superscript (cannot be combined with subscript)
     */
    superscript(): boolean;
    superscript(superscript: boolean): this;
    /**
     * Font size in points. Must be greater than 0.
     */
    fontSize(): number | null;
    fontSize(fontSize: number | null): this;
    /**
     * Name of font family.
     */
    fontFamily(): string | null;
    fontFamily(fontFamily: string | null): this;
    /**
     * Font generic family, 1: Serif, 2: Sans Serif, 3: Monospace,
     */
    fontGenericFamily(): StyleGenericFamily | null;
    fontGenericFamily(fontGenericFamily: StyleGenericFamily | null): this;
    /**
     * Font scheme, 'minor', 'major', 'none'
     */
    fontScheme(): StyleFontScheme | null;
    fontScheme(fontScheme: StyleFontScheme | null): this;
    /**
     * Color of the font.
     */
    fontColor(): StyleColor | null;
    fontColor(fontColor: StyleColor | null): this;
}

/**
 * @public
 * Style query for a cell.
 */
declare class StyleQuery extends StyleQueryBase {
    private style;
    constructor(style: Style, 
    /**
     * The style ID
     * @internal
     */
    id: number, 
    /**
     * @internal
     */
    _xfNode: XmlElement, 
    /**
     * @internal
     */
    _fontNode: XmlElementRequired, 
    /**
     * @internal
     */
    _fillNode: XmlElement, 
    /**
     * @internal
     */
    _borderNode: XmlElement);
    /**
     * Name of font family.
     */
    fontFamily(): string | null;
    fontFamily(fontFamily: string | null): this;
    protected get fontNode(): XmlElementRequired<XmlAttributes, XmlNode[]>;
    private get xfNode();
    private get fillNode();
    private get borderNode();
    private get styleSheet();
    /**
     * Horizontal alignment.
     */
    horizontalAlignment(): HorizontalAlignment | null;
    horizontalAlignment(horizontalAlignment: HorizontalAlignment | null): this;
    /**
     * a.k.a Justified Distributed. Only applies when horizontalAlignment === 'distributed'. A boolean value indicating if the cells justified or distributed alignment should be used on the last line of text. (This is typical for East Asian alignments but not typical in other contexts.)
     */
    justifyLastLine(): boolean;
    justifyLastLine(justifyLastLine: boolean): this;
    /**
     * Number of indents. Must be greater than or equal to 0.
     */
    indent(): number | null;
    indent(indent: number | null): this;
    /**
     * Vertical alignment.
     */
    verticalAlignment(): VerticalAlignment | null;
    verticalAlignment(verticalAlignment: VerticalAlignment | null): this;
    /**
     * true to wrap the text in the cell, false to not wrap.
     */
    wrapText(): boolean;
    wrapText(wrapText: boolean): this;
    /**
     * true to shrink the text in the cell to fit, false to not shrink.
     */
    shrinkToFit(): boolean;
    shrinkToFit(shrinkToFit: boolean): this;
    /**
     * Direction of the text.
     */
    textDirection(): TextDirection | null;
    textDirection(textDirection: TextDirection | null): this;
    /**
     * Counter-clockwise angle of rotation in degrees. Must be [-90, 90] where negative numbers indicate clockwise rotation.
     */
    textRotation(): number | null;
    textRotation(textRotation: number | null): this;
    /**
     * Shortcut for textRotation of 45 degrees.
     */
    angleTextCounterclockwise(): boolean;
    angleTextCounterclockwise(angleTextCounterclockwise: boolean): this;
    /**
     * Shortcut for textRotation of -45 degrees.
     */
    angleTextClockwise(): boolean;
    angleTextClockwise(angleTextClockwise: boolean): this;
    /**
     * Shortcut for textRotation of 90 degrees.
     */
    rotateTextUp(): boolean;
    rotateTextUp(rotateTextUp: boolean): this;
    /**
     * Shortcut for textRotation of -90 degrees.
     */
    rotateTextDown(): boolean;
    rotateTextDown(rotateTextDown: boolean): this;
    /**
     * Special rotation that shows text vertical but individual letters are oriented normally. true to rotate, false to not rotate.
     */
    verticalText(): boolean;
    verticalText(verticalText: boolean): this;
    /**
     * The cell fill. If Color, will set a solid fill with the color. If string, will set a solid RGB fill. If number, will set a solid theme color fill.
     */
    fill(): StyleFill | null;
    fill(fill: StyleFill | null): this;
    /**
     * The border settings.
     */
    border(): StyleBordersOptional;
    border(settings: StyleBordersOptional): this;
    /**
     * The border settings for all borders.
     */
    borderEach(settings: Partial<StyleBorder> | null): this;
    /**
     * Color of the borders.
     */
    borderColor(): StyleBordersOptional<Partial<StyleColor>>;
    borderColor(bordersColor: StyleBordersOptional<Partial<StyleColor>>): this;
    /**
     * Color of the borders for all borders.
     */
    borderColorEach(color: Partial<StyleColor> | null): void;
    /**
     * Style of the outside borders.
     */
    borderStyle(): StyleBordersOptional<StyleBorderStyle>;
    borderStyle(style: StyleBordersOptional<StyleBorderStyle>): this;
    /**
     * Style of the outside borders for all borders.
     */
    borderStyleEach(style: StyleBorderStyle | null): void;
    leftBorder(): Partial<StyleBorder> | null;
    leftBorder(settings: Partial<StyleBorder> | null): this;
    rightBorder(): Partial<StyleBorder> | null;
    rightBorder(settings: Partial<StyleBorder> | null): this;
    topBorder(): Partial<StyleBorder> | null;
    topBorder(settings: Partial<StyleBorder> | null): this;
    bottomBorder(): Partial<StyleBorder> | null;
    bottomBorder(settings: Partial<StyleBorder> | null): this;
    diagonalBorder(): Partial<StyleBorder> | null;
    diagonalBorder(settings: Partial<StyleBorder> | null): this;
    leftBorderColor(): StyleColor | null;
    leftBorderColor(color: StyleColor | null): this;
    rightBorderColor(): StyleColor | null;
    rightBorderColor(color: StyleColor | null): this;
    topBorderColor(): StyleColor | null;
    topBorderColor(color: StyleColor | null): this;
    bottomBorderColor(): StyleColor | null;
    bottomBorderColor(color: StyleColor | null): this;
    diagonalBorderColor(): StyleColor | null;
    diagonalBorderColor(color: StyleColor | null): this;
    leftBorderStyle(): StyleBorderStyle | null;
    leftBorderStyle(style: StyleBorderStyle | null): this;
    rightBorderStyle(): StyleBorderStyle | null;
    rightBorderStyle(style: StyleBorderStyle | null): this;
    topBorderStyle(): StyleBorderStyle | null;
    topBorderStyle(style: StyleBorderStyle | null): this;
    bottomBorderStyle(): StyleBorderStyle | null;
    bottomBorderStyle(style: StyleBorderStyle | null): this;
    diagonalBorderStyle(): StyleBorderStyle | null;
    diagonalBorderStyle(style: StyleBorderStyle | null): this;
    /**
     * Direction of the diagonal border(s) from left to right.
     */
    diagonalBorderDirection(): StyleBorderDirection | null;
    diagonalBorderDirection(direction: StyleBorderDirection | null): this;
    /**
     * Number format code. {@link https://support.microsoft.com/en-us/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68?ui=en-us&rs=en-us&ad=us}
     */
    numberFormat(): string | null;
    numberFormat(formatCode: string | null): this;
}
/**
 * A style.
 * @public
 */
declare class Style {
    private sourceStyleId;
    private cloneStyleSheetNodes;
    private styleQuery?;
    /**
     * Gets the style ID.
     * @returns The ID.
     */
    id(): number | undefined;
    style(): StyleQuery;
}

type RangeCallback<T> = (cell: Cell, ri: number, ci: number, range: Range) => T;
/**
 * A range of cells.
 * @public
 */
declare class Range {
    /**
     * Get the address of the range.
     * @param opts - Options
     * @returns The address.
     */
    address(opts?: AddressRangeOption): string;
    /**
     * Sets sheet autoFilter to this range.
     * @returns This range.
     */
    autoFilter(): Range;
    /**
     * Gets a cell within the range.
     * @param ri - Row index relative to the top-left corner of the range (0-based).
     * @param ci - Column index relative to the top-left corner of the range (0-based).
     * @returns The cell.
     */
    cell(ri: number, ci: number): Cell;
    /**
     * Clear the contents of all the cells in the range.
     * @returns The range.
     */
    clear(): Range;
    /**
     * Gets the start cell of the range.
     * @returns The start cell.
     */
    startCell(): Cell;
    /**
     * Get the end cell of the range.
     * @returns The end cell.
     */
    endCell(): Cell;
    /**
     * Get the styles of the range.
     */
    style(): <T>(callback: (style: StyleQuery) => T) => T[][];
    /**
     * Set the styles of the range.
     */
    style(callback: (style: StyleQuery) => void): this;
    /**
     * Set the styles of the range.
     */
    style(callbacks: ((style: StyleQuery) => void)[][]): this;
    /**
     * Set the styles of the range.
     */
    style(style: Style): this;
    /**
     * Set the styles of the range.
     */
    style(styles: Style[][]): this;
    /**
     * Get the cells in the range as a 2D array.
     * @returns The cells.
     */
    cells(): Cell[][];
    [Symbol.iterator](): Generator<Cell, void, unknown>;
    /**
     * Call a function for each cell in the range. Goes by row then column.
     * @param callback - Function called for each cell in the range.
     * @returns The range.
     */
    forEach(
    /**
     * Callback used by forEach.
     * @param cell - The cell.
     * @param ri - The relative row index.
     * @param ci - The relative column index.
     * @param range - The range.
     */
    callback: (cell: Cell, ri: number, ci: number, range: Range) => void): Range;
    /**
     * Creates a 2D array of values by running each cell through a callback.
     * @param callback - Function called for each cell in the range.
     * @returns The 2D array of return values.
     */
    map<T>(
    /**
     * Callback used by map.
     * @callback Range~mapCallback
     * @param cell - The cell.
     * @param ri - The relative row index.
     * @param ci - The relative column index.
     * @param range - The range.
     * @returns The value to map to.
     */
    callback: (cell: Cell, ri: number, ci: number, range: Range) => T): T[][];
    /**
     * Gets the shared formula in the start cell (assuming it's the source of the shared formula).
     * @returns The shared formula.
     */
    formula(): string | undefined;
    /**
     * Sets the shared formula in the range. The formula will be translated for each cell.
     * @param formula - The formula to set.
     * @returns The range.
     */
    formula(formula: string): Range;
    /**
     * Gets a value indicating whether the cells in the range are merged.
     * @returns The value.
     */
    merged(): boolean;
    /**
     * Sets a value indicating whether the cells in the range should be merged.
     * @param merged - True to merge, false to unmerge.
     * @returns The range.
     */
    merged(merged: boolean): Range;
    /**
     * Gets the data validation object attached to the Range.
     * @returns The data validation object or null if not set.
     */
    dataValidation(): DataValidation | null;
    /**
     * Clear the data validation object of the entire range.
     * @param dataValidation - null to clear.
     * @returns true if removed.
     */
    dataValidation(dataValidation: null): boolean;
    /**
     * Set or clear the data validation object of the entire range.
     * @param dataValidation - Object or string
     * @returns The range.
     */
    dataValidation(dataValidation: DataValidation | string): Range;
    /**
     * Reduces the range to a single value accumulated from the result of a function called for each cell.
     * @param callback - Function called for each cell in the range.
     * @param initialValue - The initial value.
     * @returns The accumulated value.
     */
    reduce<T>(
    /**
     * Callback used by reduce.
     * @param {*} accumulator - The accumulated value.
     * @param {Cell} cell - The cell.
     * @param {number} ri - The relative row index.
     * @param {number} ci - The relative column index.
     * @param {Range} range - The range.
     * @returns {*} The value to map to.
     */
    callback: (accumulator: T, cell: Cell, ri: number, ci: number, range: Range) => T, initialValue: T): T;
    /**
     * Gets the parent sheet of the range.
     * @returns The parent sheet.
     */
    sheet(): Sheet;
    /**
     * Invoke a callback on the range and return the range. Useful for method chaining.
     * @param callback - The callback function.
     * @returns The range.
     */
    tap(
    /**
     * Callback used by tap.
     * @param range - The range.
     * @returns
     */
    callback: (range: Range) => void): Range;
    /**
     * Invoke a callback on the range and return the value provided by the callback. Useful for method chaining.
     * @param callback - The callback function.
     * @returns The return value of the callback.
     */
    thru<T>(
    /**
     * Callback used by thru.
     * @param range - The range.
     * @returns The value to return from thru.
     */
    callback: (range: Range) => T): T;
    /**
     * Get the values of each cell in the range as a 2D array.
     * @returns The values.
     */
    value(): CellValue[][];
    /**
     * Set the values in each cell to the result of a function called for each.
     * @param callback - The callback to provide value for the cell.
     * @returns The range.
     */
    value(callback: RangeCallback<CellValue | Date>): Range;
    /**
     * Sets the value in each cell to the corresponding value in the given 2D array of values.
     * @param values - The values to set.
     * @returns The range.
     */
    value(values: (CellValue | Date)[][]): Range;
    /**
     * Set the value of all cells in the range to a single value.
     * @param value - The value to set.
     * @returns The range.
     */
    value(value: CellValue | Date): Range;
    /**
     * Gets the parent workbook.
     * @returns The parent workbook.
     */
    workbook(): Workbook;
}

/**
 * A row.
 * @public
 */
declare class Row {
    private _sheet;
    /**
     * Get the address of the row.
     * @param opts - Options
     * @returns The address
     */
    address(opts?: AddressBaseOption): string;
    /**
     * Get a cell in the row.
     * @param columnNameOrNumber - The name or number (1-based) of the column.
     * @returns The cell.
     */
    cell(columnNameOrNumber: string | number): Cell;
    /**
     * Get the all cell in the row
     */
    cells(): Cell[];
    [Symbol.iterator](): IterableIterator<Cell>;
    /**
     * Gets the row height.
     * @returns The height (or null).
     */
    height(): number | null;
    /**
     * Sets the row height.
     * @param height - The height of the row.
     * @returns The row.
     */
    height(height: number | null): Row;
    /**
     * Gets a value indicating whether the row is hidden.
     * @returns A flag indicating whether the row is hidden.
     */
    hidden(): boolean;
    /**
     * Sets whether the row is hidden.
     * @param hidden - A flag indicating whether to hide the row.
     * @returns The row.
     */
    hidden(hidden: boolean): Row;
    /**
     * Gets the row number.
     * @returns The row number.
     */
    rowNumber(): number;
    /**
     * Gets the parent sheet of the row.
     * @returns The parent sheet.
     */
    sheet(): Sheet;
    /**
     * Get the style of the row.
     */
    style(): StyleQuery;
    /**
     * Set the style of the row.
     */
    style(callback: (styleQuery: StyleQuery) => void): this;
    /**
     * Set the style of the row.
     */
    style(style: Style): this;
    /**
     * Get the parent workbook.
     * @returns The parent workbook.
     */
    workbook(): Workbook;
    /**
     * Append horizontal page break after the row.
     * @returns the row.
     */
    addPageBreak(): Row;
}

/**
 * PrintAttributeName - Attribute name of the printOptions.
 *
 * - gridLines - Used in conjunction with gridLinesSet. If both gridLines and gridlinesSet are true, then grid lines shall print. Otherwise, they shall not (i.e., one or both have false values).
 * - gridLinesSet - Used in conjunction with gridLines. If both gridLines and gridLinesSet are true, then grid lines shall print. Otherwise, they shall not (i.e., one or both have false values).
 * - headings - Print row and column headings.
 * - horizontalCentered - Center on page horizontally when printing.
 * - verticalCentered - Center on page vertically when printing.
 */
type PrintAttributeName = 'gridLines' | 'gridLinesSet' | 'headings' | 'horizontalCentered' | 'verticalCentered';
/**
 * PageMarginsAttributeName - Attribute name of the pageMargins.
 *
 * - left - Left Page Margin in inches.
 * - right - Right page margin in inches.
 * - top - Top Page Margin in inches.
 * - bottom - Bottom Page Margin in inches.
 * - footer - Footer Page Margin in inches.
 * - header - Header Page Margin in inches.
 */
type PageMarginsAttributeName = 'left' | 'right' | 'top' | 'bottom' | 'footer' | 'header';
type PaneActivePane = 'bottomRight' | 'topRight' | 'bottomLeft' | 'topLeft';
type PaneState = 'frozen' | 'frozenSplit' | 'split';
/**
 * PaneOptions
 * https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.pane?view=openxml-2.8.1
 * @public
 */
type PaneOptions = {
    /**
     * Active Pane. The pane that is active.
     */
    activePane?: PaneActivePane;
    /**
     * Split State. Indicates whether the pane has horizontal / vertical splits, and whether those splits are frozen. right pane (when in Left-To-Right mode).
     */
    state?: PaneState;
    /**
     * Top Left Visible Cell. Location of the top left visible cell in the bottom
     */
    topLeftCell?: string;
    /**
     * (Horizontal Split Position) Horizontal position of the split, in 1/20th of a point; 0 (zero) if none. If the pane is frozen, this value indicates the number of columns visible in the top pane.
     */
    xSplit?: number;
    /**
     * (Vertical Split Position) Vertical position of the split, in 1/20th of a point; 0 (zero) if none. If the pane is frozen, this value indicates the number of rows visible in the left pane.
     */
    ySplit?: number;
};
/**
 * A worksheet.
 * @public
 */
declare class Sheet {
    private _workbook;
    private _pageBreaks;
    private _mergeCellsNode;
    private _dataValidationsNode;
    private _hyperlinksNode;
    private _sheetDataNode;
    private _colBreaksNode;
    private _rowBreaksNode;
    private _drawingIdNode?;
    private _drawing?;
    /**
     * Gets a value indicating whether the sheet is the active sheet in the workbook.
     * @returns True if active, false otherwise.
     */
    active(): boolean;
    /**
     * Make the sheet the active sheet in the workkbok.
     * @param active - Must be set to `true`. Deactivating directly is not supported. To deactivate, you should activate a different sheet instead.
     * @returns The sheet.
     */
    active(active: true): Sheet;
    /**
     * Get the active cell in the sheet.
     * @returns The active cell.
     */
    activeCell(): Cell;
    /**
     * Set the active cell in the workbook.
     * @param cell - The cell or address of cell to activate.
     * @returns The sheet.
     */
    activeCell(cell: string | Cell): Sheet;
    /**
     * Set the active cell in the workbook by row and column.
     * @param rowNumber - The row number of the cell.
     * @param columnNameOrNumber - The column name or number of the cell.
     * @returns The sheet.
     */
    activeCell(rowNumber: number, columnNameOrNumber: string | number): Sheet;
    /**
     * Get drawing for sheet
     */
    drawing(): Drawing;
    /**
     * Update drawing for sheet
     */
    drawing(drawing: Drawing): this;
    /**
     * Gets the cell with the given address.
     * @param address - The address of the cell.
     * @returns The cell.
     */
    cell(address: string): Cell;
    /**
     * Gets the cell with the given row and column numbers.
     * @param rowNumber - The row number (1-based) of the cell.
     * @param columnNameOrNumber - The column name or number (1-based) of the cell.
     * @returns The cell.
     */
    cell(rowNumber: number, columnNameOrNumber: string | number): Cell;
    /**
     * Gets a column in the sheet.
     * @param columnNameOrNumber - The name or number of the column.
     * @returns The column.
     */
    column(columnNameOrNumber: string | number): Column;
    /**
     * Gets a defined name scoped to the sheet.
     * @param name - The defined name.
     * @returns What the defined name refers to or null if not found. Will return the string formula if not a Row, Column, Cell, or Range.
     */
    definedName(name: string): null | string | Cell | Range | Row | Column;
    /**
     * Set a defined name scoped to the sheet.
     * @param name - The defined name.
     * @param refersTo - What the name refers to.
     * @returns The workbook.
     */
    definedName(name: string, refersTo: null | string | Cell | Range | Row | Column): Sheet;
    /**
     * Deletes the sheet and returns the parent workbook.
     * @returns The workbook.
     */
    delete(): Workbook;
    /**
     * Find the given pattern in the sheet and optionally replace it.
     * @param pattern - The pattern to look for. Providing a string will result in a case-insensitive substring search. Use a RegExp for more sophisticated searches.
     * @param replacement - The text to replace or a String.replace callback function. If pattern is a string, all occurrences of the pattern in each cell will be replaced.
     * @returns The matching cells.
     */
    find(pattern: string | RegExp, replacement?: string | ((name: string) => string)): Cell[];
    /**
     * Gets a value indicating whether this sheet's grid lines are visible.
     * @returns True if visibled, false if not.
     */
    gridLinesVisible(): boolean;
    /**
     * Sets whether this sheet's grid lines are visible.
     * @param visible - True to make visible, false to hide.
     * @returns The sheet.
     */
    gridLinesVisible(visible: boolean): Sheet;
    /**
     * Gets a value indicating if the sheet is hidden or not.
     * @returns True if hidden, false if visible, and 'very' if very hidden.
     */
    hidden(): boolean | string;
    /**
     * Set whether the sheet is hidden or not.
     * @param hidden - True to hide, false to show, and 'very' to make very hidden.
     * @returns The sheet.
     */
    hidden(hidden: boolean | string): Sheet;
    /**
     * Move the sheet.
     * @param indexOrBeforeSheet - The index to move the sheet to or the sheet (or name of sheet) to move this sheet before. Omit this argument to move to the end of the workbook.
     * @returns The sheet.
     */
    move(indexOrBeforeSheet?: number | string | Sheet): Sheet;
    /**
     * Get the name of the sheet.
     * @returns The sheet name.
     */
    name(): string;
    /**
     * Set the name of the sheet. *Note: this method does not rename references to the sheet so formulas, etc. can be broken. Use with caution!*
     * @param name - The name to set to the sheet.
     * @returns The sheet.
     */
    name(name: string): Sheet;
    /**
     * Gets a range from the given range address.
     * @param address - The range address (e.g. 'A1:B3').
     * @returns The range.
     */
    range(address: string): Range;
    /**
     * Gets a range from the given cells or cell addresses.
     * @param startCell - The starting cell or cell address (e.g. 'A1').
     * @param endCell - The ending cell or cell address (e.g. 'B3').
     * @returns The range.
     */
    range(startCell: string | Cell, endCell: string | Cell): Range;
    /**
     * Gets a range from the given row numbers and column names or numbers.
     * @param startRowNumber - The starting cell row number.
     * @param startColumnNameOrNumber - The starting cell column name or number.
     * @param endRowNumber - The ending cell row number.
     * @param endColumnNameOrNumber - The ending cell column name or number.
     * @returns The range.
     */
    range(startRowNumber: number, startColumnNameOrNumber: string | number, endRowNumber: number, endColumnNameOrNumber: string | number): Range;
    /**
     * get sheet autoFilter range.
     * @returns autoFilter range.
     */
    autoFilter(): Range | null;
    /**
     * Sets sheet autoFilter to a Range, or null to unsets.
     * @param range - The autoFilter range.
     * @returns This sheet.
     */
    autoFilter(range: Range | null): Sheet;
    /**
     * Gets the row with the given number.
     * @param rowNumber - The row number (1-based).
     * @returns The row with the given number.
     */
    row(rowNumber: number): Row;
    /**
     * Get the tab color.
     * @returns The color or null if not set.
     */
    tabColor(): null | StyleColor;
    /**
     * Sets the tab color.
     */
    tabColor(color: StyleColor | string): Sheet;
    /**
     * Remove the tab color.
     */
    tabColor(color: null): Sheet;
    /**
     * Sets the tab color by theme integer
     */
    tabColor(color: number): Sheet;
    /**
     * Gets a value indicating whether this sheet is selected.
     * @returns True if selected, false if not.
     */
    tabSelected(): boolean;
    /**
     * Sets whether this sheet is selected.
     * @param selected - True to select, false to deselected.
     * @returns The sheet.
     */
    tabSelected(selected: boolean): Sheet;
    /**
     * Gets a value indicating whether this sheet is rtl (Right To Left).
     * @returns True if rtl, false if ltr.
     */
    rightToLeft(): boolean;
    /**
     * Sets whether this sheet is rtl.
     * @param rtl - True to rtl, false to ltr (Left To Right).
     * @returns The sheet.
     */
    rightToLeft(rtl: boolean): Sheet;
    /**
     * Get the range of cells in the sheet that have contained a value or style at any point. Useful for extracting the entire sheet contents.
     * @returns The used range or undefined if no cells in the sheet are used.
     */
    usedRange(): Range | undefined;
    /**
     * Gets the parent workbook.
     * @returns The parent workbook.
     */
    workbook(): Workbook;
    /**
     * Gets all page breaks.
     * @returns the object holds both vertical and horizontal PageBreaks.
     */
    pageBreaks(): {
        colBreaks: PageBreaks;
        rowBreaks: PageBreaks;
    };
    /**
     * Gets the vertical page breaks.
     * @returns vertical PageBreaks.
     */
    verticalPageBreaks(): PageBreaks;
    /**
     * Gets the horizontal page breaks.
     * @returns horizontal PageBreaks.
     */
    horizontalPageBreaks(): PageBreaks;
    /**
     * Get the existing rows
     */
    rows(): Row[];
    /**
     * Get the print option given a valid print option attribute.
     * @param attributeName - Attribute name of the printOptions.
     * @returns
     */
    printOptions(attributeName: PrintAttributeName): boolean;
    /**
     * Set the print option given a valid print option attribute and a value.
     * @param attributeName - Attribute name of the printOptions. See get print option for list of valid attributes.
     * @param attributeEnabled - If `null` or `false` then the attribute is removed, otherwise the print option is enabled.
     * @returns The sheet.
     */
    printOptions(attributeName: PrintAttributeName, attributeEnabled: null | boolean): Sheet;
    /**
     * Get the print option for the gridLines attribute value.
     * @returns
     */
    printGridLines(): boolean;
    /**
     * Set the print option for the gridLines attribute value.
     * @param enabled - If `null` or `false` then attribute is removed, otherwise gridLines is enabled.
     * @returns The sheet.
     */
    printGridLines(enabled: null | boolean): Sheet;
    /**
     * Get the page margin given a valid attribute name.
     * If the value is not yet defined, then it will return the current preset value.
     * @param attributeName - Attribute name of the pageMargins.
     * @returns the attribute value.
     */
    pageMargins(attributeName: PageMarginsAttributeName): number | null;
    /**
     * Set the page margin (or override the preset) given an attribute name and a value.
     * @param attributeName - Attribute name of the pageMargins. See get page margin for list of valid attributes.
     * @param attributeStringValue - If `undefined` then set back to preset value, otherwise, set the given attribute value.
     * @returns The sheet.
     */
    pageMargins(attributeName: PageMarginsAttributeName, attributeStringValue: null | number | string): Sheet;
    /**
     * Page margins preset is a set of page margins associated with a name.
     * The page margin preset acts as a fallback when not explicitly defined by `Sheet.pageMargins`.
     * If a sheet already contains page margins, it attempts to auto-detect, otherwise they are defined as the template preset.
     * If no page margins exist, then the preset is undefined and will not be included in the output of `Sheet.toXmls`.
     * Available presets include: normal, wide, narrow, template.
     *
     * Get the page margins preset name. The registered name of a predefined set of attributes.
     * @returns The preset name.
     */
    pageMarginsPreset(): string | null;
    /**
     * Set the page margins preset by name, clearing any existing/temporary attribute values.
     * @param presetName - The preset name. If `null`, page margins will not be included in the output of `Sheet.toXmls`.
     * @returns The sheet.
     */
    pageMarginsPreset(presetName: null | string): Sheet;
    /**
     * Set a new page margins preset by name and attributes object.
     * @param presetName - The preset name.
     * @param presetOptions - The preset attributes.
     * @returns The sheet.
     */
    pageMarginsPreset(presetName: string, presetOptions: Record<PageMarginsAttributeName, number>): Sheet;
    /**
     * Gets sheet view pane options
     * @returns sheet view pane options or null
     */
    panes(): PaneOptions | null;
    /**
     * Sets sheet view pane options
     * @param paneOptions - sheet view pane options
     * @returns The sheet
     */
    panes(paneOptions: PaneOptions | null): Sheet;
    /**
     * Freezes Panes for this sheet.
     * @param xSplit - the number of columns visible in the top pane. 0 (zero) if none.
     * @param ySplit - the number of rows visible in the left pane. 0 (zero) if none.
     * @returns The sheet
     */
    freezePanes(xSplit: number, ySplit: number): Sheet;
    /**
     * freezes Panes for this sheet.
     * @param topLeftCell - Top Left Visible Cell. Location of the top left visible cell in the bottom
     * right pane (when in Left-To-Right mode).
     * @returns The sheet
     */
    freezePanes(topLeftCell: string): Sheet;
    /**
     * Splits Panes for this sheet.
     * @param xSplit - (Horizontal Split Position) Horizontal position of the split,
     * in 1/20th of a point; 0 (zero) if none.
     * @param ySplit - (Vertical Split Position) VVertical position of the split,
     * in 1/20th of a point; 0 (zero) if none.
     * @returns The sheet
     */
    splitPanes(xSplit: number, ySplit: number): Sheet;
    /**
     * resets to default sheet view panes.
     * @returns The sheet
     */
    resetPanes(): Sheet;
    /**
     * Create drawing relationship when it doesn't exist.
     */
    private findOrCreateDrawingRelationship;
}

/**
 * A column.
 * @public
 */
declare class Column {
    private _sheet;
    /**
     * Get the address of the column.
     * @param opts - Options
     * @returns The address
     */
    address(opts?: AddressBaseOption): string;
    /**
     * Get a cell within the column.
     * @param rowNumber - The row number (1-based).
     * @returns The cell in the column with the given row number.
     */
    cell(rowNumber: number): Cell;
    /**
     * Get the all cell in the column
     * @returns The cells in the column.
     */
    cells(): Cell[];
    [Symbol.iterator](): Generator<Cell, void, unknown>;
    /**
     * Get the name of the column.
     * @returns The column name.
     */
    columnName(): string;
    /**
     * Get the number of the column.
     * @returns The column number.
     */
    columnNumber(): number;
    /**
     * Gets a value indicating whether the column is hidden.
     * @returns A flag indicating whether the column is hidden.
     */
    hidden(): boolean;
    /**
     * Sets whether the column is hidden.
     * @param hidden - A flag indicating whether to hide the column.
     * @returns The column.
     */
    hidden(hidden: boolean): Column;
    /**
     * Get the parent sheet.
     * @returns The parent sheet.
     */
    sheet(): Sheet;
    /**
     * Get the style of the column.
     */
    style(): StyleQuery;
    /**
     * Set the style of the column.
     */
    style(callback: (styleQuery: StyleQuery) => void): this;
    /**
     * Set the style of the column.
     */
    style(style: Style): this;
    /**
     * Gets the width.
     * @returns The width (or null).
     */
    width(): number | null;
    /**
     * Sets the width.
     * @param width - The width of the column or null to clear.
     * @returns The column.
     */
    width(width: number | null): Column;
    /**
     * Get the parent workbook.
     * @returns The parent workbook.
     */
    workbook(): Workbook;
    /**
     * Append vertical page break after the column.
     * @returns the column.
     */
    addPageBreak(): Column;
}

/**
 * A formula error (e.g. #DIV/0!).
 * @public
 */
declare class FormulaError {
    _error: string;
    /**
     * Creates a new instance of Formula Error.
     * @param error - The error code.
     */
    constructor(error: string);
    /**
     * Get the error code.
     * @returns The error code.
     */
    error(): string;
    static PRESETS: {
        /**
         * \#DIV/0! error.
         */
        DIV0: FormulaError;
        /**
         * \#N/A error.
         */
        NA: FormulaError;
        /**
         * \#NAME? error.
         */
        NAME: FormulaError;
        /**
         * \#NULL! error.
         */
        NULL: FormulaError;
        /**
         * \#NUM! error.
         */
        NUM: FormulaError;
        /**
         * \#REF! error.
         */
        REF: FormulaError;
        /**
         * \#VALUE! error.
         */
        VALUE: FormulaError;
    };
}

type XmlRichTextFragmentElem = XmlElementRequired<XmlAttributes, XmlElementRequired[]>;
declare class RichTextStyleQuery extends StyleQueryBase {
    private fragment;
    constructor(fragment: RichTextFragment);
    protected get fontNode(): XmlElementRequired<XmlAttributes, XmlNode[]>;
}
type RichTextStyleBuilder = (styleQuery: RichTextStyleQuery) => void;
/**
 * A Rich text fragment.
 * @public
 */
declare class RichTextFragment {
    private _richText?;
    private _node;
    private styleQuery;
    /**
     * Creates a new instance of RichTextFragment.
     * @param value - Text value or XML node
     * @param styleBuilder - Multiple styles.
     * @param richText - The rich text instance where this fragment belongs to.
     */
    constructor(value: string | XmlRichTextFragmentElem, styleBuilder?: RichTextStyleBuilder | null, richText?: RichText);
    /**
     * Sets the value of this part of rich text
     */
    value(): string;
    value(text: string): RichTextFragment;
    style(): RichTextStyleQuery;
    style(callback: (styleQuery: RichTextStyleQuery) => void): RichTextStyleQuery;
}

/**
 * A RichText class that contains many RichTextFragment.
 * @public
 */
declare class RichText {
    private _nodes;
    private _cell?;
    /**
     * Creates a new instance of RichText. If you get the instance by calling `Cell.value()`,
     * adding a text contains line separator will trigger `Cell.style('wrapText', true)`, which
     * will make MS Excel show the new line. i.e. In MS Excel, Tap "alt+Enter" in a cell, the cell
     * will set wrap text to true automatically.
     *
     * @param nodes - The nodes stored in the shared string
     */
    constructor(nodes?: XmlRichTextFragmentElem[]);
    /**
     * Gets which cell this {@link RichText} instance belongs to.
     * @returns The cell this instance belongs to.
     */
    get cell(): Cell | undefined;
    /**
     * Gets the how many rich text fragment this {@link RichText} instance contains
     * @returns The number of fragments this {@link RichText} instance has.
     */
    get length(): number;
    /**
     * Gets concatenated text without styles.
     * @returns concatenated text
     */
    text(): string;
    /**
     * Gets the instance with cell reference defined.
     * @param cell - Cell reference.
     * @returns The instance with cell reference defined.
     */
    getInstanceWithCellRef(cell: Cell): RichText;
    /**
     * Returns a deep copy of this instance.
     * If cell reference is provided, it checks line separators and calls
     * `cell.style('wrapText', true)` when needed.
     * @param cell - The cell reference.
     * @returns A deep copied instance
     */
    copy(cell?: Cell): RichText;
    /**
     * Gets the ith fragment of this {@link RichText} instance.
     * @param index - The index
     * @returns A rich text fragment
     */
    get(index: number): RichTextFragment;
    /**
     * Removes a rich text fragment. This instance will be mutated.
     * @param index - the index of the fragment to remove
     * @returns the rich text instance
     */
    remove(index: number): RichText;
    /**
     * Adds a rich text fragment to the last or after the given index. This instance will be mutated.
     * @param text - the text
     * @param styleBuilder - the styles js object, i.e. `{fontSize: 12}`
     * @param index - the index of the fragment to add
     * @returns the rich text instance
     */
    add(text: string, styleBuilder?: RichTextStyleBuilder, index?: number | null): RichText;
    /**
     * Clears this rich text
     * @returns the rich text instance
     */
    clear(): RichText;
    /**
     * Remove all unsupported nodes (phoneticPr, rPh for Japanese language).
     */
    removeUnsupportedNodes(): void;
}

/**
 * @public
 */
type CellValue = string | boolean | number | null | undefined | RichText | FormulaError;
/**
 * A cell
 * @public
 */
declare class Cell {
    private _row;
    /**
     * Gets a value indicating whether the cell is the active cell in the sheet.
     * @returns True if active, false otherwise.
     */
    active(): boolean;
    /**
     * Make the cell the active cell in the sheet.
     * @param active - Must be set to `true`. Deactivating directly is not supported. To deactivate, you should activate a different cell instead.
     * @returns The cell.
     */
    active(active: boolean): Cell;
    /**
     * Get the address of the column.
     * @param opts - Options
     * @returns The address
     */
    address(opts?: AddressCellOption): string;
    /**
     * Gets the parent column of the cell.
     * @returns The parent column.
     */
    column(): Column;
    /**
     * Clears the contents from the cell.
     * @returns The cell.
     */
    clear(): Cell;
    /**
     * Gets the column name of the cell.
     * @returns The column name.
     */
    columnName(): string;
    /**
     * Gets the column number of the cell (1-based).
     * @returns The column number.
     */
    columnNumber(): number;
    /**
     * Find the given pattern in the cell and optionally replace it.
     * @param pattern - The pattern to look for. Providing a string will result in a case-insensitive substring search. Use a RegExp for more sophisticated searches.
     * @param replacement - The text to replace or a String.replace callback function. If pattern is a string, all occurrences of the pattern in the cell will be replaced.
     * @returns A flag indicating if the pattern was found.
     */
    find(pattern: string | RegExp, replacement?: string | ((name: string) => string)): boolean;
    /**
     * Gets the formula in the cell. Note that if a formula was set as part of a range, the getter will return 'SHARED'. This is a limitation that may be addressed in a future release.
     * @returns The formula in the cell.
     */
    formula(): string | undefined;
    /**
     * Sets the formula in the cell.
     * @param formula - The formula to set.
     * @returns The cell.
     */
    formula(formula: string | undefined): Cell;
    /**
     * Gets the hyperlink attached to the cell.
     * @returns The hyperlink or null if not set.
     */
    hyperlink(): string | null;
    /**
     * Set or clear the hyperlink on the cell.
     * @param hyperlink - The hyperlink to set or null to clear.
     * @returns The cell.
     */
    hyperlink(hyperlink: string | null): Cell;
    /**
     * Set the hyperlink options on the cell.
     * @param opts - Options or Cell. If opts is a Cell then an internal hyperlink is added.
     * @returns The cell.
     */
    hyperlink(opts: HyperlinkOption | Cell): Cell;
    /**
     * Gets the data validation object attached to the cell.
     * @returns The data validation or null if not set.
     */
    dataValidation(): DataValidation | null;
    /**
     * Clear the data validation object of the cell.
     * @param dataValidation - null to clear.
     * @returns true if removed.
     */
    dataValidation(dataValidation: null): boolean;
    /**
     * Set or clear the data validation object of the cell.
     * @param dataValidation - Object or String to set or null to delete
     * @returns The cell.
     */
    dataValidation(dataValidation: DataValidation | string): Cell;
    /**
     * Invoke a callback on the cell and return the cell. Useful for method chaining.
     * @param callback - The callback function.
     * @returns The cell.
     */
    tap(callback: (cell: Cell) => void): Cell;
    /**
     * Invoke a callback on the cell and return the value provided by the callback. Useful for method chaining.
     * @param callback - The callback function.
     * @returns The return value of the callback.
     */
    thru<T>(callback: (cell: Cell) => T): T;
    /**
     * Create a range from this cell and another.
     * @param cell - The other cell or cell address to range to.
     * @returns The range.
     */
    rangeTo(cell: Cell | string): Range;
    /**
     * Returns a cell with a relative position given the offsets provided.
     * @param rowOffset - The row offset (0 for the current row).
     * @param columnOffset - The column offset (0 for the current column).
     * @returns The relative cell.
     */
    relativeCell(rowOffset: number, columnOffset: number): Cell;
    /**
     * Gets the parent row of the cell.
     * @returns The parent row.
     */
    row(): Row;
    /**
     * Gets the row number of the cell (1-based).
     * @returns The row number.
     */
    rowNumber(): number;
    /**
     * Gets the parent sheet.
     * @returns The parent sheet.
     */
    sheet(): Sheet;
    /**
     * Get the style of the cell.
     */
    style(): StyleQuery;
    /**
     * Set the style of the cell.
     */
    style(callback: (styleQuery: StyleQuery) => void): this;
    /**
     * Set the style of the cell.
     */
    style(style: Style): this;
    /**
     * Gets the value of the cell.
     * @returns The value of the cell.
     */
    value(): CellValue;
    /**
     * Sets the value of the cell.
     * @param value - The value to set.
     * @returns The cell.
     */
    value(value: CellValue | Date): Cell;
    /**
     * Sets the value of the RichText.
     * @param value - The rich text to set.
     * @returns The cell.
     */
    value(value: RichText): Cell;
    /**
     * Sets the values in the range starting with the cell.
     * @param values - 2D array of values to set.
     * @returns The range that was set.
     */
    value(values: (CellValue | Date)[][]): Range;
    /**
     * Gets the value as a string.
     * @returns The value as a string.
     */
    valueAsString(): string;
    /**
     * Gets the value as a boolean.
     * @returns The value as a boolean.
     */
    valueAsBoolean(): boolean;
    /**
     * Gets the value as a number.
     * @returns The value as a number.
     */
    valueAsNumber(): number;
    /**
     * Gets the value as a RichText.
     * @returns The value as a RichText.
     */
    valueAsRichText(): RichText;
    /**
     * Gets the parent workbook.
     * @returns The parent workbook.
     */
    workbook(): Workbook;
    /**
     * Append horizontal page break after the cell.
     * @returns the cell.
     */
    addHorizontalPageBreak(): Cell;
}

declare const allowedProperties: {
    title: string;
    subject: string;
    author: string;
    creator: string;
    description: string;
    keywords: string;
    category: string;
};
type CorePropertyKey = keyof typeof allowedProperties;
/**
 * Core properties
 */
declare class CoreProperties {
    private _node;
    /**
     * Sets a specific property.
     * @param name - The name of the property.
     * @param value - The value of the property.
     * @returns CoreProperties.
     */
    set(name: CorePropertyKey, value: string | null): CoreProperties;
    /**
     * Get a specific property.
     * @param name - The name of the property.
     * @returns The property value.
     */
    get(name: CorePropertyKey): string | undefined;
}

/**
 * @public
 */
type WorkbookCreateOptions = {
    /**
     * The password to decrypt the workbook
     */
    password?: string;
};
type WorkbookOutputMap = {
    'node:buffer': Buffer;
    'array-buffer': ArrayBuffer;
    blob: Blob;
};
/**
 * @public
 */
type WorkbookOutputType = keyof WorkbookOutputMap;
/**
 * @public
 */
type WorkbookOutputOptions = {
    /**
     * The password to use to encrypt the workbook.
     */
    password?: string;
};
/**
 * A workbook.
 * @public
 */
declare class Workbook {
    private _definedNamesNode;
    private _appProperties?;
    private _encryptor?;
    /**
     * Create a new blank workbook.
     * @returns The workbook.
     */
    static fromBlank(): Promise<Workbook>;
    /**
     * Loads a workbook from a file. Only works on nodejs
     * @param filepath - The filepath for xlsx
     * @param opts - Options
     * @returns The workbook.
     */
    static fromFile(filepath: string, opts?: WorkbookCreateOptions): Promise<Workbook>;
    /**
     * Loads a workbook from a data object. (Supports any supported [JSZip data types]{@link https://stuk.github.io/jszip/documentation/api_jszip/load_async.html}.)
     * @param data - The data to load.
     * @param opts - Options
     * @returns The workbook.
     */
    static fromData(data: ArrayBuffer | Buffer, opts?: WorkbookCreateOptions): Promise<Workbook>;
    private encryptor;
    /**
     * Get the active sheet in the workbook.
     * @returns The active sheet.
     */
    activeSheet(): Sheet;
    /**
     * Set the active sheet in the workbook.
     * @param sheet - The sheet or name of sheet or index of sheet to activate. The sheet must not be hidden.
     * @returns The workbook.
     */
    activeSheet(sheet: Sheet | string | number): Workbook;
    /**
     * Add a new sheet to the workbook.
     * @param name - The name of the sheet. Must be unique, less than 31 characters, and may not contain the following characters: \\ / * [ ] : ?
     * @param indexOrBeforeSheet - The index to move the sheet to or the sheet (or name of sheet) to move this sheet before. Omit this argument to move to the end of the workbook.
     * @returns The new sheet.
     */
    addSheet(name: string, indexOrBeforeSheet?: number | string | Sheet): Sheet;
    /**
     * Gets a defined name scoped to the workbook.
     * @param name - The defined name.
     * @returns What the defined name refers to or null if not found. Will return the string formula if not a Row, Column, Cell, or Range.
     */
    definedName(name: string): null | string | Cell | Range | Row | Column;
    /**
     * Set a defined name scoped to the workbook.
     * @param name - The defined name.
     * @param refersTo - What the name refers to.
     * @returns The workbook.
     */
    definedName(name: string, refersTo: null | string | Cell | Range | Row | Column): Workbook;
    /**
     * Delete a sheet from the workbook.
     * @param sheet - The sheet or name of sheet or index of sheet to move.
     * @returns The workbook.
     */
    deleteSheet(sheet: Sheet | string | number): Workbook;
    /**
     * Find the given pattern in the workbook and optionally replace it.
     * @param pattern - The pattern to look for. Providing a string will result in a case-insensitive substring search. Use a RegExp for more sophisticated searches.
     * @param replacement - The text to replace or a String.replace callback function. If pattern is a string, all occurrences of the pattern in each cell will be replaced.
     * @returns The matching cells.
     */
    find(pattern: string | RegExp, replacement?: string | ((name: string) => string)): Cell[];
    /**
     * Move a sheet to a new position.
     * @param sheet - The sheet or name of sheet or index of sheet to move.
     * @param indexOrBeforeSheet - The index to move the sheet to or the sheet (or name of sheet) to move this sheet before. Omit this argument to move to the end of the workbook.
     * @returns The workbook.
     */
    moveSheet(sheet: Sheet | string | number, indexOrBeforeSheet?: number | string | Sheet): Workbook;
    /**
     * Generates the workbook output.
     * @param type - Output type
     * @param opts - Output options
     * @returns The data.
     */
    output<T extends WorkbookOutputType>(type: T, opts?: WorkbookOutputOptions): Promise<WorkbookOutputMap[T]>;
    /**
     * Generates the workbook file.
     * @param filepath - Output filepath
     * @param opts - Output options
     * @returns The data.
     */
    outputFile(filepath: string, opts?: WorkbookOutputOptions): Promise<void>;
    /**
     * Gets the sheet with the provided name or index (0-based).
     * @param sheetNameOrIndex - The sheet name or index.
     * @returns The sheet or undefined if not found.
     */
    sheet(sheetNameOrIndex: string | number): Sheet | undefined;
    /**
     * Get an array of all the sheets in the workbook.
     * @returns The sheets.
     */
    sheets(): Sheet[];
    /**
     * Gets an individual property.
     * @param name - The name of the property.
     * @returns The property.
     */
    property(name: CorePropertyKey): string | null;
    /**
     * Gets multiple properties.
     * @param names - The names of the properties.
     * @returns Object whose keys are the property names and values are the properties.
     */
    property<T extends CorePropertyKey>(names: T[]): Partial<Record<T, string>>;
    /**
     * Sets an individual property.
     * @param name - The name of the property.
     * @param value - The value to set.
     * @returns The workbook.
     */
    property(name: CorePropertyKey, value: string): Workbook;
    /**
     * Sets multiple properties.
     * @param properties - Object whose keys are the property names and values are the values to set.
     * @returns The workbook.
     */
    property(properties: Record<CorePropertyKey, string>): Workbook;
    /**
     * Get access to core properties object
     * @returns The core properties.
     */
    properties(): CoreProperties;
    scopedDefinedName<R extends string | null | Cell | Range | Row | Column>(...args: [sheetScope: Sheet | null, name: string] | [
        sheetScope: Sheet | null,
        name: string,
        refersTo: null | string | Cell | Range | Row | Column
    ]): R;
    /**
     * Add a new sheet to the workbook.
     *
     * **WARN:** this function has limits:  if you clone a sheet with some images or other things link outside the Sheet object, these things in the cloned sheet will be locked when you open in MS Excel app.
     * @param from - The sheet to be cloned.
     * @param name - The name of the new sheet. Must be unique, less than 31 characters, and may not contain the following characters: \\ / * [ ] : ?
     * @param indexOrBeforeSheet - The index to move the sheet to or the sheet (or name of sheet) to move this sheet before. Omit this argument to move to the end of the workbook.
     * @returns The new sheet.
     */
    cloneSheet(from: Sheet, name: string, indexOrBeforeSheet?: number | string | Sheet): Sheet;
}

/**
 * Date converter.
 * @public
 */
declare const dateConverter: {
    /**
     * Convert a date to a number for Excel.
     * @param date - The date.
     * @returns The number.
     */
    dateToNumber(date: Date): number;
    /**
     * Convert a number to a date.
     * @param number - The number.
     * @returns The date.
     */
    numberToDate(number: number): Date;
};

declare namespace AddressReference {
    type RangeInput = {
        type: 'range';
        sheetName?: string;
        /**
         * @defaultValue false
         */
        startRowAnchored?: boolean;
        startRowNumber: number;
        /**
         * @defaultValue false
         */
        endRowAnchored?: boolean;
        endRowNumber: number;
        /**
         * @defaultValue false
         */
        startColumnAnchored?: boolean;
        startColumnName?: string;
        startColumnNumber?: number;
        /**
         * @defaultValue false
         */
        endColumnAnchored?: boolean;
        endColumnName?: string;
        endColumnNumber?: number;
    };
    type Range = {
        type: 'range';
        sheetName?: string;
        startRowAnchored: boolean;
        startRowNumber: number;
        endRowAnchored: boolean;
        endRowNumber: number;
        startColumnAnchored: boolean;
        startColumnName: string;
        startColumnNumber: number;
        endColumnAnchored: boolean;
        endColumnName: string;
        endColumnNumber: number;
    };
    type CellInput = {
        type: 'cell';
        sheetName?: string;
        /**
         * @defaultValue false
         */
        rowAnchored?: boolean;
        rowNumber: number;
        /**
         * @defaultValue false
         */
        columnAnchored?: boolean;
        columnName?: string;
        columnNumber?: number;
    };
    type Cell = {
        type: 'cell';
        sheetName?: string;
        rowAnchored: boolean;
        rowNumber: number;
        columnAnchored: boolean;
        columnName: string;
        columnNumber: number;
    };
    type ColumnRangeInput = {
        type: 'columnRange';
        sheetName?: string;
        /**
         * @defaultValue false
         */
        startColumnAnchored?: boolean;
        startColumnName?: string;
        startColumnNumber?: number;
        /**
         * @defaultValue false
         */
        endColumnAnchored?: boolean;
        endColumnName?: string;
        endColumnNumber?: number;
    };
    type ColumnRange = {
        type: 'columnRange';
        sheetName?: string;
        startColumnAnchored: boolean;
        startColumnName: string;
        startColumnNumber: number;
        endColumnAnchored: boolean;
        endColumnName: string;
        endColumnNumber: number;
    };
    type ColumnInput = {
        type: 'column';
        sheetName?: string;
        /**
         * @defaultValue false
         */
        columnAnchored?: boolean;
        columnName?: string;
        columnNumber?: number;
    };
    type Column = {
        type: 'column';
        sheetName?: string;
        columnAnchored: boolean;
        columnName: string;
        columnNumber: number;
    };
    type RowRangeInput = {
        type: 'rowRange';
        sheetName?: string;
        /**
         * @defaultValue false
         */
        startRowAnchored?: boolean;
        startRowNumber: number;
        /**
         * @defaultValue false
         */
        endRowAnchored?: boolean;
        endRowNumber: number;
    };
    type RowRange = {
        type: 'rowRange';
        sheetName?: string;
        startRowAnchored: boolean;
        startRowNumber: number;
        endRowAnchored: boolean;
        endRowNumber: number;
    };
    type RowInput = {
        type: 'row';
        sheetName?: string;
        /**
         * @defaultValue false
         */
        rowAnchored?: boolean;
        rowNumber: number;
    };
    type Row = {
        type: 'row';
        sheetName?: string;
        rowAnchored: boolean;
        rowNumber: number;
    };
    type AnyInput = RangeInput | CellInput | ColumnRangeInput | ColumnInput | RowRangeInput | RowInput;
    type Any = Range | Cell | ColumnRange | Column | RowRange | Row;
}
/**
 * @public
 */
declare class AddressConverter {
    /**
     * Convert a column name to a number.
     * @param name - The column name.
     * @returns The number.
     */
    columnNameToNumber(name: string): number;
    /**
     * Convert a column number to a name.
     * @param number - The column number.
     * @returns The name.
     */
    columnNumberToName(number: number): string;
    fromAddress<T extends AddressReference.Any>(address?: string): T | undefined;
    fromAddress(address?: string): AddressReference.Any | undefined;
    /**
     * Convert a reference object to an address.
     * @param ref - The reference object.
     * @returns The address.
     */
    toAddress(ref: AddressReference.RangeInput): string;
    toAddress(ref: AddressReference.CellInput): string;
    toAddress(ref: AddressReference.ColumnRangeInput): string;
    toAddress(ref: AddressReference.ColumnInput): string;
    toAddress(ref: AddressReference.RowRangeInput): string;
    toAddress(ref: AddressReference.RowInput): string;
}
/**
 * @public
 */
declare const addressConverter: AddressConverter;

/**
 * Unit converter
 * @public
 */
declare const unitConverter: {
    /**
     * Pixels to EMUs unit
     */
    pxToEmu(v: number): number;
    /**
     * EMUs to Pixels unit
     */
    emuToPx(v: number): number;
};

/**
 * The XLSX mime type.
 * @public
 */
declare const MIME_TYPE: string;

export { AbsoluteAnchor, Cell, CellValue, Column, Drawing, FormulaError, HorizontalAlignment, MIME_TYPE, OneCellAnchor, PageBreaks, PaneOptions, Picture, PictureFileOptions, Range, RichText, Row, Sheet, Style, StyleAlignment, StyleBorder, StyleBorderDirection, StyleBorderOptional, StyleBorderStyle, StyleBorders, StyleBordersOptional, StyleColor, StyleFill, StyleFillGradient, StyleFillGradientGradientType, StyleFillGradientLinear, StyleFillGradientPath, StyleFillPattern, StyleFillPatternName, StyleFillSolid, StyleFontScheme, StyleGenericFamily, StyleQuery, StyleQueryBase, StylesBase, TextDirection, TwoCellAnchor, VerticalAlignment, Workbook, WorkbookCreateOptions, WorkbookOutputOptions, WorkbookOutputType, addressConverter, dateConverter, unitConverter };
