Hi, first you can research this article:
9 Solutions to Export Data to Excel for ASP.NET[
^].
and then you may begin to write part of code by yourself. Finally, free to be here with any question. Kindly Remind; If you just wait for the code given below, that will not be helpful to you in the long run.
Best Regards