Calc - load styles option is missing?

I have a spreadsheet template in which I’ve created and updated several styles, and I want to overwrite the styles used in another document from this template. According to the official documentation and all of my searches, there should be a “load styles” option on a drop-down somewhere in the Styles sidebar that will allow me to load styles from another file.

I can’t find this option anywhere.

Workaround:

Put all your styles in a separate cell below each other. Select this block and paste it into another spreadsheet. The styles should be copied as well.

I hope this helps.


With me:
Version: 7.1.5.2 (x64) / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

2 Likes

2026-03-26 In Ubuntu Studio 24.04 LTS, and presumably Ubuntu 24.04 LTS The load styles option in Calc remains missing while present in Writer. I just used Grbrgr’s workaround successfully and found it is still seems the only solution requiring the least effort.

… and you are sure this “official documentation” is related to Calc? This option exists in Writer.

2 Likes

So what you’re saying is this option is missing from Calc. That’s an unfortunate oversight.

1 Like

Hello
Here is an working example written in python, you have to run it from the Calcdocument you want to import the Styles:

from com.sun.star.beans import PropertyValue

def import_styles():
    doc = XSCRIPTCONTEXT.getDocument()
    styles = doc.StyleFamilies
    pv = PropertyValue()
    pv.Name = "OverwriteStyles"
    pv.Value = True
    style_template_url = "file:///the/path/to/your/template.ods"
    styles.loadStylesFromURL(style_template_url, (pv,))

and the Transscription to Basic:

Sub importStyles

    Dim prop(1) As new com.sun.star.beans.PropertyValue
    doc = thisComponent
    styles = doc.StyleFamilies
    
    prop(0).Name = "OverwriteStyles"
    prop(0).Value = True
    style_template_url = "file:///the/path/to/your/template.ods"
    styles.loadStylesFromURL(style_template_url, (prop))


End Sub
2 Likes

the Api provides also for calc:
loadStylesFromDocument()

How do I actually do it though? Is the API function there but there’s just no toolbar button for it?

1 Like