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

Home Posts Topics Members FAQ

COM error invoking Excel

Hi everybody

I am trying to build an ASP.Net application to create dinamically an Excel File on the server. I am trying using this VB code

Public Sub CreateExcelForm (
Dim MyExcel As Excel.Applicati onClas
Dim oWorkbooks As Excel.Workbook
Dim theWorkbook As Excel._Workboo
Dim oSheet As Excel.Workshee

'scarica vecchia rob
GC.Collect(
'settagg
MyExcel = New Excel.Applicati onClas
MyExcel.Visible = False
oWorkbooks = MyExcel.Workboo k
theWorkbook = oWorkbooks.Ad

..

End Su

(I also tried using:
Dim MyExcel As Excel.Applicati o
Dim oWorkbooks As Excel.Workbook
Dim theWorkbook As Excel.Workboo
For what I can see the Excel.Applicati on or Excel.Applicati onObject get correctly instantiated , but whenever I try to explore it many of the internal references (especially methods) are unavaillable
I keep getting this error whenever I try either to set the MyExcel.Visible property or (if I don't set the visible property) even just oWorkbooks.Add

[COMException (0x8007fa08): Eccezione da HRESULT: 0x8007FA08.
Excel.Applicati onClass.set_Vis ible(Boolean RHS) +
Excel01.WebForm 1.CreateExcelFo rm() in c:\inetpub\wwwr oot\Istruzione\ MiniProve\Excel 01\WebForm1.asp x.vb:4
Excel01.WebForm 1.Button1_Click (Object sender, EventArgs e) in c:\inetpub\wwwr oot\Istruzione\ MiniProve\Excel 01\WebForm1.asp x.vb:9
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(

I couldn't find any specific documentation on this error/problem and I would appreciate if somebody could help me in some way

I'm using visual studio 2002 and framework 1.1 on a server computer where there's office 97 suite installed as well as Access 2000 (and previosly there was Office 95 that was uninstalled before installing the new versions)

Thanks in advance

(Is there any problem in using a version as old as Office 97 to interoperate with .Net?
Jul 21 '05 #1
0 1032

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

Similar topics

3
10803
by: bbxrider | last post by:
running win2k adv server/ iis5.0 trying to setup on my web page where browsers can download a file, an .xls so been trying to figure out with a download 'link' what invokes the standard ms file save dialog, hopefully without using vbscript other web pages i have seen have a simple link such as : <a href="someDir/someFile.xls">Download</a> when i used that, it just opens the spreadsheet and actually allows me to use the spreadsheet...
4
2433
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from this app: =============================== static void Main(string args) { if (args.Length > 0) Console.SetIn(new StreamReader(args)); //executes if I don't use the "<", ">" redirection syntax when invoking XmlTextReader xmlin = new...
0
875
by: ICE Srl | last post by:
Hi everybody I am trying to build an ASP.Net application to create dinamically an Excel File on the server. I am trying using this VB code Public Sub CreateExcelForm( Dim MyExcel As Excel.ApplicationClas Dim oWorkbooks As Excel.Workbook Dim theWorkbook As Excel._Workboo Dim oSheet As Excel.Workshee
5
2781
by: RJN | last post by:
Hi I'm invoking the excel object from ASP.Net application. My development machine is Windows 2000 and MS Office is installed on my m/c. I have added reference to the Excel COM object, I have given Access and launch permissions to ASPNET user in DCOMCNFG and the identity set to launch user. But I get the following error, moment I try to create the Excel object: Dim oexcel As New Excel.Application "COM object with CLSID...
4
1802
by: rjn | last post by:
Hi I'm invoking the excel object from ASP.Net application. My development machine is Windows 2000 and MS Office is installed on my m/c. I have added reference to the Excel COM object, I have given Access and launch permissions to ASPNET user in DCOMCNFG and the identity set to launch user. But I get the following error, moment I try to create the Excel object: Dim oexcel As New Excel.Application "COM object with CLSID...
3
1012
by: Al_C | last post by:
Hi, We have a few apps that we would like to invoke from withing our program. Suggestions? Should I create a seperate thrread to run the app in. The idea is to call excel for example from within our vb.exe Thanks in advance, Al
4
9100
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Permission denied" This is what I am doing. we had an app that...
1
1019
by: sameer | last post by:
Hi all, i have at time seen that the browser opens up word or excel or pdf documents in itself and not invoke the msword or excel or pdf software from the local machine, how it is possible, does it require to pass a special parameter to the browser, please suggest. btw i have seen this behavior in yahoo email when you try opening up the attachment by clicking button next to them, but if you click on OPEN then it opens in the software...
0
1392
by: Ned Balzer | last post by:
I have a puzzling problem. I am using some code I found in another thread here to output the results of a gridview to excel. Here is the subroutine: Sub SendToExcel(ByVal Source As Object, ByVal E As EventArgs) Dim gv As GridView = Ctype(ColRep1Form.FindControl("xlsRep1GridView"), GridView) If gv.Rows.Count.ToString + 1 < 65536 Then gv.AllowPaging = False gv.AllowSorting = False
0
9571
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
10561
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
10302
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
10069
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
9132
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...
1
7608
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
6845
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
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
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.