serialize()
Description
Serializes the spreadsheet data into a JSON object
Usage
serialize(): object;
Returns
The method returns a serialized JSON object
The serialized data is an object with the following attributes:
formats- an array of objects with number formatsstyles- an object with the applied CSS classessheets- an array of sheet objects. Each object contains the following attributes:name- the sheet namedata- an array of data objectsrows- an array of height objectscols- an array of width objects
Example
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);
const data = spreadsheet.serialize();
Related article: Data loading and export