FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour OLE and OpenOffice
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
OLE and OpenOffice
Posted: Wed Oct 22, 2008 11:44 PM

Hello,

Can OLE also be used in FWH to connect to OpenOffice ?

If yes, how does it work ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: OLE and OpenOffice
Posted: Thu Oct 23, 2008 07:22 AM
oSrvMan  = CREATEOBJECT( "com.sun.star.ServiceManager" )
oDesktop = oSrvMan:CreateInstance( "com.sun.star.frame.Desktop" )

oDoc = oDesktop:LoadComponentFromURL( "private:factory/scalc", "_blank", 0, {} )

oSheet = oDoc:GetSheets():GetByIndex( 0 )

oSheet:GetCellByPosition( 0, 0 ):SetString = "TEST"
oSheet:GetCellByPosition( 1, 0 ):SetValue = 123

oSheet:GetCellRangeByPosition( 0, 0, 1, 0 ):CharWeight = 150

oSheet:GetColumns():GetByIndex( i ):OptimalWidth = .T.


EMG

Continue the discussion