|
|
Автор:
|
Anonymous
|
|
Тема:
|
Программирование OpenOffice Writer
|
|
Дата:
|
2/29/2008 8:12:00 AM
|
Пытаюсь программно создать и заполнить текстовый документ
в OpenOffice Writer из c#.
Текст вставляется без проблем:
XComponentContext localContext = uno.util.Bootstrap.bootstrap();
XMultiServiceFactory multiServiceFactory = (XmultiServiceFactory) localContext.getServiceManager();
XComponentLoader componentLoader = (XcomponentLoader) multiServiceFactory.createInstance("com.sun.star.frame.Desktop");
XComponent xComponent = componentLoader.loadComponentFromURL(
"private:factory/swriter",
"_blank",
0,
new unoidl.com.sun.star.beans.PropertyValue[0]
);
XTextDocument doc = (XtextDocument)xComponent;
doc.getText().setString("Hello I'm the first text!");
А как работать с таблицами?
Нигде не могу найти пример. Подскажите кто знает.
|
|