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

How to upload an excel file and how to read its content row by row.

7 Answers 631 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 25 Apr 2011, 12:25 PM
Hi,

It would be great if you could share your thoughts on how to upload an excel (xls) file and read its content.

I will have four columns as follows
Country (text column)
State, (text column)
Population (which can be zero or comma seperated number)
Average Income - (which can be zero or comma seperated number)

Thanks,
Shiras

7 Answers, 1 is accepted

Sort by
0
Ravi
Top achievements
Rank 1
answered on 26 Apr 2011, 10:20 AM
early response is appreciated.

Thanks
0
Alex Fidanov
Telerik team
answered on 26 Apr 2011, 01:51 PM
Hello David,

The RadUpload control is capable of uploading an excel file or any other type of file. However, to read its content you need an excel library that is capable of recognizing the excel file's content.

Regards,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ravi
Top achievements
Rank 1
answered on 26 Apr 2011, 02:39 PM
If could please suggest how to read its content in Silverlight 4 that will be a great help.

Thanks
0
Ravi
Top achievements
Rank 1
answered on 28 Apr 2011, 03:29 PM
I am waiting for you response.

Please do update me as soon as possible.

Thanks
0
Alex Fidanov
Telerik team
answered on 28 Apr 2011, 03:44 PM
Hi David,

You can use the FilesSelected event of the RadUpload and get the file stream of the file:

Stream stream = e.SelectedFiles[0].File.OpenRead();


Regards,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shiva
Top achievements
Rank 1
answered on 23 Dec 2011, 08:26 AM
Dear Alex,

This is an urgent request so please respond to it as soon as possible.

I have uploaded an excel file using RadUpload control and in its FileSelected event, I can get the stream of the file using e.SelectedFiles[0].File.Openread() as suggested by you in your comments.

I want to read the data of uploaded excel file from this stream. How do I do this??

Please share a code snippet with your comments so that i can get the proper understanding.

Thanks,
Shiva
0
Petar Mladenov
Telerik team
answered on 28 Dec 2011, 10:41 AM
Hello Shiva,

 You can check out this codeplex library. Please note that once the file is on the server, the rest of the work is out of the Silverlight control's scope.

Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Upload
Asked by
Ravi
Top achievements
Rank 1
Answers by
Ravi
Top achievements
Rank 1
Alex Fidanov
Telerik team
Shiva
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or