How to Export DataGrid to Excel using C#
Hello, I would like to export my DataGrid to Excel with the filename typed into a textbox, but I have no idea how to do it. Everything I found on the internet was with DataGridViews. But they don't work for me. Can someone give me a code example which I can integrate into my program?

Laxmidhar SahooRank #383 · 6.6K reputationPosted May 10, 2019, 8:32 PM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted May 10, 2019, 9:54 PM EDT
Manoj BhoirRank #599 · 4K reputationPosted May 10, 2019, 10:08 PM EDT
Leon DRank #851 · 2.6K reputationPosted May 12, 2019, 4:49 PM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted May 12, 2019, 6:14 PM EDT