Christophe Mari wrote:
> Thanks
> 
> Now, after I create my calc object, I want to populate my object with
> D:/history.ods file.
> How I make it ?

Unfortunately the "Insert object from file" functionality is not
available in the API yet, so the only way would be to insert the content
into the document you can retrieve by:

obj=ThisComponent.CreateInstance("com.sun.star.text.TextEmbeddedObject")
obj.CLSID="47BBB4CB-CE4C-4E80-A591-42D9AE74950F"
sel = ThisComponent.CurrentController.Selection
range = sel.getByIndex(0)
obj.attach( range )
document = obj.Model

Unfortunately Calc does not support the XDocumentInsertable interface
(as Writer does), so I don't know how you can load an existing Calc
document into an empty one. Maybe somebody else knows.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.



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

Reply via email to