Forum Discussion

MarcusH's avatar
MarcusH
Valued Contributor
21 days ago

Automate Excel workbook refresh

We have an Excel workbook with a *lot* of embedded cube views and table views. Some sheets have two Cube Views with Excel formulas showing significant differences. Others have stacked Cube Views showing Import, IFRS Adjustments and Total. We cannot use Books because of this. It takes about an hour to refresh the workbook so we want to automate the refresh somehow.

Anyone have any suggestions about how to automate the refresh?

Thanks

Marcus

1 Reply

  • BenEppel's avatar
    BenEppel
    New Contributor III

    I have done this using VBA. Below is an example, the design and reference guide has the available subroutines like RefreshCubeViewsForActiveWorkSheet or RefreshCubeViews.  If you cant pull everything in one refresh, you can loop through each sheet and call the Refresh for the active sheet. I am not sure if this is doable for table views though.

    Sub RefreshXFFunctions()
    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