serialize()
Description
Serializes data of spreadsheet into a JSON object
Usage
serialize(): object;
Returns
The method returns a serialized JSON object
Serialized data presents an object with the following attributes:
- formats - an array of objects with number formats
- styles - an object with the applied CSS classes
- sheets - an array of sheet objects. Each object contains the following attributes:
- name - the sheet name
- data - an array of data objects
- rows - an array of height objects
- cols - an array of width objects
Example
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);
const data = spreadsheet.serialize();
Related articles: Data loading and export