CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Excel Export from Report or Grid

Print topic Send  topic

Author Message

Posts: 191
Posted: 05/24/2013, 4:39 PM

This is for the InMotion Framework.

This uses an open source dll for creating spreadsheets ( 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.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).

View profile  Send private message

Posts: 151
Posted: 06/08/2013, 1:11 PM

Has anyone done this with PHP?
View profile  Send private message

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.



CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message

Posts: 640
Posted: 12/02/2013, 3:25 AM

Central Coast, NSW, Australia.

View profile  Send private message

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.
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Web Database

Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.