Returns arrays of the data and descriptions for the specified cell’s line items. Data is returned in a String array.
To return data in a Double array, use GetCellLineItems. |
<HsvData>.GetTextCellLineItems lScenario, lYear, lPeriod, lEntity, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, pvarabstrData, pvarabstrDetailsLong (ByVal). The member ID of the cell's Scenario dimension member. | |
Long (ByVal). The member ID of the cell's Year dimension member. | |
Long (ByVal). The member ID of the cell's Period dimension member. | |
Long (ByVal). The member ID of the cell's Entity dimension member. | |
Long (ByVal). The member ID of the cell's Account dimension member. Use HsvAccounts.UsesLineItems to check whether an account supports line items. | |
Long (ByVal). The member ID of the cell's Intercompany Partner dimension member. | |
Long (ByVal). The member ID of the cell's Custom 1 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 2 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 3 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 4 dimension member. | |
Variant. Returns an array of Strings that contain the line item data. | |
Variant. Returns an array of Strings that contain the line item descriptions. |
This example prints a cell’s line item descriptions and data to Visual Basic’s Immediate window. The example assumes the variables passed to GetTextCellLineItems have been set to the cell’s member IDs, and uses UsesLineItems to test whether the cell’s Account dimension member supports line items. If line items are supported, the cell’s descriptions and data are printed.
Dim bLineItems As Boolean, cAccounts As HsvAccounts
Dim vaData, vaDescs, cData As HsvData
'g_cSession is an HsvSession object reference
Set cData = g_cSession.Data
'g_cMetadata is an HsvMetadata object reference
Set cAccounts = g_cMetadata.Accounts
'Exit if the account does not support line items
cAccounts.UsesLineItems lAcct, bLineItems
If bLineItems = False Then Exit Sub
cData.GetTextCellLineItems lScen, lYr, lPer, lEnt, lAcct, _
lICP, lCust1, lCust2, lCust3, lCust4, vaData, vaDescs
' Make sure the cell is not empty
If IsArray(vaData) = True Then
For i = LBound(vaData) To UBound(vaData)
Debug.Print vaDescs(i) & ": " & vaData(i) & vbCrLf
Next i
End If