Score:4

Reload sheet in LibreOffice Calc

cn flag

I am editing a LibreOffice Calc sheet using another program while keeping the sheet open in LibreOffice Calc. Is it possible to refresh LibreOffice Calc so it shows the changes?

ar flag
Which version and distro of Linux are you using?
Score:2
ca flag

First, you have to create a new macro that reloads the content of the sheet by following these steps:

  1. Open LibreOffice Calc.

  2. Go to ToolsMacrosOrganize MacrosBasic...

  3. In the window that open, expand My Macros, select Standard, and click New.

  4. In the window that opens paste the following (found here):

    Sub SilentlyReload
        ThisComponent.setModified(False)  'Ignore changes'
        document = ThisComponent.CurrentController.Frame
        dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
        dispatcher.executeDispatch(document, ".uno:Reload", "", 0, Array())
    End Sub
    
  5. Press Ctrl+S to save the macro and close the window.


Now try to see if the macro works:

  1. Change the content of a file outside of LibreOffice Calc, while having LibreOffice Calc open.

  2. Go to ToolsMacrosRun Macro...

  3. In the window that opens expand My Macros, expand Standard, select Module 1 and click Run.


Finally, if the macro works and the content is reloaded, you can add it to a shortcut as follows:

  1. Go to ToolsCustomize...

  2. In the window that opens, select the shortcut you wish to use for the macro, for example F3, in the Shortcut Keys section.

  3. In the Category section select LibreOffice MacrosMy Macros, expand Standard, select Module 1.

  4. In the Function section select SilentlyReload.

  5. Click Modify and then OK.

You should now be able to reload your LibreOffice Calc sheet by pressing the F3 key.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.