#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    1
    Rep Power
    0

    Export data form asp.net controls to Excel on button click


    Hi All,

    I am fairly new to programming but I am really enjoying all the cool things that can be done via coding.

    Currently, I have situation where I have built an asp.net application with a sql server database. The records can be added, retrieved, updated and deleted.

    However, on the edit page of each record, I would like a button which would export the all the data for that record into an excel file.

    I just need some help and guidance on how to achieve this - I have always wanted to learn this Hopefully I will.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    1
    Rep Power
    0
    Originally Posted by singh8642
    Hi All,

    I am fairly new to programming but I am really enjoying all the cool things that can be done via coding.

    Currently, I have situation where I have built an asp.net application with a sql server database. The records can be added, retrieved, updated and deleted.

    However, on the edit page of each record, I would like a button which would export the all the data for that record into an excel file.

    I just need some help and guidance on how to achieve this - I have always wanted to learn this Hopefully I will.
    Hello,
    The easiest way to export data to Excel is to create a HTML table and save it like .xls file. Another way is to use the free library OpenXML.
    You can also use 3rd party libraries to export data to Excel. For example you may want to look at the Elerium Excel .NET component, but it is not free.

IMN logo majestic logo threadwatch logo seochat tools logo