是否可以在计时器上自动重新计算所有单元格(即 Ctrl+Shift+F9 功能)?

Is it possible to recalculate all cells (i.e. Ctrl+Shift+F9 function) automatically on a timer?

我编写了访问容易定期更改的 off-sheet 数据的函数。按 Ctrl+Shift+F9 会刷新这些单元格,而单独按 F9 则不会。有没有办法自动刷新此数据 - 比如,每分钟一次?

运行 办公软件 4.4.3.2 好的,如果您愿意,可以将 link 用于另一个 sheet 中的值。 创建名称范围 insert->names->define

Sub recalc_timer
 document   = ThisComponent.CurrentController.Frame
  switch_on = ThisComponent.NamedRanges("switched_on").ReferredCells.getCellByPosition(0,0)
 dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

 rem value must be more than 0 to hold while condition

 while switch_on.getValue()>0

 dispatcher.executeDispatch(document, ".uno:CalculateHard", "", 0,   Array())
 rem wait time in milliseconds
 wait 3000
 wend
End Sub

*附带条件

重要提示:部分​​功能可能不会更新。请测试https://help.libreoffice.org/Calc/Recalculate