Visual Studio .NET - How to Automate excel in using vb

Asked By ira ira on 12-Oct-14 11:24 AM
I would like Create Dynamic ASP.NET Excel Workbooks using VB or javascript
I tried using vb in page
I got an exception error message Cannot create ActiveX component.

I used the following code in page using javascript, still I get the same error.
var Excel, Book; 
// Create the Excel application object.
 Excel = new ActiveXObject("Excel.Application");
However, this code works in ASP pages.
Could you please suggest where I am going wrong.

In ASP.NET - Asked By Peter Bromberg on 21-Aug-03 08:22 AM

you need to first set a COM Reference to the Excel TypeLibrary and let VS.NET Generate a .NET COM Interop wrapper for this.
.NET can only talk to COM through Interop.

Com wrapper for excel - Asked By ira ira on 12-Oct-14 11:24 AM

I wrote a com wrapper for excel and I am getting the following error: 

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.

Com wrapper for excel - Asked By Marco Escobar on 12-Oct-14 11:24 AM

How did you resolve this problem?
I have the same situation.

Did you add some security policy?