WUO-709 - Unable to invoke Method: OPEN - CLIENT_OLE2
940410Jun 6 2012 — edited Jun 20 2012Hi..
i've been looking for a solution for my error... the forms is Forms [32 Bit] Version 11.1.1.4.0... I don't know how to tell you what version of webutil or jacob i have... the PC has been configurated by the company... anyway...
I have a XML file and i need to create a XLS file... the logic is...
In a PKG i have all the procedures to work whit XLS files in client using CLIENT_OLE2
-- variables
OAPLICACIONW CLIENT_OLE2.OBJ_TYPE;
OLIBROSW CLIENT_OLE2.OBJ_TYPE;
OLIBROW CLIENT_OLE2.OBJ_TYPE;
OHOJASW CLIENT_OLE2.OBJ_TYPE;
OHOJAW CLIENT_OLE2.OBJ_TYPE;
OARGUMENTOW CLIENT_OLE2.LIST_TYPE;
-- initializes the handlers
OAPLICACIONW := CLIENT_OLE2.CREATE_OBJ('EXCEL.APPLICATION');
CLIENT_OLE2.SET_PROPERTY(OAPLICACIONW, 'VISIBLE', LB_BOOLWEB(P_BMOSTRARAPP));
CLIENT_OLE2.SET_PROPERTY(OAPLICACIONW, 'DISPLAYALERTS', LB_BOOLWEB(P_BMOSTRARALT));
OLIBROSW := CLIENT_OLE2.GET_OBJ_PROPERTY(OAPLICACIONW, 'WORKBOOKS');
-- open the file
OARGUMENTOW := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(OARGUMENTOW, P_CNOMARCHIVO);
OLIBROW := CLIENT_OLE2.GET_OBJ_PROPERTY(OLIBROSW, 'OPEN', OARGUMENTOW);
OHOJASW := CLIENT_OLE2.GET_OBJ_PROPERTY(OLIBROW, 'WORKSHEETS');
CLIENT_OLE2.DESTROY_ARGLIST(OARGUMENTOW);
--
OHOJAW := CLIENT_OLE2.GET_OBJ_PROPERTY(OAPLICACIONW, 'ACTIVESHEET');
-- save as (there are some constants declared in the pkg spec)
OARGUMENTOW := OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(OARGUMENTO, P_CNOMARCHIVO);
CLIENT_OLE2.ADD_ARG(OARGUMENTO, XLNORMAL);
CLIENT_OLE2.INVOKE(OLIBRO, 'SAVEAS', OARGUMENTO);
CLIENT_OLE2.DESTROY_ARGLIST(OARGUMENTO)
-- quit
OARGUMENTOW := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(OARGUMENTOW, 0);
CLIENT_OLE2.INVOKE(OLIBROW, 'CLOSE', OARGUMENTOW);
CLIENT_OLE2.DESTROY_ARGLIST(OARGUMENTOW);
CLIENT_OLE2.INVOKE(OAPLICACIONW, 'QUIT');
-- end
CLIENT_OLE2.RELEASE_OBJ(OHOJAW);
CLIENT_OLE2.RELEASE_OBJ(OHOJASW);
CLIENT_OLE2.RELEASE_OBJ(OLIBROW);
CLIENT_OLE2.RELEASE_OBJ(OLIBROSW);
CLIENT_OLE2.RELEASE_OBJ(OAPLICACIONW);
the file to convert exists, i can open it directly...
when i execute the form in the server i've got this error
WUO-709 Unable to invoke Method: OPEN; Exception
com.jacob.com.ComFailException: Invoke of: OPEN
Source: Microsoft Office Excel
Description: Unable to get the OPEN property of the Workbook class
The thing is, that after the message shows up, i close the message and I found the XML file open, indicating that it only can be opened as a copy... it seems that the process is opening more than one instance of Excel.. this is my guessing... so.. i Hope you can help me...
In others forums recommended to update the jacob files.. it can be the solution?
Regards,