My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 10: The plugin doesn't work with Excel.Application
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by jarod...@gmail.com, Jan 25, 2010
See this message on the Google Group :
http://groups.google.com/group/ff-activex-host/t/1edc790427535287?hl=en

Summary:

The Excel.Application called like that:
<object
                id="Control"
                TYPE="application/x-itst-activex"
                ALIGN="baseline" BORDER="0"
                WIDTH="300" HEIGHT="300"
                clsid="{00024500-0000-0000-C000-000000000046}"
                progid="Excel.Application.12"
                event_OnReadyStateChange="OnReady"
                logger="logger" debugLevel="5">
        </object> 

Doesn't work because, I quote, "Looking at the registry I see that the
Excel control is not just a DLL/OCX like most ActiveX objects, but looks
more like a .NET assembly. It probably needs to be created differently and
therefore does not work with the current implementation of the plugin."
Feb 13, 2010
#1 Booker.B...@gmail.com
I took a look at this out of curiosity since I thought I had remembered or heard that
CoCreateInstance should work with .NET ActiveX Controls. I did a test by creating a
simple Windows Form Control Library ActiveX Control and scripted a page for it and it
seemed to work out fine. 

To test unzip the attached file and build the AxWinFormTest.sln in the AxWinFormTest
folder. It should register the dll during build but if you need to run regasm.exe
AxWinFormTest.dll /codebase /tlb . After the file is built and registered add the
{cfe7133b-fbcc-4d49-8cfb-0bcfae763184} classid or AxWinFormTest.AxWinFormTestControl
progid to be allowable from npffax.dll. After all that is set up launch the included
FormTest.html. You should see a button and a text box if it all worked out well.

This does not solve the Excel issue, but I believe the Excel failure is something
different. From other testing I performed if you allow the
{00024500-0000-0000-C000-000000000046} classid or the "Excel.Application.XX" progid
in npffax.dll and then use a page like the included ExcelTest.html you will get
different results depending on your Office version. In Office 2007 you will see Excel
launch in the task manager then disappear and in Office 2003 Excel will spawn but
then promptly crash. So it appears the object is getting created but for some reason
it gets destroyed. The Event Viewer did not yield any helpful information and
adjusting the DCOM permissions did not seem to help either. If I have some free time
I might try to create a test application that calls CoCreateInstance outside of the
browser to see if that changes anything. However from my testing I really do believe
that the Excel failure probably has little to do with it being a .NET object.

From my research I also did not find a lot of information about using the
Excel.Application object in a web page. It might help if I had a better example of
how one would use the object in a real world situation. From the example for the
issue all it seems to do is spawn an Excel process and nothing else.

Thanks,

-Brent
NpFFaxDotNetTests.zip
11.2 KB   Download
Feb 16, 2010
#2 jarod...@gmail.com
Thanks Brent.

I can give you an example about the way to use the Excel object:
try {
 oExcel = new ActiveXObject("Excel.Application");
} catch(e) {
 alert("Unable to use ActiveX!");
 return false;
}
// create an empty Excel file
oExcel.Visible=true; // make it visible
var newWorkbook=oExcel.Workbooks.Add;
newWorkbook.WorkSheets(1).Activate;
oSheet=newWorkbook.WorkSheets(1);
// write something into the file
oSheet.Cells(1, 1).value = "Hello World!";

I've created a javascript library that makes it easier to manipulate the Excel
object. I want to share it with the world, but I first wanted to find a solution for
the other browsers, like Firefox... I'm using it right now in an intranet where
everyone have to use IE!

If you need more information, let me know :-)
Jun 6, 2010
#3 allen.r....@gmail.com
Hi Brent,

I just tried the attached FormTest.html sample and got:

AxHost.TestAuthorization: returning True
AxHost.NPP_New: debug level set to 5
AxHost.verifyClsID: verified successfully
AxHost.setClsID: CLSID {cfe7133b-fbcc-4d49-8cfb-0bcfae763184} set
AxHost.verifyClsID: verified successfully
AxHost.setClsIDFromProgID: PROGID AxWinFormTest.AxWinFormTestControl resolved and set
The requested lookup key was not found in any active activation context.
AxHost.CreateControl: failed to create site
AxHost.NPP_New: failed to create the control
AxHost.TestAuthorization: returning True
AxHost.NPP_New: debug level set to 5
AxHost.verifyClsID: verified successfully
AxHost.setClsID: CLSID {cfe7133b-fbcc-4d49-8cfb-0bcfae763184} set
AxHost.verifyClsID: verified successfully
AxHost.setClsIDFromProgID: PROGID AxWinFormTest.AxWinFormTestControl resolved and set
The requested lookup key was not found in any active activation context.
AxHost.CreateControl: failed to create site
AxHost.NPP_New: failed to create the control

I did not see the textbox and the button. I'm using v1.1 with Firefox 3.6.3

My purpose in trying this is just to load a .Net Assembly using this plugin, not just
Excel in particular.

I tried it with another assembly that works perfectly fine with Internet Explorer and
got the following:

AxHost.TestAuthorization: returning True
AxHost.verifyClsID: verified successfully
AxHost.setClsIDFromProgID: PROGID AxRS.AxRS resolved and set
AxHost.verifyClsID: verified successfully
AxHost.setClsID: CLSID {c61ec9c4-2212-479c-96f7-5be1a8275b3a} set
AxHost.NPP_New: debug level set to 5
An attempt was made to reference a token that does not exist.
AxHost.CreateControl: failed to create site
AxHost.NPP_New: failed to create the control
AxHost.TestAuthorization: returning True
AxHost.verifyClsID: verified successfully
AxHost.setClsIDFromProgID: PROGID AxRS.AxRS resolved and set
AxHost.verifyClsID: verified successfully
AxHost.setClsID: CLSID {c61ec9c4-2212-479c-96f7-5be1a8275b3a} set
AxHost.NPP_New: debug level set to 5
An attempt was made to reference a token that does not exist.
AxHost.CreateControl: failed to create site
AxHost.NPP_New: failed to create the control

Powered by Google Project Hosting