【发布时间】:2016-09-08 00:52:54
【问题描述】:
我已在 Win7(x64) 中为我的所有 Python 项目默认安装了 Python 3.5.1。
我使用 PyCharm 5.0.5 社区版开发 Python 脚本,其默认设置为“默认项目解释器”"3.5.1 (C:\Python35\python.exe)"
在我的工作中,我们正在从 MS Office 2007/2010 迁移到 LibreOffice-5。我用 VBA 写了一些宏,尽管我不是一个 VB 热心的人。 Basic 缺乏良好的数据结构,例如列表(我喜欢列表推导式)、字典、集合和元组。所以,我想重写 LibreOffice-5 Python 脚本宏中的 VBA 宏。
LibreOffice-5 安装在 "C:\Program Files (x86)\LibreOffice 5\program" 有自己的嵌入 Python,版本 3.3.5。 LibreOffice-5 安装中的 Python 脚本位于:
- Libre Office 宏;
"C:\Program Files (x86)\LibreOffice 5\share\Scripts\python" - 我的宏;
"C:\Users\trimax\AppData\Roaming\LibreOffice\4\user\Scripts\python"
问题很简单:
我需要配置 PyCharm 设置来开发带有嵌入 python 版本的 LibreOffice 宏的 python 脚本。不知道是需要设置虚拟环境还是只设置Project Interpreter。
顺便问一下,有没有什么方法可以在文档中插入宏,与文档共享,作为 VBA 项目模块?
【问题讨论】:
标签: python macros pycharm openoffice.org libreoffice