Saving table with changes in json format

Tags: #<Tag:0x00007f137e5af260>

Hi, I am using the demo “Saving changes using a callback”.

https://handsontable.com/docs/saving-data/#saving-changes-using-a-callback

Handsontable.dom.addEvent(save, 'click', () => {
  // save all cell's data
  ajax('save.json', 'GET', JSON.stringify({ data: hot.getData() }), res => {
    const response = JSON.parse(res.response);

    if (response.result === 'ok') {
      exampleConsole.innerText = 'Data saved';
    } else {
      exampleConsole.innerText = 'Save error';
    }
  });
});

In the page it is commented that the data is not saved, is there any demo where show the changes that must be made to save the changes on the server with the save button?

Following the documentation the other changes are very easy, but this for my part I can not implement it,

Thanks,

Hi @Pere

Unfortunately, we don’t have any examples showing server-side implementations. Generally we are frontend library and our users are doing custom backend implementations on their side as it varies depending on their needs.

In CSV or other format it would be easier to save the changes on the server, is there any example available?

Thanks,

We can only save to CSV as en export. It’s described here:

https://handsontable.com/docs/export-to-csv/#export-to-file