Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 17th, 2004, 04:04 PM
Authorized User
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Export HTML graph to Excel

Am trying to export an ASP script generated report, which includes a HTML graph (actually a series of HTML generated images), to Excel. I can export the report fine, but can not export the graph.
---------

Response.Buffer = true
Response.ContentType = "application/msexcel"
Response.AddHeader "content-disposition", "attachment; filename=report3.xls"
---------
Any suggestion?
thx alot

Jorge
__________________
Jorge
 
Old December 17th, 2004, 04:09 PM
Authorized User
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<img src="blank.gif" style="background-color:#ff0000;" width="15" height="<%=h1%>" border="1"> This generate one bar (in red) of a particular graph.

Jorge
 
Old December 17th, 2004, 04:11 PM
Authorized User
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Alternatively, <table> tag can be used: <table bgcolor="#ff0000" width="15" height="<%=h1%>" border=0 cellpadding=0 cellspacing=0><tr><td></td></tr></table>

Jorge
 
Old January 13th, 2005, 04:42 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Jorge,

I had the same problem. A HTML graph can't export to Excel.
Did you find a solution?

Thanks,
Jim
 
Old January 13th, 2005, 06:20 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Have you thought of rendering the graph as an image then exporting the image, this is how I have done it. We have built a library file that does this; I believe there are other ones out there.

Basically the procedure we use is to pass variables inside the image tag calling the page that initiates the object:

<IMG SRC="barIncidentOrGraph2.asp?width=700&height=410& startItem=<%= getInfoArray(0,topElement) %>&startDate=<%= start %>&finishDate=<%= finish %> " width="700" height="410">

Then on barIncidentOrGraph2.asp we initiate the object, query the dataStore based on the values being passed in the image tag and then pass a two dimensional array into it. Using:

response.Binarywrite(chartObj.GetImage)

To build the graph it’s self.


Wind is your friend
Matt
 
Old January 15th, 2005, 05:30 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I did manage to export a graph to Excel working on my local machine that has a web server installed. However when I deployed to a testing web server, it was not working. I believed it was a configuration issue on the web server, but I don't what it was. Anybody has ideas?

Thanks,
Jim

 
Old January 16th, 2005, 08:17 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I believe Excell need to be installed on the web server just like it is on your local machine.

Wind is your friend
Matt
 
Old January 21st, 2005, 07:33 PM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I am in a similar situation. Except that I am using a jsp. Did rendering the different bar images in html and exporting them into excel work?

I will also look at the other suggestion of rendering a image and then trying that one out.

Thanks
 
Old February 10th, 2005, 01:54 PM
Authorized User
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry for the late reply (been away). Will review above - of note we were considering posibily writting an applet


Jorge





Similar Threads
Thread Thread Starter Forum Replies Last Post
Export HTML to Excel dbellavi C# 2005 3 December 19th, 2007 08:48 AM
Export Recordset as an HTML file EMB PHP How-To 0 August 16th, 2007 01:28 PM
Pdf to html conversion and export the checked para lohith ASP.NET 2.0 Professional 0 July 3rd, 2007 12:09 AM
excel graph to Powerpoint rekha_jsr Excel VBA 0 September 10th, 2005 12:57 AM
how can I export a report to HTML ? jewbask Classic ASP Basics 2 July 3rd, 2004 06:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.