[Calc][oxt] A function for all python string methods

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
hubert lambert
Posts: 145
Joined: Mon Jun 13, 2016 10:50 am

[Calc][oxt] A function for all python string methods

Post by hubert lambert »

Hello,

Keeping on exploring Calc add-ins, I built for myself a small extension that adds a PYSTRING function in Calc. Once installed, the function appears in the "Text" category of the functions wizard. PYSTRING gives access, within Calc, to all python built-in string methods (see spreadsheet below).
Some of these methods have their equivalent among the native functions of Calc, but most have not and thus provide an interesting complement. I’m not sure everyone would find it useful, but I’m pleased to share it as I found here (and in the french forum) all information that was lacking in the official documentation.
PYSTRING works fine under Apache OpenOffice. It works the same way under LibreOffice, except for the little issue described here.
Attachments
pystring.oxt
Accessing python string methods from within Calc
(4.09 KiB) Downloaded 564 times
pystring_examples_EN.ods
examples for pystring function
(24.32 KiB) Downloaded 474 times
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Calc][oxt] A function for all python string methods

Post by Zizi64 »

I just localized the extension for HU (Hungarian). I hope, it will work...
pystring_plus_hu.oxt
(4.1 KiB) Downloaded 386 times
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
hubert lambert
Posts: 145
Joined: Mon Jun 13, 2016 10:50 am

Re: [Calc][oxt] A function for all python string methods

Post by hubert lambert »

Hello Tibor,

It works fine. Thank you very much!
:)
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
Post Reply