Page 1 of 1

[Solved] LibreOffice Calc PySort

Posted: Fri Jul 26, 2019 2:18 am
by FrogFan
Hello,

I use the PySort extension in OpenOffice calc. It works well there. I'm currently in the process of migrating a workbook that uses this extension a lot to LibreOffice. The reason for the migration is that I'm having stability issues with OpenOffice in Windows 10 and I'm hoping LibreOffice is more stable in the Windows 10 environment. (I recently got a new computer running Windows 10.)

In LibreOffice, I navigated to the extension manager and thought I had installed PySort in exactly the same manner that I installed it in OpenOffice. I got no error messages when doing so and the extension manager indicates that its installed. It's not functioning though. Every cell in the output array reports a VALUE error, the same result I get when the extension is not installed at all.

Is there any way to make this extension work in LIbreOffice? Thanks for any assistance.

Re: LibreOffice Calc PySort

Posted: Sat Jul 27, 2019 7:59 pm
by Villeroy
It is not a regular extension from extensions.openoffice.org. It is made by Charlie Young (last visit 2015) who published the extension on this forum: viewtopic.php?f=21&t=56916
It installs OK, appears in the function wizard under category "Add-In" but =PYSORT(A1:A33) [entered as array function] returns #VALUE.
The code in PySort.py compiles fine when testing with py3compile. I don't have the time to debug further.

Re: LibreOffice Calc PySort

Posted: Sat Jul 27, 2019 8:25 pm
by FrogFan
Thank you, Villeroy. I think it's curious that it works running in OpenOffice but doesn't in LibreOffice. If it won't compile, then it shouldn't work in either, right?

I understand you're busy. I've posted my question over on Ask LibreOffice to see if they can help me.

Thanks again.

Re: LibreOffice Calc PySort

Posted: Sat Jul 27, 2019 8:32 pm
by Villeroy
LibreOffice uses Python3, OpenOffice sticks to Python2. This is a major source of incompatibility. Since the code compiles, it would be necessary to debug it line by line testing each and every function argument. Takes some hour or two.

Re: LibreOffice Calc PySort

Posted: Sat Jul 27, 2019 9:17 pm
by FrogFan
OK. I understand. I'm in no particular hurry with this so, if you do find time and have a chance to look at it, I'll be standing by. Meantime, I'll post a message over on Ask LibreOffice that you've responded to this thread. I don't want to waste anyone's time.

Here is a link to my post over at Ask LibreOffice. https://ask.libreoffice.org/en/question ... breoffice/

Thank you again.

Re: LibreOffice Calc PySort

Posted: Mon Jul 29, 2019 4:14 pm
by Villeroy
Solved by mikekaganski viewtopic.php?f=21&t=56916#p474771

Re: LibreOffice Calc PySort

Posted: Mon Jul 29, 2019 4:32 pm
by FrogFan
Thank you!