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?
|