48.4 Running TreeAge Pro Analyses from Excel
If you have a model connected to Excel for inputs and outputs, you may also want to run TreeAge Pro analyses from within Excel. This section explains how to do this.
NOTE: Whilst the end-user will be able to run the model from Excel, TreeAge Pro must be active on the computer, and the appropriate model should be open.
In the previous sections in this Chapter, the Bilinks Example model MarkovCancerDecision_BiLinks.trex has all its numeric values populated from Excel via Bilinks, and TreeAge analysis outputs are sent to Excel. This section will start with the same model and describe how run an analysis from Excel rather than TreeAge.
Read the previous sections for more details about connecting a TreeAge model to Excel via Bilinks.
Setup the Stored Analysis for Execution from Excel
Before you can setup Excel to run a TreeAge Pro analysis, you first need to save it in your model as a Stored Analysis. Here, we will run the Rankings report (analysis) and save it as a Stored Analysis for execution from Excel.
-
Open the Example model MarkovCancerDecision_Bilinks.trex
-
Select the Root node.
-
Choose Analysis > Rankings from the menu.
-
Choose Analysis > Stored Analysis from the menu.
-
Click the Save Analysis button.
-
Simplify the name to “Rankings”, then click OK.
-
Click Apply and Close.
Any TreeAge Pro analysis can be saved as a Stored Analysis and executed from Excel. Refer to the Stored Analysis chapter for further details.
For execution from Excel, you will likely focus on base case results via Rankings for a cohort model, or running Microsimulation for a patient level simulation model.
Add a button in Excel to run TreeAge Pro Analyses
Now that you have a Stored Analysis, you can create a button in Excel to execute that analysis back in TreeAge Pro.
Before you add a TreeAge Pro analysis button in Excel, you must have the appropriate TreeAge Pro model as the “active” tab within the application window.
We will demonstrate this technique using an example model which already has a stored analysis created.
-
Open the Bilinks Example Model MarkovCancerDecision_StoredAnalysis.trex. The model should be the active tab in TreeAge (usually the top left pane).
-
Open the corresponding Excel workbook MarkovCancerDecision_inputs_and_outputs.xlsx from the same examples folder. This Excel workbook already contains inputs/outputs for the TreeAge Pro model.
-
In Excel, select the Model Outputs worksheet.
-
Click in the worksheet where you want to place the analysis button
-
Within Excel, select the TreeAge Add-Ins tab, and choose the Stored Analyses option.
-
In the dialogue, select the stored analysis Rankings.
-
Uncheck the box “Open Report”. This will enure you only show results in Excel and not within TreeAge Pro. Leave it checked to show the results in TreeAge Pro, if required.
-
Click Assign Button.
-
Click the new button in Excel to run the Rankings analysis in TreeAge Pro. New results will be sent from TreeAge Pro back to Excel.
-
To test, change a value on the input sheet, then return to the output sheet and click the button again to see new results.
To edit/move the Excel button:
-
Right-click on the button.
-
Edit button text, text size and font etc.
-
Click-drag the button to move it.