RadSpreadsheet access cell contents from code behind

0 Answers 100 Views
Spreadsheet
Roger
Top achievements
Rank 2
Iron
Iron
Iron
Roger asked on 05 Sep 2023, 04:38 PM

I love the RadSpreadsheet control.  It works great having the toolbar to open files, save files etc.

But I want to run some code on a button press on the page that does some specific validation, then 

taking each row and import into a database.

 

So I use this control to open xls files for user to view, make changes etc.

I then run some custom code that checks (Rows / Columns data) for custom rules

Then I want to take the end result and import that into a database.

 

Should I be using a Grid Control to do this as it seems impossible to get the worksheet from the RadSpreadSheet control when we use the open toolbar.

Attila Antal
Telerik team
commented on 07 Sep 2023, 08:44 AM

Hi Roger,

I already answered your Support ticket, but I will share my answer here as well.

The Telerik Spreadsheet is a UI component that allows you to load Excel documents, make changes to those, and then export the changes back to the Excel document.

If you want to run validations on the data, you will need to export the contents to a Workbook object or DataTable and run your business logic on those.

Here are some articles that will help:

If this approach is not convenient, you might as well try the Grid to see if that works better for your case.

Please give my suggestions a try and if you have any questions, let me know.

No answers yet. Maybe you can help?

Tags
Spreadsheet
Asked by
Roger
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or