SetTextCells

Inserts data into cells. The cells’ data is passed in a String array. SetTextCells also enables you to scale the data that is passed.

SetTextCells takes arrays of dimension member IDs as arguments, as well as an array of data for the cells to be set. These arrays must contain identical numbers of elements. The elements of the member ID arrays have a one-to-one correspondence to the elements of the data array; the first elements of the member ID arrays define the first cell to be set, the second elements of the member ID arrays define the second cell to be set, and so on.

Tip:

To pass data into cells with a Double array, use SetCells instead of SetTextCells. For more information, see SetCells.

Syntax

<HsvData>.SetTextCells varalScenario, varalYear, varalPeriod, varalView, varalEntity, varalParent, varalValue, varalAccount, varalICP, varalCustom1, varalCustom2, varalCustom3, varalCustom4, varabstrData, sScale

Argument

Description

varalScenario

Long array (ByVal). The member IDs of the cells' Scenario dimension members.

varalYear

Long array (ByVal). The member IDs of the cells' Year dimension members.

varalPeriod

Long array (ByVal). The member IDs of the cells' Period dimension members.

varalView

Long array (ByVal). The member IDs of the cells' View dimension members.

varalEntity

Long array (ByVal). The member IDs of the cells' Entity dimension members.

varalParent

Long array (ByVal). The member IDs of the parents of the varalEntity argument's entities.

varalValue

Long array (ByVal). The member IDs of the cells' Value dimension members.

varalAccount

Long array (ByVal). The member IDs of the cells' Account dimension members.

varalICP

Long array (ByVal). The member IDs of the cells' Intercompany Partner dimension members.

varalCustom1

Long array (ByVal). The member IDs of the cells' Custom 1 dimension members.

varalCustom2

Long array (ByVal). The member IDs of the cells' Custom 2 dimension members.

varalCustom3

Long array (ByVal). The member IDs of the cells' Custom 3 dimension members.

varalCustom4

Long array (ByVal). The member IDs of the cells' Custom 4 dimension members.

varabstrData

String array (ByVal). The data to be inserted in the cells. The elements in this array correspond to the elements in the other arguments. For example, the fourth element in this array is inserted in the cell defined by the member IDs in the fourth elements of the other arguments’ arrays.

sScale

Integer (ByVal). Indicates the degree of scaling to apply to the varabstrData argument’s amounts. To leave the amounts unscaled, pass 0. To scale the amounts, each whole-number increment over 0 scales by ten. In other words, passing 1 scales by ten, passing 2 scales by a hundred, and so on.

To apply the application’s default scaling, pass the HFMConstants type library constant DEFAULT_SCALE, described in Number Defaults Constants.

Example

The following subroutine inserts data into cells, scaling the data by ten. The cells’ dimension members and data are passed in the subroutine’s arguments.

Sub setCellsScaledByTen(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, saData() As String)
Dim cData As HsvData
'g_cSession is an HsvSession object reference
Set cData = g_cSession.Data
cData.SetTextCells laScen, laYear, laPer, laView, laEnt, _
    laPar, laVal, laAcct, laICP, laCust1, laCust2, laCust3, _
    laCust4, saData, 1
End Sub