J
july marcela moreno
hello:
I had installed .NET 2005 Beta 2.
I have a project of excel and this book of excel has many worksheets. By each sheet I mad=
e a class. In the Hoja1_Initialize method of the Hoja1 class, I call to another method=
that it has like parameter a Excel.Worksheet type.
When I call this method: generate(this), "this" in .NET 2005 Beta is a active sheet(H=
oja1), but when I installed .NET version 2005, its dont work. "this" is the Hoja1 clas=
s, no the active sheet(Hoja1).
So, I call method thus:
this.Activate();
Hoja1Class.getInstance().generate((Excel.Worksheet)this.Application.Act=
iveSheet);
This works, but when I do this:
((Excel.Range)sheet.Cells[i, j + 1]).Formula =3D formulaC;
generate Excpetion: =
{"Exception from HRESULT: 0x800A03EC"}
Server stack trace: =
Exception rethrown at [0]: =
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessag=
e reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& m=
sgData, Int32 type)
at Microsoft.Office.Interop.Excel.Range.set_Formula(Object )
at boletin.classes.Hoja1Class.print(DataView saldosTotales, Worksheet sheet=
) in C:\Proyectos Marce\boletin\boletin\classes\Hoja1Class.cs:line 196
at boletin.classes.Hoja1Class.generate(Worksheet sheet) in C:\Proyectos Marc=
e\boletin\boletin\classes\Hoja1Class.cs:line 301
at boletin.Hoja1.Hoja1_Initialize(Object sender, EventArgs e) in C:\Proyectos=
Marce\boletin\boletin\Hoja1.cs:line 43
at Microsoft.Office.Tools.Excel.Worksheet.OnStartup()
at boletin.Hoja1.FinishInitialization() in C:\Proyectos Marce\boletin\bolet=
in\Hoja1.Designer.cs:line 61
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInt=
ernal.ExecutePhase(String methodName)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInt=
ernal.ExecuteCustomizationStartupCode()
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInt=
ernal.ExecuteCustomization(IHostServiceProvider serviceProvider)
I don=C2=B4t know to do, Somebody Can I help me?
I had installed .NET 2005 Beta 2.
I have a project of excel and this book of excel has many worksheets. By each sheet I mad=
e a class. In the Hoja1_Initialize method of the Hoja1 class, I call to another method=
that it has like parameter a Excel.Worksheet type.
When I call this method: generate(this), "this" in .NET 2005 Beta is a active sheet(H=
oja1), but when I installed .NET version 2005, its dont work. "this" is the Hoja1 clas=
s, no the active sheet(Hoja1).
So, I call method thus:
this.Activate();
Hoja1Class.getInstance().generate((Excel.Worksheet)this.Application.Act=
iveSheet);
This works, but when I do this:
((Excel.Range)sheet.Cells[i, j + 1]).Formula =3D formulaC;
generate Excpetion: =
{"Exception from HRESULT: 0x800A03EC"}
Server stack trace: =
Exception rethrown at [0]: =
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessag=
e reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& m=
sgData, Int32 type)
at Microsoft.Office.Interop.Excel.Range.set_Formula(Object )
at boletin.classes.Hoja1Class.print(DataView saldosTotales, Worksheet sheet=
) in C:\Proyectos Marce\boletin\boletin\classes\Hoja1Class.cs:line 196
at boletin.classes.Hoja1Class.generate(Worksheet sheet) in C:\Proyectos Marc=
e\boletin\boletin\classes\Hoja1Class.cs:line 301
at boletin.Hoja1.Hoja1_Initialize(Object sender, EventArgs e) in C:\Proyectos=
Marce\boletin\boletin\Hoja1.cs:line 43
at Microsoft.Office.Tools.Excel.Worksheet.OnStartup()
at boletin.Hoja1.FinishInitialization() in C:\Proyectos Marce\boletin\bolet=
in\Hoja1.Designer.cs:line 61
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInt=
ernal.ExecutePhase(String methodName)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInt=
ernal.ExecuteCustomizationStartupCode()
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInt=
ernal.ExecuteCustomization(IHostServiceProvider serviceProvider)
I don=C2=B4t know to do, Somebody Can I help me?