dhtmlxSpreadSheet API

Constructor

var spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {
    rowsCount:20,
    colsCount:20
});

Parameters:

  • an HTML container (or the ID of an HTML container)
  • a hash of config options (check below)
Objects
Methods
addColumn adds a new column into the spreadsheet
addRow adds a new row into the spreadsheet
addSheet adds a new sheet into the spreadsheet
deleteColumn removes a column from the spreadsheet
deleteRow removes a row from the spreadsheet
eachCell iterates over cells in the spreadsheet
endEdit finishes editing in a cell
getActiveSheet returns the sheet that is currently active
getFormat gets the number format applied to the value of a cell
getFormula returns the formula of a cell
getSheets gets all sheets of the spreadsheet
getStyle returns styles applied to the spreadsheet cells
getValue returns the value(s) of a cell(s)
isLocked checks whether a cell is locked
load loads data from an external file
lock locks the specified cell
parse loads data into spreadsheet from a local data source
redo applies the reverted action once again
removeSheet removes a sheet from the spreadsheet by its id
serialize serializes data of spreadsheet into an array of JSON objects
setFormat sets a specified format to the value of a cell
setStyle applies styling to spreadsheet cells
setValue sets a value for a cell(s)
startEdit starts editing in a cell
undo reverts the latest action
unlock unlocks a locked cell

Selection

getFocusedCell returns the id of a focused cell
getSelectedCell returns the id(s) of selected cells
setFocusedCell sets focus on the specified cell
setSelectedCell selects the specified cell(s)

Events Bus

detach detaches a handler from an event (which was attached before by the on() method)
fire triggers an inner event
on attaches a handler to an inner event of SpreadSheet

Export

Events
AfterEditEnd fires after editing of a cell is finished
AfterEditStart fires after editing of a cell has started
AfterFocusSet fires after focus is set on a cell
AfterFormatChange fires after the format of a cell is changed
AfterSelectionSet fires after cells are selected
AfterSheetAdd fires after a new sheet is added
AfterSheetChange fires after the currently active sheet is changed
AfterSheetRemove fires after a sheet is removed
AfterSheetRename fires after a sheet is renamed
AfterStyleChange fires after the style of a cell is changed
AfterValueChange fires after the value of a cell is changed
BeforeEditEnd fires before editing of a cell is finished
BeforeEditStart fires before editing of a cell has started
BeforeFocusSet fires before focus is set on a cell
BeforeFormatChange fires before the format of a cell is changed
BeforeSelectionSet fires before cells are selected
BeforeSheetAdd fires before a new sheet is added
BeforeSheetChange fires before changing the currently active sheet
BeforeSheetRemove fires before a sheet is removed
BeforeSheetRename fires before a sheet is renamed
BeforeStyleChange fires before the style of a cell is changed
BeforeValueChange fires before the value of a cell is changed
Properties
colsCount sets the number of columns a spreadsheet will have on initialization
editLine shows/hides the editing bar
exportModulePath sets the path to the export module
formats defines the list of number formats
importModulePath sets the path to the import module
leftSplit sets the number of columns fixed to the left side of the spreadsheet
menu shows/hides the menu
multiSheets enables/disables the ability to work with multiple sheets in the spreadsheet
readonly enables/disables the readonly mode
rowsCount sets the number of rows a spreadsheet will have on initialization
toolbarBlocks specifies blocks that will be shown in the toolbar of spreadsheet
Back to top