Apologies for reinterpreting the question a bit but I genuinely thought this might help:
I switched from LibreOffice to Grist. It has a python/plugin interface, so you can do anything you can imagine. Also, you find plugins on GitHub. Maybe it's worth a shot for you too.