Set settings in config files

I have created too many number formats in Calc and i need to back them up. Are they saved somewhere in the ~/.config/libreoffice folder?

I want to add the number formats in a file on a new computer that when Calc opens those number formats are already there and XLSX files that are using them keep using them.

Same with all the settings and configurations I’ve made. It’s slow to do it in the settings menus for new computers.

for .ods seems they are in the styles.xml
e.g.

<number:number-style style:name=“N131”><number:number number:decimal-places=“0” number:min-decimal-places=“0” number:min-integer-digits=“3” number:grouping=“true”/>

Lots of files in /usr/lib/libreoffice have number:number in it but none of them are styles.xml. There’s /usr/lib/libreoffice/share/calc/styles.xml but it only has style:style lines.

Can I create a file in my ~/.config/libreoffice to create the format for my user?

see Frequently asked questions - General - The Document Foundation Wiki - What is the file format used by LibreOffice?

Creating and Changing Default and Custom Templates

To find where number format is stored I created a format with a long word in it and tried to search the word in the ~/.config/libreoffice but it’s nowhere. Is it saved somewhere else? If I can find where it gets saved I can create it there.

Only the standard formats are stored in an HTML file somewhere deep within the program and the user. I once tried changing this without discarding or overwriting the original. Result: I discarded my custom formats!
In macOS, everything I specifically do and define is saved in the very file I’m working on. To save a format defined there, I copy this cell into the standard blank document, which is opened with every new document as noname.ods/odt.
What is possible in ‘WRiTER’ — namely, loading all formatting from another file — is not possible in ‘CALC’. Here you have to proceed manually, as described above. The one exception is that when you manually copy, the LO standard format templates are not overwritten by modified ones, only your own! New ones are simply added along with the copied cell.