473,698 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.Net (in ASP.Net) won't create instance of Excel

I was able to get procedure to work in a VB.Net Windows application, and want
to get it to work within a ASP.Net page. It won't create the instance of
Excel. It blows up on the CreateObject class.

What am I missing?

Code, Error and Stack info are as follows:

Code:
Dim xlApp As Microsoft.Offic e.Interop.Excel .Application
xlApp = CreateObject("E xcel.Applicatio n") '**** Blows-up here *****

Error Exception Details:
System.Exceptio n: Cannot create ActiveX component.

Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.Visua lBasic.Interact ion.CreateObjec t(String ProgId, String
ServerName)
ReserveDB.WebFo rm1.btCreateDB_ Click(Object sender, EventArgs e) in
c:\inetpub\wwwr oot\ReserveDB\W ebForm1.aspx.vb :40
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()
Thanks, Mark
Aug 10 '05 #1
1 1209
See reply in the other group you posted. Do not multi-post, cross-post
instead, if needed.

"Mark" <Ma**@discussio ns.microsoft.co m> wrote in message
news:37******** *************** ***********@mic rosoft.com...
I was able to get procedure to work in a VB.Net Windows application, and want to get it to work within a ASP.Net page. It won't create the instance of
Excel. It blows up on the CreateObject class.

What am I missing?

Code, Error and Stack info are as follows:

Code:
Dim xlApp As Microsoft.Offic e.Interop.Excel .Application
xlApp = CreateObject("E xcel.Applicatio n") '**** Blows-up here *****
Error Exception Details:
System.Exceptio n: Cannot create ActiveX component.

Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.Visua lBasic.Interact ion.CreateObjec t(String ProgId, String
ServerName)
ReserveDB.WebFo rm1.btCreateDB_ Click(Object sender, EventArgs e) in
c:\inetpub\wwwr oot\ReserveDB\W ebForm1.aspx.vb :40
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP o
stBackEvent(Str ing eventArgument) System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()
Thanks, Mark

Aug 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
18795
by: Martin | last post by:
I have a situation where I'm displaying some information in a table on a web page. I've given the user the ability to make several different "queries" and show different sub-sets of the data. I would like to add a button to the page that would allow the user to create an .XLS file that would contain the current contents of the table. I realize that I could create it on the server and allow him to download it but I'd rather let him create...
1
11652
by: tkaleb | last post by:
I have to create output file in a text, MS Access, MS Excel and .dbf format from C# Win/ADO.NET application. Data are collected in DataSet and there is no problem to make text file. However, I have to create a new output files (tables with defined fields) in other 3 formats, and to fill them with data from DataSet. I created Excel output with ComponentOne's trial Excel component, but it is a temporary solution. Also I have unusual CP (1250...
3
2553
by: Michael Tkachev | last post by:
Hello, I need to create an "Excel" file in the ASP.net. But a security system doesn't allow to do it. What can I do? There is an exception heppens when I try to execute the following row: Excel.ApplicationClass c = new Excel.ApplicationClass(); Exception Details: System.UnauthorizedAccessException: Access is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the...
27
27388
by: jeniffer | last post by:
I need to create an excel file through a C program and then to populate it.How can it be done?
1
1693
by: Venkat | last post by:
Can we create an Excel Addin with VC++.net? We are developing an application in c# which interacts with Excel application. The UI will be Excel and based on the inputs given through excel I need to do calculations using managed code (C#). Most of the time is consumed by interacting with excel like displaying values in the workbook or inserting cells based on my requirement. And adding some excel names into the work book etc...
0
1858
by: kennedystephen | last post by:
For the life of me, I cannot get this ... I have 1 excel document. I want to open that document and copy the first 50 rows to a new document. Then get the next 50 rows and copy those to a brand new document. I want to do this until the end of the Excel file. So... Open Excel1.
8
1794
by: yogarajan | last post by:
hi All how can i create new excel sheet through asp.net (with c#) i have create report in aspx (with c#) and i store data in excel sheet also so user can select view report through web page or excel sheet this is my query any one know abt create excel
0
1256
by: th12345 | last post by:
Hi All, I want to create custom excel sheet page in my web application like how Google spreadsheet was created. I do not want load data into Microsoft excel sheet. Please give some idea on this, how do start my work . Either create client side table using javascript or Server side table using Gridview or Server Table. If anyone have same experience on this, Please suggest me how do approach.
0
161
by: Pete Kane | last post by:
Hi All, does anyone know if it's possible to utilise a .NET class library from Excel 97 ? I've tried but receive a runtime error -2146232576 which means nothing to me, my class is shown below, I've placed the assembly into the GAC and registered it using RegAsm all to no avail using System; using System.Collections.Generic; using System.Text; using System.IO;
4
15419
by: =?Utf-8?B?Sm9zaW4gSm9obg==?= | last post by:
I could create MS Excel sheet using ASP.NET 2.0 with C# but it is not being created in some systems, following error occurs when the program compiles : Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. • To make more memory available, close workbooks or programs you no longer need.
0
8678
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
9166
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...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8871
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...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
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
4371
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...
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.