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 the 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?
None
0 Points
1 Post
ASP compatibility mode error while creating Excel file using CreateObject(“XLSpeedGen.ASP”)
Feb 12, 2019 05:23 PM|RGSenthil27|LINK
When I am trying to create an Excel file using below code in my local machine (64-bit machine), I am getting below error.
Exception Details:
Stack Trace:
I have registered "XLSpeedGenASP.dll" using below code in my local machine.
Still I am getting the same error. How to resolve the above mentioned issue?
Participant
850 Points
303 Posts
Re: ASP compatibility mode error while creating Excel file using CreateObject(“XLSpeedGen.ASP”)
Feb 13, 2019 08:05 AM|Jenifer Jiang|LINK
Hi RGSenthil27,
According to your description and code, I have some confusion.
Which version of the framework you've used in the project?
Could you please provide the XLSpeedGenASP.dll file because I could not find it by searching online?
And I could not reproduce your issue without this.
Besides, as far as I'm concerned, the error happens may be because there exists some conflicts between ASPCompat="True" and OnPageStart.
I suggest that you could try to change the version of platform as x86 in VS.
And this is my VS version.
Best Regards,
Jenifer