Importing Excel Data + Binding to Database

4 posts, 0 answers
  1. Tristan
    Tristan avatar
    4 posts
    Member since:
    Jul 2017

    Posted 04 Dec 2017 Link to this post

    I'm working a project which will allow users to update several database tables with an Excel file. Using the Kendo Spreadsheet widget, I can import the file's information into the Kendo Spreadsheet widget, or I can create one with information bound to the tables I want to update and export that data, but I've yet to find a solution that will accomplish both.

    Ideally, I'd like the user to be able to export a .xlsx file from the bound tables, edit that file to create new entries, and them import it back into the widget to view and save to the database. This would allow existing controllers to be utilized and provide a smooth one stop interface for the user.

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    647 posts

    Posted 06 Dec 2017 Link to this post

    Hi Tristan,

    I am afraid, that the required scenario would not be supported by the Spreadsheet widget. As far as I can understand, you initially load data in a Spreadsheet Sheet from a database using Kendo DataSource. Then you export that data to an xlsx file and edit that file in Excel. At the moment, when the file is imported back in the Spreadsheet, the DataSource configuration will be overridden by the data coming directly from the xlsx file. Therefore, the DataSource will no longer be available for sending and saving data back on the server.

    What I could suggest you in this case would be to send the Spreadsheet data back to the server as shown on our Server import/export demo. Then you could parse that data to a Telerik.Web.Workbook, read its contents and save it back manually in the database.

    Regards,
    Veselin Tsvetanov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Tristan
    Tristan avatar
    4 posts
    Member since:
    Jul 2017

    Posted 07 Dec 2017 in reply to Veselin Tsvetanov Link to this post

    That's more or less the workaround I've been pursuing. Are there any examples you can suggest that show that aspect of the Telerik.Web.Workbook in action?

    Also, is there any chance to see something like this scenario supported in a future release? I've found several instances of others attempting similar actions.
  4. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    647 posts

    Posted 11 Dec 2017 Link to this post

    Hello Tristan,

    Attached you will find a simple MVC project implementing the discussed scenario.

    Concerning the possibility to offer the simultaneous support of DataSource and xlsx loading in the Spreadsheet, such feature is currently not planned for implementation. What I could suggest you is to log your idea on our Feedback portal. Based on the support it receives from the community, we will decide on whether to proceed with its implementation or not.

    Regards,
    Veselin Tsvetanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 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