Home » Developer & Programmer » Forms » Export data to Calc throug OLE2
Export data to Calc throug OLE2 [message #181619] Mon, 10 July 2006 19:41 Go to next message
orate
Messages: 16
Registered: September 2005
Junior Member
I need to export data to OpenOffice Calc trough OLE2.

Searching the Web I only found the code listed below (at this page) and it doesn't work.

Also, in another page, there is a list of code examples about how OpenOffice can be accessed from various languages.

PROCEDURE call_calc IS
xlApp OLE2.OBJ_TYPE;
xframe OLE2.OBJ_TYPE;
xlSheets OLE2.OBJ_TYPE;
arg_list OLE2.LIST_TYPE;
arg_list2 OLE2.LIST_TYPE;

BEGIN
xlApp := OLE2.CREATE_OBJ( 'com.sun.star.ServiceManager');

arg_list := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( arg_list,'com.sun.star.frame.Desktop');
xframe := OLE2.INVOKE_OBJ(xlApp,'createInstance',arg_list);

OLE2.Destroy_Arglist(arg_list);

arg_list := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( arg_list,'private:factory/scalc');
OLE2.ADD_ARG( arg_list,'_blank');
OLE2.ADD_ARG( arg_list,0);

arg_list2 := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG_OBJ(arg_list, arg_list2);

xlSheets := OLE2.INVOKE_OBJ(frame,'loadComponentFromURL',arg_list);

END;


Does anyone have a clue on how to do this?
Re: Export data to Calc throug OLE2 [message #182374 is a reply to message #181619] Fri, 14 July 2006 08:33 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What version of Forms are you using? Search this forum for 'ole'. You need to have 'webutil' installed. See http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm

David
Previous Topic: Is it possible to get FMB file from an existing FMX file?
Next Topic: Dynamic generation Forms
Goto Forum:
  


Current Time: Fri Sep 20 11:41:15 CDT 2024