|
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
|
|
|
December 17th, 2004, 04:04 PM
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
December 17th, 2004, 04:09 PM
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
<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
|
December 17th, 2004, 04:11 PM
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
January 13th, 2005, 04:42 PM
|
Registered User
|
|
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Jorge,
I had the same problem. A HTML graph can't export to Excel.
Did you find a solution?
Thanks,
Jim
|
January 13th, 2005, 06:20 PM
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
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
|
January 15th, 2005, 05:30 PM
|
Registered User
|
|
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
January 16th, 2005, 08:17 PM
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
I believe Excell need to be installed on the web server just like it is on your local machine.
Wind is your friend
Matt
|
January 21st, 2005, 07:33 PM
|
Registered User
|
|
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
February 10th, 2005, 01:54 PM
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry for the late reply (been away). Will review above - of note we were considering posibily writting an applet
Jorge
|
|
|