OpenOffice Integration Sample

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
SurenBehari
United States of America
Posts: 305
Joined: 12 Apr 2021, 14:50
Location: Santa Clara, US

OpenOffice Integration Sample

Post by SurenBehari » 12 Apr 2007, 18:13

 Posted by:  Suren Behari 

Hi,

There have been many requests for a sample to demonstrate the integration of OpenOffice with SQLWindows.

Please find attached a simple sample that demonstrates exporting Table Window data to an OpenOffice spreadsheet.
It invokes sCalc as an out-of-process application and populates an embedded ActiveX control.

I will provide detailed information and a wrapper class for all exposed APIs in my upcoming book - stay tuned.

Hope this helps.

Thanks,
Suren

You do not have the required permissions to view the files attached to this post.

as

Re: OpenOffice Integration Sample

Post by as » 13 Apr 2007, 15:54

 Posted by:  as 


I try to use it but get error on "oSheets.Invoke( 'getByName', INVOKE_FUNCTION )"

What´s wrong?

I'm using openOffice 2.0

You do not have the required permissions to view the files attached to this post.

SurenBehari
United States of America
Posts: 305
Joined: 12 Apr 2021, 14:50
Location: Santa Clara, US

Re: OpenOffice Integration Sample

Post by SurenBehari » 13 Apr 2007, 16:38

 Posted by:  Suren Behari 

Hi,

I use OpenOffice v2.2. I don't know what the default worksheet name was in 2.0, but another way to get the sheet is by index:
Replace

Code: Select all

Set bOk = oSheets.PushString( "Sheet1" )
Set bOk = oSheets.Invoke( 'getByName', INVOKE_FUNCTION )
with

Code: Select all

Set bOk = oSheets.PushNumber( 0, VT_I4 )
Set bOk = oSheets.Invoke( 'getByIndex', INVOKE_FUNCTION )
Thanks,
Suren

You do not have the required permissions to view the files attached to this post.

Didier Tourneur

Re: OpenOffice Integration Sample

Post by Didier Tourneur » 13 Apr 2007, 16:52

 Posted by:  Didier Tourneur 

Yes but how display, the calc inside the form like a true ActiveX without use a container .
It's easier

Didier

as

Re: OpenOffice Integration Sample

Post by as » 13 Apr 2007, 18:52

 Posted by:  as 


Great, now it work

Ingo Pohl

Re: OpenOffice Integration Sample

Post by Ingo Pohl » 16 Apr 2007, 08:57

 Posted by:  Ingo Pohl 

Could it be possible to have the app in text format so i could change the outlineversion to open it with my TD3.1

as

Re: OpenOffice Integration Sample

Post by as » 16 Apr 2007, 16:34

 Posted by:  as 

I export number using 'setValue' ( oCell.Invoke( 'setValue', INVOKE_FUNCTION ) )

How can I export date value?

giacomo berzacola
Italy
Posts: 3
Joined: 21 Aug 2017, 14:37
Location: Trento Italia

Re: OpenOffice Integration Sample

Post by giacomo berzacola » 27 Apr 2008, 13:36

 Posted by:  Giacomo Berzacola 

Can I have the code in TXT format, I have version 2.1
Tanks Giacomo

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests