- Home
- Forum
- JavaScript - EJ 2
- How does it works the new function saveASJson
How does it works the new function saveASJson
I want to save my data in a mysql DB with php (laravel). I do not want to save the xlsx file, only some data received from cells, and some of their attributes.
So I think that the saveAsJson function, can be what i need
Can you explain me if I am right?
I need to do something like this, saving the data, not the file:
https://youtu.be/QxQjp9jgh1M
I really appreciate your help
We have reviewed your query about saving the Spreadsheet as JSON data without saving it as an Excel file. To achieve this, you can use our `saveAsJson` method to save the entire Spreadsheet as JSON data. Additionally, you can selectively ignore certain features while saving the Spreadsheet as a JSON object by configuring serialization options and passing them as arguments to the saveAsJson method.
For your convenience, we have prepared a sample. In this sample, we have two buttons: one button saves the entire Spreadsheet and logs the JSON data to the console, and the other button saves the Spreadsheet as JSON with only values by setting `onlyValues` to true in the `saveAsJson` method. Below attached the prepared sample along with the video demonstration for your reference,
Sample link: https://stackblitz.com/edit/ewmybo-i3ldlh?file=index.js
Video link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SaveAsJson_in_Spreadsheet-1504146328
Kindly, check the above details. If we misunderstood your requirement, please share the below details,
Share the details of how you are loading the data to Spreadsheet. Please share those details along with the code snippet.
Please confirm whether you want the data as the JSON object as we are getting in the saveAsJson method or whether you want the dataSource alone.
If possible, please share the detailed description of your requirement which will be more helpful for us to validate.
Please share the above requested details from your end. Based on that, we will check and provide you the better solution quickly.
Thanks so much, that's what I need. I appreciate your help.
We are happy to hear that your problem has been resolved. Kindly get back to us if you need any further assistance.
- 3 Replies
- 2 Participants
- Marked answer
-
TD Tomas De arco
- Jun 12, 2024 10:04 PM UTC
- Jun 14, 2024 06:56 AM UTC