In C#.net, GridView is use to display tabular data. With GridView it is not mandatory to specify column mappings. If not specified it automatically reads the column name from the data-table to which it is bound. However we must ensure that we specify a DataSource which is supports by the GridView.
To Export GridView to excel
We add button in .aspx page which contains the GridView for displaying data.By clicking this button user can export the GridView data to excel.