Get json data from Excel import fromFile

4 posts, 0 answers
  1. Doug
    Doug avatar
    10 posts
    Member since:
    Mar 2014

    Posted 20 Jun 2017 Link to this post

    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?
  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1201 posts

    Posted 22 Jun 2017 Link to this post

    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.
  3. Doug
    Doug avatar
    10 posts
    Member since:
    Mar 2014

    Posted 26 Jun 2017 in reply to Veselin Tsvetanov Link to this post

    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.

  4. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1201 posts

    Posted 28 Jun 2017 Link to this post

    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.
Back to Top