Migration to newer versions
4.1 -> 4.2
In v4.2, the Align block of the Spreadsheet toolbar is divided into two sub-blocks: Horizontal align and Vertical align. Thus, the list of ids of the default controls of the Align block is changed and extended:
Before v4.2
:
The Align block:
- the Align left button (id: "align-left")
- the Align center button (id: "align-center")
- the Align right button (id: "align-right")
From v4.2
:
The Horizontal align sub-block of the Align block:
- the Left button (id: "halign-left")
- the Center button (id: "halign-center")
- the Right button (id: "halign-right")
The Vertical align sub-block of the Align block:
- the Top button (id: "valign-top")
- the Center button (id: "valign-center")
- the Bottom button (id: "valign-bottom")
Localization
Note, that the locale options for the Align block have been also updated:
Before v4.2
:
const locale = {
align: "Align",
...
}
From v4.2
:
const locale = {
halign: "Horizontal align",
valign: "Vertical align",
...
}
2.1 -> 3.0
This list of changes will help you to migrate from the previous version 2.1 where DHTMLX Spreadsheet was PHP-based to the totally renewed version 3.0 in which the component is totally built on JavaScript. Check the list below to explore all the changes.
note
The API of version 2.1 is still available, but it is incompatible with the API of version 3.0.
Changed API
- getStyle -> spreadsheet.getStyle - returns styles applied to a cell(s)
- getValue -> spreadsheet.getValue - returns an object with the value(s) of a cell(s)
- setStyle -> spreadsheet.setStyle - sets style for a cell or a range of cells
- setValue -> spreadsheet.setValue - sets value for a cell or a range of cells
- lock -> spreadsheet.lock - locks a cell or a range of cells
- unlock -> spreadsheet.unlock - unlocks a locked cell or a range of cells
Removed API
Spreadsheet class
- getCell
- getCells
- isCell
- setSheetId
SpreadsheetCell
calculate | getCoords | setBgColor |
exists | getValidator | setBold |
getAlign | isBold | setColor |
getBgColor | isIncorrect | setItalic |
getCalculatedValue | isItalic | setLocked |
getColIndex | parseStyle | setValidator |
getColName | serializeStyle | |
getColor | setAlign |