Ask Your Question
0

How to reload file via macro on Calc

asked 2018-03-01 04:56:22 +0200

thomehhh gravatar image

Does anybody knows how to reload the active file from the last time it was saved, using macro, in libreoffice Calc? It would be something like clicking on File -> Refresh, but this time without the confirmation window. Thanks in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2018-03-01 16:44:26 +0200

Jim K gravatar image

updated 2018-03-01 16:46:25 +0200

Reloading is easy. The trick is to ignore changes, and a simple solution is given at http://ooo-forums.apache.org/en/forum....

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

See also http://openoffice.2283327.n4.nabble.c....

edit flag offensive delete link more
0

answered 2019-03-04 09:04:47 +0200

fofi2k gravatar image

Hello how i can add this Macro to my "LibreOffice 5 - Calc" and run it every 10min?

edit flag offensive delete link more

Comments

Answers should be answers, not questions. See guidelines for asking.

Jim K gravatar imageJim K ( 2019-04-10 17:56:02 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-03-01 04:56:22 +0200

Seen: 333 times

Last updated: Mar 04