473,804 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Method to Create Excel Charts in ASP

3 New Member
Hi, I am facing problem in ASP application where I am getting error message
"Server object, ASP 0178 (0x80070005)
The call to Server.CreateOb ject failed while checking permissions. Access is denied to this object." on
Set MyExcelApp = Server.CreateOb ject("Excel.App lication")
i have learnt that calling Excel.Applicati on on web server is not a good practice so
I am using the following method
Response.Conten tType = "applicatio n/vnd.ms-excel"
'Response.AddHe ader "Content-Disposition","a ttachment;filen ame=Tool_Report (Date).xls"

i am able to generate and download Excel Sheet from the above method but my problem is how can I dynamically create Excel Charts with the Sheet that i have generated. I urgently need the solution please guide me

Here is the Code that i have written,

session.lcid=20 57
dim Cn,Rs,strFromDa te,strToDate,st rQuery
strFromDate = Cstr ( FormatDateTime( cDate(Request.F orm("txtStartDa te")),2) )
strToDate = Cstr ( FormatDateTime( cDate(Request.F orm("txtEndDate ")),2) )
strQuery= ""
strQuery = "select * from tool_candidate, tool_master where tool_master.too l_id=tool_candi date.tool_id and tool_master.too l_Date >='" & strFromDate & "' and tool_Date<='" & strToDate & "'"
set Cn=server.creat eobject("ADODB. connection")
set Rs=server.creat eobject("ADODB. recordset")
Cn.open "provider=micro soft.jet.oledb. 4.0;data source=" & server.mappath( "tool.mdb")
Rs.open strQuery,Cn,1,3
Response.Conten tType = "applicatio n/vnd.ms-excel"
Response.AddHea der "Content-Disposition", "attachment ; filename=Tool_R eport(Date).xls "
if Rs.eof <> true then
Response.Write( "<Table Border='1'>")
while not Rs.eof
'response.write "<tr><td>" & Rs.fields(0) & "</td><td>" & Rs.fields(1) & "</td><td>" & Rs.fields(2) & "</td><td>" &Rs.fields(3 ) & "</td><td>" & Rs.fields(4) & "</td><td>" & Rs.fields(5) & "</td></tr>"
Rs.movenext
i = i + 1
wend
response.write "</table>"
end if
set rs=nothing
Cn.close

Thanks & Regards
Rohit
Dec 12 '07 #1
2 3256
liqdok
3 New Member
maybe you need to use some third party excel spreadsheet components.
http://www.smartxls.com
Dec 13 '07 #2
aashishn86
52 New Member
hi rohit..
did you find a solution to your problem...
i am lookin for something similar..
Mar 23 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2305
by: mscir | last post by:
Date: Thu, 08 Jul 2004 17:02:27 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10ero4l3kp2qa65@corp.supernews.com> Reply-To: mscir@usa.com User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@supernews.com
10
5603
by: Mark Day | last post by:
Hi All, I am using Access 2000 to generate over 40 Excel charts and pivot tables using early binding to the Excel 9.0 object library. I am finding that if I show the Excel object while processing the charts, the whole process completes in around 2 minutes. However if I hide the Excel object the same process takes around 27 minutes to complete. I have played around with screen updating and this makes no real difference to the time. Does...
2
3748
by: twins | last post by:
Hi, I have an excel template with values & charts. Please let me know how I can edit the xls file and change certain values so that the chart changes for each user I send the excel (xls) file. Thanks
5
2379
by: Takeadoe | last post by:
I'm doubtful that the group is unbiased, but I will ask anyhow :o). If one intends to plot lots of data, primarily XY line and scatter plots, and mass produce them (in many cases I will be doing 88 graphs at a time - 1 for each of 88 counties), will Exel be the best bet, or is Access equally capable? I might mention that in time, I will be moving all of my data into Access databases. I'm slowing learning charting and automation in...
3
13608
by: implicate_order | last post by:
Greetings, I'm new to python and am in the process of writing a script to parse some CSV data, spread it across multiple Excel worksheets and then generate charts. I searched the internet to find some place where I could look up a HOWTO doc/recipe to do that using either pyExcelerator or win32com.client. Could someone point me in the right direction? I'm at the stage where the spreadsheet and associated data worksheets
0
1321
by: Ankush Shankar | last post by:
Hi, Can somebody help me out in automating the following? - I have been dealing with mailing list in which I receive 1000s of emails as an inquiries. I reply those emails on daily basis., - I need to create statistics on users, response time, validity of the inquiries etc. - I want to create excel sheet containing colums of "From", "Date", "Time", "Subject", "Flag type" etc - Based on the data, I like to create Bar charts, Pie charts...
3
3253
by: saragoesnuts | last post by:
I have a program that automates to Excel with information in tables. I want to add charts to the excel file (pie charts, bar charts, etc). Is this possible?
0
2179
by: eolmos | last post by:
Hello everyone, I am currently working on a project that requires a webform in asp.net using C# as the code behind. The page must allow the user to create a report in excel. This report must also generate a chart based on the input dataset. (By the way, the component must be free) So far, I have tried a lot of components which are really good but they do not provide all the required functionality altogether and some of them have trade offs when...
9
3267
by: AGP | last post by:
I have a VB6 application that has an OLE container with an embedded Excel chart. Our office updated to Excel 2007 and now although the app works the charts looks like crap. Since the app is fairly large my goal is to keep the devlopement in VB6 but am open to any ideas or suggestions. What i want to do is: 1. Keep my app in VB6 and find a workaround for the crappy looking charts. the charts now look very blocky and the grid lines and...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10571
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10317
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.