Reputation: 65
I want to be able to export the results of a query into excel by someone pressing a button that says export to excel. The following picture shows an example:
I have looked at this WEBSITE which does what I would like to have on my website. The problem is that I have only worked in .cshtml pages and I am really unfamiliar with the process of where to put the codes on that website or what page extensions they should be. Can someone please guide me?
Upvotes: 0
Views: 1125
Reputation: 30110
I've written some articles about doing this within the Web Pages framework:
http://www.mikesdotnetting.com/Article/207/Exporting-The-Razor-WebGrid-To-Excel-Using-OleDb http://www.mikesdotnetting.com/Article/204/Exporting-The-Razor-WebGrid-To-Excel
Upvotes: 2