This looks exactly like what I'm after - but I'm a .NET/VWDE newbie and don't know where to start to implement it on my website.
I have a number of Pages with GridViews on them and would like to add an [Export to Excel] button above each one. I'd be very grateful for the steps I need to go through to do so with your code - safely assuming
that I don't have a cooking clue where to start. Here's how far I've got within VWD Express:
Add a Webform page to the site, specifying Visual C# as the Language to use.
Paste Ryan's Code between the
<script
runat="server">
and </script> at the top of the page - above the <head> tags.
Switch to Design View.
Add the Gridview to the page.
Add a Button above the Gridview.
Change the Button Text to "Export to Excel".
Double-click on the button in Design View.
Type ExportHelper
.ExportToExcelWord(I don't know what these parameters are or how to format them) between the braces.
I hope that you - or some other competent person - can help me implement this properly, by either telling me how to complete the parameters (Gridview name, HTML, ?? I suppose)
correctly, or correcting the above.
Thanks very much, Ryan.
Regards
Gary
Gary Bartlett
gb at prodsol dot co dot nz
+64 9 473-9530
+64 21 776-390
http://www.prodsol.co.nz - Dramatic improvement through pattern-level intervention
GaryBartlett
Member
580 Points
116 Posts
Re: How To: Make "Export to Excel" always open excel in a separate Window
Feb 15, 2006 11:29 PM|LINK
Hi Ryan,
This looks exactly like what I'm after - but I'm a .NET/VWDE newbie and don't know where to start to implement it on my website.
I have a number of Pages with GridViews on them and would like to add an [Export to Excel] button above each one. I'd be very grateful for the steps I need to go through to do so with your code - safely assuming that I don't have a cooking clue where to start. Here's how far I've got within VWD Express:
Type ExportHelper
.ExportToExcelWord(I don't know what these parameters are or how to format them) between the braces.I hope that you - or some other competent person - can help me implement this properly, by either telling me how to complete the parameters (Gridview name, HTML, ?? I suppose) correctly, or correcting the above.
Thanks very much, Ryan.
Regards
Gary
gb at prodsol dot co dot nz
+64 9 473-9530
+64 21 776-390
http://www.prodsol.co.nz - Dramatic improvement through pattern-level intervention