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

Importing Excel Data + Binding to Database

3 Answers 1214 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Tristan
Top achievements
Rank 1
Tristan asked on 04 Dec 2017, 09:44 PM

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.

3 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 06 Dec 2017, 09:26 AM
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.
0
Tristan
Top achievements
Rank 1
answered on 07 Dec 2017, 02:41 PM
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.
0
Veselin Tsvetanov
Telerik team
answered on 11 Dec 2017, 12:16 PM
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.
Tags
Spreadsheet
Asked by
Tristan
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Tristan
Top achievements
Rank 1
Share this question
or