ASP compatibility mode error while creating Excel file using CreateObject("XLSpeedGen.ASP")

0

When I am trying to create an Excel file using below code in my local machine (64-bit machine), I am getting below error.

<%@ Page ASPCompat="True" language="vb" %>
<%
  Dim XLS             ' Excel SpeedGen Object
  XLS = Server.CreateObject("XLSpeedGen.ASP")  <--- I am getting error in this line
  XLS.AddVariable("Name", strName)
  XLS.Generate(SrcBook, "", False)
%>

Exception Details:

System.Web.HttpException: An error was encountered while calling OnStartPage in ASP compatibility mode.

Stack Trace:

[HttpException (0x80004005): An error was encountered while calling OnStartPage in ASP compatibility mode.]
System.Web.Util.AspCompatApplicationStep.OnPageStart(Object component) +3028336 System.Web.HttpServerUtility.CreateObject(String progID) +142

I have registered "XLSpeedGenASP.dll" using below code in my local machine.

regsvr32 "E:\XLSpeedGen\XLSpeedGenASP.dll"

Still I am getting the same error. How to resolve the above mentioned issue?

c#
asp.net
excel
vb.net
com
asked on Stack Overflow Feb 11, 2019 by RGS • edited Feb 12, 2019 by RGS

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0