This is a migrated thread and some comments may be shown as answers.

Get json data from Excel import fromFile

3 Answers 699 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 20 Jun 2017, 02:50 PM
I would like to hook into the process that gets data from the excel import and process the json before it gets posted to the spreadsheet.  Is this possible?

3 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 22 Jun 2017, 08:33 AM
Hi Doug,

I am afraid, that the Kendo Spreadsheet would not allow you to retrieve the Workbook data as a JSON in the process of importing an .xlsx file to the widget. What I would suggest you instead, is to review the following implementation, which shows how to retrieve the data from an .xlsx file as JSON using other libraries.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Doug
Top achievements
Rank 1
answered on 26 Jun 2017, 04:54 PM

Thanks @Veselin for your response.  I think that will work.   Although I'm having trouble getting the spreadsheet to load fromJSON, after it has been bound to a datasource.  Here is an example.  It is simply the datasource binding demo + one line to load fromJSON after the databinding.  You'll see that "Some Value" does not appear on the spreadsheet.

0
Veselin Tsvetanov
Telerik team
answered on 28 Jun 2017, 11:22 AM
Hello Doug,

Here you will find a modified version of the sample sent. You will notice, that after the initial load, it properly populates the Spreadsheet from the JavaScript object using fromJSON() method. Keep in mind, that after altering the Spreadsheet contents to the JSON data, the DataSource will no longer be available in the Spreadsheet.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Spreadsheet
Asked by
Doug
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Doug
Top achievements
Rank 1
Share this question
or