Returns the data and statuses of cells. GetCells returns the cells’ data in one array and the statuses in a second array. The array containing the cells’ data is returned as a Double.
GetCells takes arrays of dimension member IDs as arguments; these arrays must contain identical numbers of elements. The elements of these arrays have a one-to-one correspondence to the elements of the arrays that are returned; the first elements of the member ID arrays define the first cell to be returned, the second elements of the member ID arrays define the second cell to be returned, and so on.
To return cells’ data in a Variant array, use GetTextCells instead of GetCells. To filter out cells that contain no data, zero, derived data, or that consist of invalid intersections, use GetCellsWithRowSuppression. |
<HsvData>.GetCells varalScenario, varalYear, varalPeriod, varalView, varalEntity, varalParent, varalValue, varalAccount, varalICP, varalCustom1, varalCustom2, varalCustom3, varalCustom4, pvaradData, pvaralStatus
Long array (ByVal). The member IDs of the cells' Scenario dimension members. | |
Long array (ByVal). The member IDs of the cells' Year dimension members. | |
Long array (ByVal). The member IDs of the cells' Period dimension members. | |
Long array (ByVal). The member IDs of the cells' View dimension members. | |
Long array (ByVal). The member IDs of the cells' Entity dimension members. | |
Long array (ByVal). The member IDs of the parents of the varalEntity argument's entities. | |
Long array (ByVal). The member IDs of the cells' Value dimension members. | |
Long array (ByVal). The member IDs of the cells' Account dimension members. | |
Long array (ByVal). The member IDs of the cells' Intercompany Partner dimension members. | |
Long array (ByVal). The member IDs of the cells' Custom 1 dimension members. | |
Long array (ByVal). The member IDs of the cells' Custom 2 dimension members. | |
Long array (ByVal). The member IDs of the cells' Custom 3 dimension members. | |
Long array (ByVal). The member IDs of the cells' Custom 4 dimension members. | |
Variant array. Returns the data in the cells. The array items are returned as a Double subtype. | |
Variant array. Returns the cells’ statuses. For details on cell statuses, see About Cell Statuses. |
The following subroutine populates a ListBox controls with the data and status of the cells specified with the subroutine’s arguments. The cell status strings are obtained by passing the status Longs returned by GetCells to FormatStatusToText.
Sub fillCellsLists(laScen() As Long, laYear() As Long, laPer() As Long, _ laView() As Long, laEnt() As Long, laPar() As Long, laVal() As Long, _ laAcct() As Long, laIcp() As Long, laCust1() As Long, _ laCust2() As Long, laCust3() As Long, laCust4() As Long) Dim cData As HsvData, vaData, vaStatus 'g_cSession is an HsvSession object reference Set cData = g_cSession.Data cData.GetCells laScen, laYear, laPer, laView, laEnt, _ laPar, laVal, laAcct, laIcp, laCust1, laCust2, laCust3, _ laCust4, vaData, vaStatus 'Populate the list box For i = LBound(vaData) To UBound(vaData) lstDataStatus.AddItem vaData(i) & " - " & _ cData.FormatStatusToText(vaStatus(i)) Next i End Sub