HypCreateRangeGrid
Describes the Oracle Smart View for Office VBA function, HypCreateRangeGrid.
Data provider types: Oracle Essbase
Description
HypCreateRangeGrid() enables users to refresh multiple selected or named ranges of cells in a multiple-grid worksheet. You can also use it to add a grid in the selected range if there is not already a grid in the particular location, thus creating a multiple-grid sheet. If the ranges specified for this function contain more rows or columns than the actual grid has, the additional rows and columns are treated as comments and are thus part of the grid.
Users can refresh selected continuous cell ranges from more than one grid in a multiple-grid worksheet. HypCreateRangeGrid can also be used to create a multiple-grid sheet, as shown in Example: Creating and Refreshing a Multiple-grid Sheet. Once the user runs HypCreateRangeGrid, the sheet becomes a multiple-grid ad hoc sheet.
To refresh selected continuous cell ranges from a single-grid worksheet, use HypRetrieveRange.
Syntax
HypCreateRangeGrid(vtSheetName,vtRange,vtFriendlyName)
ByVal vtSheetName As Variant
ByVal vtRange As Variant
ByVal vtFriendlyName As Variant
Parameters
vtSheetName: The name of the worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.
vtRange: The continuous ranges to be refreshed. Each range must contain one or more member cells as well as data cells. If vtRange is Null, the entire worksheet is refreshed, and GetUsedRange is used on the worksheet specified to get the ranges to be refreshed.
vtFriendlyName: The friendly name of the connection to be used to refresh the ranges. If set to Null, the active connection associated with the worksheet is used to refresh the ranges on that worksheet. If no connection is associated, an error is returned.
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Example: Creating and Refreshing a Multiple-grid Sheet
This example assumed that the required data sources are already connected.
Sub Example_CreateMultiGrid
'create sample-basic range grid
sts = HypCreateRangeGrid (Empty, range("E11:F13"), "SampleBasic1")
'create demo-basic range grid
sts = HypCreateRangeGrid (Empty, range("E17:G20"), "DemoBasic1")
End Sub
Once the grids are created, HypCreateRangeGrid can be called to refresh selected ranges in grids in the sheet one at a time. Additionally, HypCreateRangeGrid can be used to refresh all grids in the sheet.