HypRetrieveNameRange
Cloud data provider types: Oracle Analytics Cloud - Essbase
On-premises data provider types: Oracle Essbase
Description
HypRetrieveNameRange refreshes the grid created by HypCreateRangeGrid. This function works only with Oracle Smart View for Office multiple-grid defined range names.
See also HypCreateRangeGrid.
Syntax
HypRetrieveNameRange (vtSheetName, vtGridName)
ByVal vtSheetName As Variant
ByVal vtGridName As Variant
Parameters
vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null
or Empty
, the active worksheet is used.
vtGridName: Input parameter; the name of the named range or grid to be refreshed. Named ranges take the form: "'<Sheetname>'!<range name>"
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Examples
Example 1
Public Declare Function HypRetrieveNameRange Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtGridName As Variant) As Long
Sub RetrieveAllRange()
'connect all required connections
sts = HypConnect("Sheet1", "UserName", "Password", "myserver_Sample_Basic")
'get list of named grids available
sts = HypGetNameRangeList("Sheet1", "", vtList)
'refresh each range one by one
For i = 0 To 2
sts = HypRetrieveNameRange("Sheet1", vtList(i))
Next i
End Sub
Example 2
If you know the name of the grid:
Public Declare Function HypRetrieveNameRange Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtGridName As Variant) As Long
Sub Example_HypRetrieveNameRange()
sts = HypRetrieveNameRange("Sheet1", "'Sheet1'!DMDemo_Basic_2")
End Sub