HypExecuteCalcScriptString

Data provider types: Oracle Essbase

Description

HypExecuteCalcScriptString () executes a calculation script along with substitution variables.

Description

HypExecuteCalcScriptString () executes a calculation script, including any substitution variables.

Use with HypGetCalcScript.

This function requires Oracle Hyperion Provider Services 11.1.2.4.017 or higher.

Syntax

HypExecuteCalcScriptString (vtSheetName, vtCalcScript, vtSubstitutionVarList)

ByVal vtSheetName As Variant

ByVal vtCalcScript As Variant

ByVal vtSubstitutionVarList As Variant

Parameters

vtSheetName: Input parameter; the name of worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used, and the data source of the given sheet name will be used for connection.

vtCalcScript: Input parameter; the calculation script string being executed.

vtSubstitutionVarList: Input parameter; the list of substitution variables to be used during execution.

Return Value

Returns 0 if successful; otherwise, returns the appropriate error code.

Example

Sub calcScrVBATest2()
Script = "SET RUNTIMESUBVARS{salesNum =400;_mySales=300;myRTVar=@CHILDREN(~100~);myCOGS=30;};FIX (@INTERSECT(@CHILDREN(~100~), ~100-10~)) Sales = &_mySales;COGS=555;ENDFIX;"

Script = Replace(Script, Chr(126), Chr(34)) ‘replace ~ with “

Param = "_mySales=222;"

HypExecuteCalcScriptString("Sheet1", Script, Param)

End Sub