python和openoffice连接,以及转换工具。
ootools的Python项目详细描述
开放式办公工具是一套程序,允许您轻松连接到 通过python uno模块打开office。它提供了启动开放式办公室的接口 为你,停止它,连接。其他转换工具,如ODS2CSV,或 只要你给我发送一个链接,XLS2CSV就会被包含进来。
安装ootools
您可以通过系统包管理器或简易安装来安装ootools:
easy_install ootools
启动OpenOffice
通过这组命令启动openoffice:
import ootools oor=ootools.OORunner() oor.start()
连接到OpenOffice
要连接到打开的Office,只需发出连接语句:
import ootools oor=ootools.OORunner() oor.start() desktop=oor.connect() #Do something with the "Desktop" aka OpenOffice main document module.
停止OpenOffice
您可以通过停止语句停止OpenOffice:
oor.stop()