Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 17th, 2004, 04:04 PM
Authorized User
 
Join Date: Feb 2004
Location: Montreal, QC, Canada.
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
Reply With Quote
  #2 (permalink)  
Old December 17th, 2004, 04:09 PM
Authorized User
 
Join Date: Feb 2004
Location: Montreal, QC, Canada.
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
Reply With Quote
  #3 (permalink)  
Old December 17th, 2004, 04:11 PM
Authorized User
 
Join Date: Feb 2004
Location: Montreal, QC, Canada.
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
Reply With Quote
  #4 (permalink)  
Old January 13th, 2005, 04:42 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
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
Reply With Quote
  #5 (permalink)  
Old January 13th, 2005, 06:20 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
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
Reply With Quote
  #6 (permalink)  
Old January 15th, 2005, 05:30 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
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

Reply With Quote
  #7 (permalink)  
Old January 16th, 2005, 08:17 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
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
Reply With Quote
  #8 (permalink)  
Old January 21st, 2005, 07:33 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
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
Reply With Quote
  #9 (permalink)  
Old February 10th, 2005, 01:54 PM
Authorized User
 
Join Date: Feb 2004
Location: Montreal, QC, Canada.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.