小编Jef*_*f O的帖子

使用 Python 使用 Uno 访问 LibreOffice Calc

我正在尝试编写一个脚本来使用 Python 3.7 操作 Ubuntu Mint _LibreOffice Calc 表。出于某种原因,当我尝试导入 Uno 时出现错误。我可以从 Calc 内部运行一个宏调用这个

    desktop = XSCRIPTCONTEXT.getDesktop()
    model = desktop.getCurrentComponent()
    active_sheet = model.CurrentController.ActiveSheet
    write 'Hello World' in A1
    active_sheet.getCellRangeByName("A1").String = "Hello World!
Run Code Online (Sandbox Code Playgroud)

但不能直接从 VS_code IDE 与工作表进行交互。是否有我需要设置为 Uno_ 的路径

使用 LibreOffice 6.4、Python 3.7 和 APSO。我对 LibreOffice 感到非常沮丧,似乎对新手的 Python 支持很少。

uno python-3.x libreoffice-calc

3
推荐指数
2
解决办法
8341
查看次数

标签 统计

libreoffice-calc ×1

python-3.x ×1

uno ×1