Search code examples
asp.netvisual-studiogridviewexport-to-excel

add extra content into exported excel sheet in asp.net


I am exporting the selected items in gridview to excel. Now the exported excel should contain something like "Excel downloaded on: TODAY_DATE" (where TODAY_DATE is today's date in mm/dd/yyyy format).

My Question: How can i append the text (as mentioned above) in the exported excel?

Thanks!


Solution

  • The same can be done through html.writer("Content Comes here!").

    The above solution is valid only if an excel sheet is generated from HTML.