PC Review


Reply
Thread Tools Rate Thread

COM error invoking Excel

 
 
=?Utf-8?B?SUNFIFNybA==?=
Guest
Posts: n/a
 
      11th Feb 2004
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

'scarica vecchia rob
GC.Collect(
'settagg
MyExcel = New Excel.ApplicationClas
MyExcel.Visible = False
oWorkbooks = MyExcel.Workbook
theWorkbook = oWorkbooks.Ad

..

End Su

(I also tried using:
Dim MyExcel As Excel.Applicatio
Dim oWorkbooks As Excel.Workbook
Dim theWorkbook As Excel.Workboo


For what I can see the Excel.Application or Excel.ApplicationObject 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.ApplicationClass.set_Visible(Boolean RHS) +
Excel01.WebForm1.CreateExcelForm() in c:\inetpub\wwwroot\Istruzione\MiniProve\Excel01\WebForm1.aspx.vb:4
Excel01.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\Istruzione\MiniProve\Excel01\WebForm1.aspx.vb:9
System.Web.UI.WebControls.Button.OnClick(EventArgs e
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData
System.Web.UI.Page.ProcessRequestMain(

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?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invoking Excel Financial Functions Without Instantiating Excel? PeteCresswell Microsoft Access 3 27th Jun 2009 10:04 PM
Invoking WCF client from Excel VBA Arun Microsoft Dot NET Framework 1 26th Apr 2007 03:46 AM
use ADO invoking dbf file in excel =?Utf-8?B?aGVkaWEuY2Nm?= Microsoft Excel Programming 2 21st Feb 2005 02:59 PM
invoking Excel in Access code Bill Microsoft Access External Data 0 9th Mar 2004 03:46 PM
Invoking Excel via Getobject(From Access) to invoke Excel Macro =?Utf-8?B?QWNpZQ==?= Microsoft Excel Programming 1 27th Feb 2004 07:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:21 PM.