Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Exporting reports to Excel
Thu, Apr 14 2016 3:22 AMPermanent Link

Godfrey

Ultimatesoft

Hi

Can someone suggest a way for the user to be able to export a report to Excel.  I am currently displaying the report
in a TPlugin (as a PDF), which works fine, but I want the user to be able to export the report.  Should I can create the Excel export on the server side and send file to client?  If so how do I send the file to the client?

Thanks
Thu, Apr 14 2016 7:57 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Godfrey,

<< Can someone suggest a way for the user to be able to export a report to Excel.  I am currently displaying the report in a TPlugin (as a PDF), which works fine, but I want the user to be able to export the report.  Should I can create the Excel export on the server side and send file to client?  If so how do I send the file to the client? >>

It's exactly the same as the PDF, but instead of a content-disposition of "inline;filename=xxxx" for the responses, you'll use "attachment;filename=xxxx".  The "attachment" part is what tells the browser that it should prompt the user to download the file (specified in the filename portion).

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Apr 14 2016 9:12 AMPermanent Link

Godfrey

Ultimatesoft

<<it's exactly the same as the PDF, but instead of a content-disposition of "inline;filename=xxxx" for the responses, you'll use "attachment;filename=xxxx".  The "attachment" part is what tells the browser that it should prompt the user to download the file (specified in the filename portion).>>

What should the "ContentType" be?  It is currently 'application/pdf' for PDF files?

Thanks
Godfrey
Fri, Apr 15 2016 8:01 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Godfrey,

<< What should the "ContentType" be?  It is currently 'application/pdf' for PDF files? >>

You can find all of the valid MIME types here:

http://www.sitepoint.com/web-foundations/mime-types-complete-list/

Tim Young
Elevate Software
www.elevatesoft.com
Image