Skip to main content
September 15, 2020

How to call OS XF Excel functions from VisualBasic

  • September 15, 2020
  • 1 reply
  • 0 views
Originally posted by Darryl Gerrow

Does anyone have an example of how to use VisualBasic in Excel to call the OneStream XF functions, specifically the "Refresh Workbook" and/or "Submit Workbook" API functions?

 

Thanks,

1 reply

September 15, 2020
Originally posted by Phil Brosnan

Hi Darryl,

Something like this has worked for us to refresh formulas:

Sub RefreshOnestream()

Dim xfAddIn As COMAddIn
Set xfAddIn = Application.COMAddIns("OneStreamExcelAddIn")

If Not xfAddIn Is Nothing Then
  If Not xfAddIn.Object Is Nothing Then
    Call xfAddIn.Object.RefreshXFFunctions
  End If
End If

End Sub

There is also a knowledgebase article that lists all of the refreshes that can be called (Cube Views, Quick Views, and Formulas, for both one sheet or all sheets). The knowledgebase article is KB0010071