Posted on: 9/10/2012 8:22:31 AM | Views : 260

Hi,
I have exported values from datatable to excel using list.. I have inserted values to the list and passed that in a grid and using ExporttoExcel() i have exported it to excel..
here is the code for list...
 
protected void Page_Load(object sender, EventArgs e)
{
List Students = new List(){
new Student() { Name = "Jack", Age = 15, StudentId = 100 },
new Student() { Name = "Smith", Age = 15, StudentId =101 },
new Student() { Name = "Smit", Age = 15, StudentId = 102 },
new Student() { Name = "Anusha", Age = 23, StudentId = 104 }
};
ListtoDataTableConverter converter = new ListtoDataTableConverter();
dt = converter.ToDataTable(Students);
GridView_Result.DataSource = Students;
GridView_Result.DataBind();
}
 
now, i want to insert values from front end and i want that to be saved in excel.. instead of using grid, i will use a text field and after entering value and ...

Go to the complete details ...