cvboucher
Posts: 191
|
Posted: 05/24/2013, 4:39 PM |
|
This is for the InMotion Framework.
This uses an open source dll for creating spreadsheets (http://npoi.codeplex.com/) and a helper dll that I created. Send me a private message and I'll send you a .zip file of the Visual Studio 2008 solution for the helper which includes the .dll.
1. Add NPOI.dll and NPOIHelper.dll to the bin folder of the website.
2. In the After Execute Select event of the report or grid add the following code (change DownloadFilename to the filename you want to use for the download):
If Request.QueryString("Export") = "Excel" Then
Dim SS As New NPOIHelper.Spreadsheet()
SS.AddSheet(DirectCast(e.OperationResult,System.Data.DataView))
SS.WebDownload(Response, "DownloadFilename")
End If
3. Add an "Export to Excel" link to the page with a Link Parameter (Type=Expression, Source="Excel", Name=Export).
HTH,
Craig
|
|
|
laneoc
Posts: 154
|
Posted: 06/08/2013, 1:11 PM |
|
Has anyone done this with PHP?
_________________
Lane |
|
|
eratech
Posts: 513
|
Posted: 11/07/2013, 10:39 PM |
|
I've done CSV export on PHP, but it's basically a Grid, with all the HTML removed and put the quotes and commas between fields. I did it as a service just so it was easier to keep out of the rest of the site.
In the Page 'On Initialize View' add Custom code like other PHP examples.
But remember that it doesn't guarantee that it will work properly in Excel, only that the default Excel handler will try to open it - I've had some problems with Apple Numbers spreadsheet opening files stright from download.
cheers
E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
MichaelMcDonald
Posts: 640
|
Posted: 12/02/2013, 3:25 AM |
|
PHP
http://forums.yessoftware.com/posts.php?post_id=109235
_________________
Central Coast, NSW, Australia.
|
|
|
Donna111
Posts: 5
|
Posted: 02/24/2014, 12:01 AM |
|
Hi there
Is it possible for me to export report to Excel using an Excel tool?
I have installed a fine tool before. http://www.rasteredge.com/how-to/csharp-imaging/excel-get-to-start/
|
|
|
|