https://forum.openoffice.org/en/forum/download/file.php?id=43784 is a template with Basic code which can be customized in thousands of ways. This one does not use cell styles because it does not deal with formatting. Instead of styles, the template deals with configuration data in named cells.
From the same template, you can create one document to merge business reports and another document to merge banking accounts (csv) while the user never has to open the Basic IDE.
From Apache OpenOffice Community Forum - [Calc, Basic] Format imported database data - (View topic) you may create many templates where each template applies its own specific formatting to lists ranges. You have some list, assign one cell style to the column heading and a sequence of cell styles to the individual columns and the macro applies the styles. The user configures the whole thing with cell styles and named ranges without loading the Basic IDE.
We can distribute templates with lots of styles, custom properties, named cells, bookmarks, fields and a little bit of embedded macro code which refers to well prepared, but still customizable template properties. No more hard coded document properties.
https://ask.libreoffice.org/uploads/short-url/wbNAfFClJDC4YyyONpeRDsHPpNR.odt is the documentation of another project of mine which adds parameterized tables to serial letters (i.e. invoices with tables of products, taxes, fees for each invoice). All the formatting needs to be done by the user. The user adds some custom properties and a logical form to his own template before calling the macro to fill his/her own invoice template(s) with data.
P.S. I hate fabricating oxt packages, but I’m pretty sure that they are able to dump templates to user profiles, so they are accessible from extension code.