/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { CalcError } from '@progress/kendo-spreadsheet-common'; import { Cell } from '@progress/kendo-spreadsheet-common'; import { CellBorder } from '@progress/kendo-spreadsheet-common'; import { CellDefaultStyle } from '@progress/kendo-spreadsheet-common'; import { CellRef } from '@progress/kendo-spreadsheet-common'; import { Context } from '@progress/kendo-spreadsheet-common'; import { dateToSerial } from '@progress/kendo-spreadsheet-common'; import { defineAlias } from '@progress/kendo-spreadsheet-common'; import { defineFunction } from '@progress/kendo-spreadsheet-common'; import { DocumentDescriptor } from '@progress/kendo-spreadsheet-common'; import { ExcelExportSettings } from '@progress/kendo-spreadsheet-common'; import { Matrix } from '@progress/kendo-spreadsheet-common'; import { NameRef } from '@progress/kendo-spreadsheet-common'; import { NULLREF } from '@progress/kendo-spreadsheet-common'; import { packDate } from '@progress/kendo-spreadsheet-common'; import { packTime } from '@progress/kendo-spreadsheet-common'; import { Range as Range_2 } from '@progress/kendo-spreadsheet-common'; import { RangeRef } from '@progress/kendo-spreadsheet-common'; import * as React_2 from 'react'; import { Ref } from '@progress/kendo-spreadsheet-common'; import { SelectedHeaders } from '@progress/kendo-spreadsheet-common'; import { serialToDate } from '@progress/kendo-spreadsheet-common'; import { Sheet } from '@progress/kendo-spreadsheet-common'; import { SheetColumn } from '@progress/kendo-spreadsheet-common'; import { SheetDescriptor } from '@progress/kendo-spreadsheet-common'; import { SheetRow } from '@progress/kendo-spreadsheet-common'; import { SpreadsheetOptions } from '@progress/kendo-spreadsheet-common'; import { SpreadsheetWidget } from '@progress/kendo-spreadsheet-common'; import { UnionRef } from '@progress/kendo-spreadsheet-common'; import { unpackDate } from '@progress/kendo-spreadsheet-common'; import { unpackTime } from '@progress/kendo-spreadsheet-common'; import { View } from '@progress/kendo-spreadsheet-common'; import { Workbook } from '@progress/kendo-spreadsheet-common'; import { Workbook as Workbook_2 } from '@progress/kendo-ooxml'; /** * The AddColumnLeft tool component. */ export declare const AddColumnLeft: React_2.FunctionComponent; /** * The props of the AddColumnLeft tool component. */ export declare interface AddColumnLeftProps extends TableToolProps { } /** * The AddColumnRight tool component. */ export declare const AddColumnRight: React_2.FunctionComponent; /** * The props of the AddColumnRight tool component. */ export declare interface AddColumnRightProps extends TableToolProps { } /** * The AddRowAbove tool component. */ export declare const AddRowAbove: React_2.FunctionComponent; /** * The props of the AddRowAbove tool component. */ export declare interface AddRowAboveProps extends TableToolProps { } /** * The AddRowBelow tool component. */ export declare const AddRowBelow: React_2.FunctionComponent; /** * The props of the AddRowBelow tool component. */ export declare interface AddRowBelowProps extends TableToolProps { } /** * The AlignHorizontally tool component. */ export declare const AlignHorizontally: React_2.FunctionComponent; /** * The props of the AlignHorizontally tool component. */ export declare interface AlignHorizontallyProps extends SpreadsheetToolProps { /** * The value of the tool. */ value: string; } /** * The Alignment tool component. */ export declare const Alignment: React_2.FunctionComponent; /** * The props of the Alignment tool component. */ export declare interface AlignmentProps extends SpreadsheetToolProps { /** * The value of the tool. */ value: { textAlign?: string; verticalAlign?: string; }; } /** * The AlignVertically tool component. */ export declare const AlignVertically: React_2.FunctionComponent; /** * The props of the AlignVertically tool component. */ export declare interface AlignVerticallyProps extends SpreadsheetToolProps { /** * The value of the tool. */ value: string; } /** * The BackgroundColor tool component. */ export declare const BackgroundColor: React.FunctionComponent; /** * The props of the BackgroundColor tool component. */ export declare interface BackgroundColorProps extends ColorToolProps { } /** * The Bold tool component. */ export declare const Bold: React.FunctionComponent; /** * The props of the Bold tool component. */ export declare interface BoldProps extends PropertyChangeToolProps { } export { CalcError } export { Cell } export { CellBorder } export { CellDefaultStyle } export { CellRef } /** * @hidden */ export declare const CleanFormatting: React_2.FunctionComponent; /** * @hidden */ export declare interface CleanFormattingProps extends PropertyChangeToolProps { } /** * @hidden */ declare interface ColorToolProps extends SpreadsheetToolProps { /** * The value of the tool. */ value?: string; } export { Context } export { dateToSerial } /** * The DecreaseDecimal tool component. */ export declare const DecreaseDecimal: React_2.FunctionComponent; /** * The props of the DecreaseDecimal tool component. */ export declare interface DecreaseDecimalProps extends SpreadsheetToolProps { } /** * The DecreaseFontSize tool component. */ export declare const DecreaseFontSize: React_2.FunctionComponent; /** * The props of the DecreaseFontSize tool component. */ export declare interface DecreaseFontSizeProps extends FontSizeChangeToolProps { } /** * The default toolbar configuration. */ export declare const defaultTabs: SpreadsheetTab[]; export { defineAlias } export { defineFunction } /** * The DeleteColumn tool component. */ export declare const DeleteColumn: React_2.FunctionComponent; /** * The props of the DeleteColumn tool component. */ export declare interface DeleteColumnProps extends TableToolProps { } /** * The DeleteRow tool component. */ export declare const DeleteRow: React_2.FunctionComponent; /** * The props of the DeleteRow tool component. */ export declare interface DeleteRowProps extends TableToolProps { } export { DocumentDescriptor } /** * @hidden */ declare interface DropDownToolProps extends SpreadsheetToolProps { /** * The value of the tool. */ value?: any; } /** * The ExcelExport tool component. */ export declare const ExcelExport: React_2.FunctionComponent; /** * The props of the ExcelExport tool component. */ export declare interface ExcelExportProps extends SpreadsheetToolProps { } export { ExcelExportSettings } /** * The FontFamily tool component. */ export declare const FontFamily: React_2.FunctionComponent; /** * The props of the FontFamily tool component. */ export declare interface FontFamilyProps extends DropDownToolProps { } /** * The FontSize tool component. */ export declare const FontSize: React_2.FunctionComponent; /** * @hidden */ declare interface FontSizeChangeToolProps extends SpreadsheetToolProps { /** * The selected state of the tool. */ value: number; } /** * The props of the FontSize tool component. */ export declare interface FontSizeProps extends DropDownToolProps { } /** * The Format tool component. */ export declare const Format: React_2.FunctionComponent; /** * The props of the Format tool component. */ export declare interface FormatProps extends SpreadsheetToolProps { } /** * The GridLines tool component. */ export declare const GridLines: React_2.FunctionComponent; /** * The props of the GridLines tool component. */ export declare interface GridLinesProps extends SpreadsheetToolProps { /** * The selected state of the tool. */ value?: boolean; } /** * The IncreaseDecimal tool component. */ export declare const IncreaseDecimal: React_2.FunctionComponent; /** * The props of the IncreaseDecimal tool component. */ export declare interface IncreaseDecimalProps extends SpreadsheetToolProps { } /** * The IncreaseFontSize tool component. */ export declare const IncreaseFontSize: React_2.FunctionComponent; /** * The props of the IncreaseFontSize tool component. */ export declare interface IncreaseFontSizeProps extends FontSizeChangeToolProps { } /** * The Italic tool component. */ export declare const Italic: React.FunctionComponent; /** * The props of the Italic tool component. */ export declare interface ItalicProps extends PropertyChangeToolProps { } export { Matrix } export { NameRef } export { NULLREF } /** * The Open tool component. */ export declare const Open: React_2.FunctionComponent; /** * The props of the Open tool component. */ export declare interface OpenProps extends SpreadsheetToolProps { } export { packDate } export { packTime } /** * @hidden */ declare interface PropertyChangeToolProps extends SpreadsheetToolProps { /** * The selected state of the tool. */ value?: boolean; } export { Range_2 as Range } export { RangeRef } /** * The Redo tool component. */ export declare const Redo: React.FunctionComponent; /** * The props of the Redo tool component. */ export declare interface RedoProps extends SpreadsheetToolProps { } export { Ref } export { serialToDate } export { Sheet } export { SheetColumn } export { SheetDescriptor } export { SheetRow } /** * Represents the [KendoReact Spreadsheet component]({% slug overview_spreadsheet %}). * * Accepts properties of type [SpreadsheetProps]({% slug api_spreadsheet_spreadsheetprops %}). * Obtaining the ref will give you an object of type [SpreadsheetHandle]({% slug api_spreadsheet_spreadsheethandle %}). * * @example * ```jsx * const sheets = [ * { * name: 'Food Order', * rows: [ * { * cells: [ * { * value: 216321, * textAlign: 'center', * }, * ], * }, * ], * columns: [ * { * width: 100, * }, * ], * }, * ]; * const App = () => { * return ( * * ); * }; * ReactDOM.render(, document.querySelector("my-app")); * ``` */ export declare const Spreadsheet: React_2.ForwardRefExoticComponent>; /** * Represents the `SpreadsheetChangeEvent` object. */ export declare interface SpreadsheetChangeEvent extends SpreadsheetEvent, SpreadsheetSelectEvent { } declare interface SpreadsheetEvent { /** * The widget instance which fired the event. */ sender: SpreadsheetWidget; } /** * Represents the `SpreadsheetExcelExportEvent` object. */ export declare interface SpreadsheetExcelExportEvent extends SpreadsheetEvent { /** * The array of data items that is used to create the Excel workbook. */ data: Array; /** * The Excel workbook configuration object. * Modifications of the workbook will reflect in the output Excel document. */ workbook: Workbook_2; /** * If invoked, the Spreadsheet will not save the generated file. */ preventDefault: Function; } /** * Represents the `SpreadsheetExcelImportEvent` object. */ export declare interface SpreadsheetExcelImportEvent extends SpreadsheetEvent { /** * The file that is being imported. */ file: Blob | File; /** * If invoked, the Spreadsheet will not import the file. */ preventDefault: Function; } /** * Represents the Spreadsheet handle object. */ export declare interface SpreadsheetHandle { /** * The current element or `null` if there is no one. */ element: HTMLDivElement | null; /** * The props values of the Spreadsheet. */ props: SpreadsheetProps; /** * Represents the SpreadsheetWidget object, holding the core functionality of the Spreadsheet. */ instance: SpreadsheetWidget | null; /** * Returns the `View` object of the Spreadsheet. */ get view(): View; /** * Returns the `Workbook` object of the Spreadsheet. */ get workbook(): Workbook; /** * Executes the passed command against the selected cell/range. * * @param options An object containing the command name and the required by it options. */ executeCommand(options: any): void; /** * Loads the workbook data from an object with the format that is defined in the configuration. * * Note: All existing sheets and their data will be lost. * * @param json The object from where data will be loaded. This has to be the deserialized object, not the JSON string. */ fromJSON(json: DocumentDescriptor): void; /** * Serializes the workbook. */ toJSON(): DocumentDescriptor; /** * Serializes the workbook. This method does not return the JSON, but a Promise object which will yield the JSON data when it is available. * The method is functionally similar to `toJSON`, but it is also able to save the embedded images (this is the reason why it must be asynchronous). */ saveJSON(): Promise; /** * Clears the Spreadsheet and populates it with data from the specified Excel (.xlsx) file. * * @param blob The file or blob that is usually obtained through a file input. */ fromFile(file: File | Blob): void; /** * Initiates the Excel export. Also fires the excelExport event. * * Note: Calling this method may trigger the built-in popup blocker of the browser. * To avoid that, always call it as a response to an end-user action, for example, a button click. */ saveAsExcel(options: any): void; /** * Gets or sets the active sheet. */ activeSheet(sheet?: Sheet): Sheet | void; /** * Returns an array with the sheets in the workbook. */ sheets(): Sheet[]; /** * Re-renders all data in the Spreadsheet. */ refresh(): void; } export { SpreadsheetOptions } export declare interface SpreadsheetProps { /** * Sets additional classes to the Spreadsheet. * * @example * ```jsx * * ``` */ className?: string; /** * Represents the default props of the Spreadsheet. * * @example * ```jsx * * ``` */ defaultProps?: SpreadsheetOptions; /** * A Boolean value which indicates if the toolbar will be displayed. It also allows customizing the tabs' content. * * @default true * @example * ```jsx * * * ``` */ toolbar?: boolean | SpreadsheetTab[]; /** * Specifies the styles that will be applied to the wrapping element. * * @example * ```jsx * * ``` */ style?: React.CSSProperties; /** * Triggered when the Spreadsheet selection is changed. * * @example * ```jsx * console.log(event.range)} /> * ``` */ onSelect?: (event: SpreadsheetSelectEvent) => void; /** * Triggered when a value in the Spreadsheet has been changed. * * @example * ```jsx * console.log(event.range)} /> * ``` */ onChange?: (event: SpreadsheetChangeEvent) => void; /** * Triggered when the range format is changed from the UI. * * @example * ```jsx * console.log(event.range)} /> * ``` */ onChangeFormat?: (event: SpreadsheetChangeEvent) => void; /** * Fired when the user clicks the Open toolbar button. * * @example * ```jsx * console.log(event.file)} /> * ``` */ onExcelImport?: (event: SpreadsheetExcelImportEvent) => void; /** * Fires when the user clicks the Export to Excel toolbar button. * * @example * ```jsx * console.log(event.workbook)} /> * ``` */ onExcelExport?: (event: SpreadsheetExcelExportEvent) => void; } /** * Represents the `SpreadsheetSelectEvent` object. */ export declare interface SpreadsheetSelectEvent extends SpreadsheetEvent { /** * The Range that is selected. */ range: Range_2; } /** * Represents the Spreadsheet tab configuration object. */ export declare interface SpreadsheetTab { /** * The text of the tab. */ text?: string; /** * The localization key of the tab's text. */ textKey?: string; /** * Indicates if the tab to be selected initially. */ selected?: boolean; /** * The toolbar configuration in the tab content. */ tools: (React.ComponentType | React.ComponentType[])[]; } /** * The base props interface of the Spreadsheet tool component. */ export declare interface SpreadsheetToolProps { /** * The `React.RefObject` object of the SpreadsheetWidget, holding the core functionality of the Spreadsheet. */ spreadsheetRef: React_2.RefObject; } export { SpreadsheetWidget } declare interface TableToolProps extends SpreadsheetToolProps { /** * @hidden */ value: SelectedHeaders; } /** * The TextColor tool component. */ export declare const TextColor: React.FunctionComponent; /** * The props of the TextColor tool component. */ export declare interface TextColorProps extends ColorToolProps { } /** * The TextWrap tool component. */ export declare const TextWrap: React_2.FunctionComponent; /** * The props of the TextWrap tool component. */ export declare interface TextWrapProps extends SpreadsheetToolProps { /** * The selected state of the tool. */ value?: boolean; } /** * @hidden */ export declare const toolsValueMap: any; /** * The Underline tool component. */ export declare const Underline: React.FunctionComponent; /** * The props of the Underline tool component. */ export declare interface UnderlineProps extends PropertyChangeToolProps { } /** * The Undo tool component. */ export declare const Undo: React.FunctionComponent; /** * The props of the Undo tool component. */ export declare interface UndoProps extends SpreadsheetToolProps { } export { UnionRef } export { unpackDate } export { unpackTime } export { View } export { Workbook } export { }