Returns the data for a cell, given the indexes that identify the cell. GetDataAtIndex also indicates whether the cell is null, and returns the member IDs of the cell’s View, Account, Intercompany Partner, and Custom dimension members.
<HsvMDDataBufferLite>.GetDataAtIndex lCubeIndex, lPeriodIndex, lCellIndex, plView, plAccount, plICP, plCustom1, plCustom2, plCustom3, plCustom4, pdData, pvbIsNoData
The following example loops through the cells in an HsvMDDataBufferLite object and prints each cell’s data to Visual Basic’s Immediate window. The example assumes that the object has previously been filled with data. BeginEnumeration locks the object and returns the number of subcubes in the object. The loops then works as follows:
For each subcube, GetNumPeriodsInCubeForData gets the number of periods with cells that contain data.
For each period in a subcube, GetNumCellsForData gets the number of cells that contain data.
For each cell that contains data, GetDataAtIndex gets the data, which is then printed to the Immediate window.
EndEnumeration then unlocks the HsvMDDataBufferLite object.
Dim lNumCubes As Long, lNumPers As Long, lNumCells As Long Dim lVw As Long, lAccount As Long, lIntCo As Long Dim lCus1 As Long, lCus2 As Long, lCus3 As Long, lCus4 As Long Dim dMdData As Double, bMdNoData As Boolean m_cMDBufferLite.BeginEnumeration lNumCubes For i = 0 To lNumCubes - 1 m_cMDBufferLite.GetNumPeriodsInCubeForData i, lNumPers For j = 0 To lNumPers - 1 m_cMDBufferLite.GetNumCellsForData i, j, lNumCells For k = 0 To lNumCells - 1 m_cMDBufferLite.GetDataAtIndex i, j, k, lVw, lAccount, _ lIntCo, lCus1, lCus2, lCus3, lCus4, dMdData, bMdNoData Debug.Print dMdData Next k Next j Next i m_cMDBufferLite.EndEnumeration