Webutil excel problem
10003Jun 30 2006 — edited Jun 30 2006We have a client/server 6i form that has the following beaviour:
1) It Writes a text file using text_io commands, the generated file is a tab delimited file.
2) Using Ole2 api opens the tab generated file as excel file and creates a new workbook
3) Selects some cells from the generated file and then copy these cells and pastes to the new workbook.
4) The original file is closed and the workbook still open.
The form works fine in a client/server environment, However when we migrate the form to web we replaced the text_io calls to client_text_io
and the ole2 calls to client_ole2 calls but we have the following behaviour when we run the form on web.
1) The tab generated file is correctly generated.
2) The tab generated file is opened with excel correctly and the new workbook is correctly created and opened too.
3) The copy function isn't recognized and we got the following error.
WUO-714 [OleFunctions.setExceptionValues()] Unable to get the last OLE Error details; Exception
null
WUO-708 [OleFunctions.get_obj_property()] Unable to get Property: Copy; Exception
com.jacob.com.ComFailException: VariantChangeType failed
The code that I am using in order to copy the cells is:
range := CLIENT_OLE2.GET_OBJ_PROPERTY(sheet_tmp,'Range',args);
client_ole2.destroy_arglist(args);
mem := CLIENT_OLE2.GET_OBJ_PROPERTY(range,'Copy'); --The exception is generated in this line.
The question is:
Is it possible use the copy property in client_ole2 ? If it is not possible How can I rewrite my code in order to copy some cells from a workbook to another?