Use of Webutil Library to export to Excel [message #335250] |
Mon, 21 July 2008 11:01  |
Signum
Messages: 13 Registered: July 2008
|
Junior Member |
|
|
Hi everyone.
I'm currently working on a form which can export data to an Excel file. I use "CLIENT_OLE2" in order to do that. However, it seems it doesn't work. I'm using Forms 10 and Database 10g too.
On the Java Console, I got this message :
2008-juil.-21 17:24:26.343 WUO[setProperty()] Setting property WUO_OLE2_OBJNAME to Excel.Application
2008-juil.-21 17:24:26.343 WUO[getProperty()] Getting property WUO_OLE2_CREATE_OBJ
2008-juil.-21 17:24:43.640 WUO[setProperty()] Setting property WUO_OLE2_RELEASE_OBJ to 337
Exception occurred during event dispatching:
java.lang.NoSuchMethodError
at oracle.forms.webutil.ole.OleFunctions.release_obj(Unknown Source)
at oracle.forms.webutil.ole.OleFunctions.setProperty(Unknown Source)
at oracle.forms.handler.ComponentItem.setCustomProperty(Unknown Source)
at oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)
at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)
at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
at oracle.forms.engine.Runform.onUpdateHandler(Unknown Source)
at oracle.forms.engine.Runform.processMessage(Unknown Source)
at oracle.forms.engine.Runform.processSet(Unknown Source)
at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
at oracle.forms.engine.Runform.onMessage(Unknown Source)
at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Here is the code from the form module :
Declare
app CLIENT_OLE2.OBJ_TYPE;
Begin
app:=CLIENT_OLE2.CREATE_OBJ('Excel.Application');
message(app);
CLIENT_OLE2.Release_Obj(app);
message('test2');
End;
When I call "CLIENT_OLE2.Create_Obj", it worked (I can see it with the Excel process on the process list) but whenever I use the Excel object (i.e "app" variable in my example), nothing happen (or should I say that the program stopped when I called "Release_Obj" or whatever the function/procedure. If I use "app", then the "message('test2')" instruction doesn't work). I tried the other Webutil functions (WEBUTIL_HOST, WEBUTIL_FILE, etc...) and there is no problem, so Webutil is correctly installed.
So, what's the problem here ? Are there another way to export data to Excel ?
Thanks for your help ^^
|
|
|
|
Re: Use of Webutil Library to export to Excel [message #335281 is a reply to message #335250] |
Mon, 21 July 2008 12:51   |
Signum
Messages: 13 Registered: July 2008
|
Junior Member |
|
|
I'm sure about it. It displays a number (Maybe it's the process number or something like that) and it's not equal to 0 when I try. Even if I change "message(app)" by "message('something')", there would be the same error when I try to use "app" in a function/procedure like "CLIENT_OLE2.Set_Property" or "CLIENT_OLE2.Release_Obj".
[Updated on: Mon, 21 July 2008 12:55] Report message to a moderator
|
|
|
|
|
|
|
Re: Use of Webutil Library to export to Excel [message #384189 is a reply to message #335646] |
Mon, 02 February 2009 11:34   |
jimr1234567890
Messages: 1 Registered: February 2009
|
Junior Member |
|
|
I can save the file out to disk no problems.
What I wanted was to open the resulting file with the correct application.
I tried (for an excel generated file):
v_app := client_ole2.create_obj ('Excel.Application');
...
When the package gets to client_ole2.create_obj it crashes when executing it locally. Appears to work fine on the server.
The client_ole2.create_obj gets around to calling:
v_javaHandle := WebUtil_Core.getProperty(WebUtil_Core.WUO_PACKAGE,'WUO_OLE2_CREATE_OBJ');
This WebUtil_Core.getProperty gets around to calling:
result := GET_CUSTOM_PROPERTY(bean,1,propertyName);
At this point my application stops/freezes. The 'propertyName' at this point equal: WUO_OLE2_CREATE_OBJ
Any reason what is missing? I am using the stander Webutil 1.0.6 and the Jacob 1.8 files.
|
|
|
Re: Use of Webutil Library to export to Excel [message #384440 is a reply to message #384189] |
Tue, 03 February 2009 19:08  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Please post your code.
How do you know that this is the statement that is causing the failure?
Search this forum for 'client_ole2.create_obj' plus other keywords that you have used and see how other people have handled it.
David
|
|
|