Python and Libre Calc Help

asked 2019-03-16 06:15:47 +0200

data_wrangler gravatar image

Running Libre Office Version: 6.2.1.2 (x64) on Windows 10. Running Python 3.7.0 and tried on Python 3.5.6 as well.

Been having a hard time getting Libre Calc to recognize my python scripts as a macro. In the Python Macro window only the folder comes up with no script icon to run.

Here my current process and what I have tried. Is there anything I'm not doing correctly?

  1. Use a separate IDE to write the .py code
  2. Copy and Pasted the script in C:\Program Files\LibreOffice\share\Scripts\python directory that is installed by default when initially installed Libre Office.
  3. Uninstalled and then reinstalled Libre Office 1x.
  4. Tried the Libre Office extension "APSO - Alternative Script Organizer for Python".
  5. Macro security is set to Medium.
edit retag flag offensive close merge delete

Comments

I myself have no idea about Python. However, I found some hints on the wiki page. Maybe it can help you.

And in the Dokumentation you find a discription "Calc Macro"

ebot gravatar imageebot ( 2019-03-16 14:49:34 +0200 )edit

Have you a defined function (def statement) in the script?

Ratslinger gravatar imageRatslinger ( 2019-03-16 21:33:36 +0200 )edit

ebot-Thank you for the links!

Ratslinger-That fixed it. Of all the things I tried, I completely forgot to make ta defined function out of what I need to do. Thanks!

data_wrangler gravatar imagedata_wrangler ( 2019-03-16 22:17:08 +0200 )edit

@data_wrangler

Glad it helped. We all need another set of eyes sometimes.

Ratslinger gravatar imageRatslinger ( 2019-03-17 01:54:48 +0200 )edit

Hello
Don't store your Scripts into Programfolder.
Store into your *useprofile\Scripts\python*.

On Windows that should be:.

%appdata%\Roaming\LibreOffice\4\user\

karolus gravatar imagekarolus ( 2019-03-17 15:47:16 +0200 )edit