Hi Masroorul,
Is the SPGridview a custom list view or some custom control in SharePoint web part ?
If it is SharePoint OOB custom list, then I suggest you can create a new view with filter condition and then use Ribbon button "Export to Excel" to export the filtered items to excel.
If it is the custom control in web part, I would suggest you can also create a new list view and then bind the new view data to the SPGridView as datasource, then use C# code to loop the item collection to export to excel.
Here are some code demos for your reference:
SPGridView bind with list view
Export SPGridView to Excel spreadsheet
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
tnmff@microsoft.com.
