OLE and OpenOffice

Post Reply
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

OLE and OpenOffice

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: OLE and OpenOffice

Post by Enrico Maria Giordano »

Code: Select all

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
Post Reply