Refresh - FXLData

From Fusion Registry Wiki
Jump to navigation Jump to search

Refresh

Microsoft 365 Excel and dynamic array formulas

Interactive

FXLData functions by default work as dynamic array formulas in Microsoft 365 so are refreshed using the normal Excel calculation rules:

Refresh occurs when:

  • a change is made to the formula
  • a change is made to something the formula depends upon such as an argument value held in another cell
  • Excel is forced to recalculate open workbooks using CTRL+ALT+F9 or CTRL+ALT+SHIFT+F9
  • a saved workbook is opened

Sign.png The Refresh options on the FXLData ribbon do not refresh dynamic array formulas.

From Code

Refreshing FXLData from VBA, C# or C code uses the standard Excel API calculation functions, for instance:

  • VBA: ActiveSheet.Calculate
  • C API: xlcCalculateDocument()

Office 2010-2019 Excel and Microsoft 365 Excel working in legacy Mode

Interactive

FXLData Excel ribbon

In older versions of Office Excel and when forcing legacy mode in Microsoft 365 using the @ implicit intersection operator, FXLData functions can be manually refreshed using the Refresh options on the ribbon bar.

  • Refresh Selected: refreshes the FXLData function at the current active cell
  • Refresh Sheet: refreshes all FXLData functions on the current work sheet
  • Refresh Book: refreshes all FXLData functions in the work book
Using Refresh in Legacy mode

From Code

The FXLData add-in exposes three public sub-routines to trigger a refresh from VBA code.

Sign.png A reference to FXLDataAddin must be added to the VBA project.

Macro Example 1 - Refresh the FXLData function in the current active cell

Public Sub myMacro()
   FXLDataRefreshActiveCell
End Sub

Macro Example 2 - Refresh all FXLData functions in the workbook

Public Sub myMacro()
   FXLDataRefreshWorkbook
End Sub

Macro Example 3 - Refresh all FXLData functions in the current sheet

Public Sub myMacro()
   FXLDataRefreshSheet
End Sub

Macro Example 4 - Refresh the FXLData function in the specified cell

Public Sub myMacro()
   FXLDataRefreshCell Range("C4")
End Sub