Hello,

On Apr/27/2007, Bjoern Milcke wrote:
> Carles Pina i Estany wrote:
> >Hello,
> >
> >On Apr/27/2007, Niklas Nebel wrote:
> >>Carles Pina i Estany wrote:
> >>>I have now a "problem": I have a Impress slide with a embedded
> >>>"Spreadsheet". I need to change some values from spreadsheet. How can I
> >>>get the spreadsheet model? Using ole2shape or which interface?
> >>Use the "Model" property of OLE2Shape.
> >
> >I have lot of problems using services (I don't have problems using
> >Interfaces methods)
> >
> >How I can use OLE2Shape service from craeted object?
> 
> The object you have is the right one. It implements the 
> beans.XPropertySet interface. At that interface you can call 
> getPropertyValue("Model") and get back an XInterface (in a variant type 
> called Any) that is a frame.XModel object. That is the model of the 
> spreadsheet.

you are right. I paste two lines to go there:
o=GetByName("stat") #GetByName returns the object that I showed before


oSheets=o.getPropertyValue("Model").getSheets().getByIndex(0)
#in oSheets I will have the sheet model

oSheets.getCellByPosition(0,0).setString("Thank you")
#it sets the string in first position

Done!

Thank you :-)

-- 
Carles Pina i Estany            GPG id: 0x8CBDAE64
        http://pinux.info

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to