Returns the data in a cell in a String data type. GetTextCell also returns the cell’s status, and provides arguments to specify the returned data’s scale and decimal precision.
To return a cell’s data as a Double data type, use GetCell instead of GetTextCell. |
<HsvData>.GetTextCell lScenario, lYear, lPeriod, lView, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, sNumDecimals, sScale, pbstrData, plStatus
Long (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 View dimension member. | |
Long (ByVal). The member ID of the cell's Entity dimension member. | |
Long (ByVal). The member ID of the parent of the lEntity argument's entity. | |
Long (ByVal). The member ID of the cell's Value dimension member. | |
Long (ByVal). The member ID of the cell's Account dimension member. | |
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. | |
Integer (ByVal). The number of decimal places that the pbstrData argument’s return value will contain. To use the application’s default number of decimals, pass the HFMConstants type library constant DEFAULT_NUM_DECIMALS, described in Number Defaults Constants. | |
Integer (ByVal). The degree of scaling to be applied to the pbstrData argument’s return value. Rules for this argument are described below:
| |
Long. Returns the cell’s status. For details on cell statuses, see About Cell Statuses. |
The following subroutine populates two Label controls with a cell’s data and status. The subroutine takes the member IDs of the cell’s dimension members. The cell status string is obtained by passing the status Long returned by GetTextCell to FormatStatusToText.
Sub fillCellLabels(lScen As Long, lYear As Long, lPer As Long, _ lView As Long, lEnt As Long, lPar As Long, lVal As Long, _ lAcct As Long, lICP As Long, lCust1 As Long, lCust2 As Long, _ lCust3 As Long, lCust4 As Long) Dim cData As HsvData, sData As String, lStatus As Long Dim sStatus As String 'g_cSession is an HsvSession object reference Set cData = g_cSession.Data cData.GetTextCell lScen, lYear, lPer, lView, lEnt, lPar, _ lVal, lAcct, lICP, lCust1, lCust2, lCust3, lCust4, _ DEFAULT_NUM_DECIMALS, DEFAULT_SCALE, sData, lStatus sStatus = cData.FormatStatusToText(lStatus) 'Populate the labels lblData.Caption = sData lblStatus.Caption = sStatus End Sub