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

8 posts, 0 answers
  1. Ravi
    Ravi avatar
    104 posts
    Member since:
    Oct 2012

    Posted 25 Apr 2011 Link to this post

    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
  2. Ravi
    Ravi avatar
    104 posts
    Member since:
    Oct 2012

    Posted 26 Apr 2011 Link to this post

    early response is appreciated.

    Thanks
  3. DevCraft banner
  4. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 26 Apr 2011 Link to this post

    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
  5. Ravi
    Ravi avatar
    104 posts
    Member since:
    Oct 2012

    Posted 26 Apr 2011 Link to this post

    If could please suggest how to read its content in Silverlight 4 that will be a great help.

    Thanks
  6. Ravi
    Ravi avatar
    104 posts
    Member since:
    Oct 2012

    Posted 28 Apr 2011 Link to this post

    I am waiting for you response.

    Please do update me as soon as possible.

    Thanks
  7. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 28 Apr 2011 Link to this post

    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
  8. Shiva
    Shiva avatar
    61 posts
    Member since:
    Oct 2010

    Posted 23 Dec 2011 Link to this post

    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
  9. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 28 Dec 2011 Link to this post

    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 >>

Back to Top
DevCraft banner