vbscript HFM元数据的市场层次结构

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript HFM元数据的市场层次结构相关的知识,希望对你有一定的参考价值。

Sub BuildHierarchyMarket()
	Dim RowId As Long
	Dim ColId As Long
	Dim ColLevel As Long
	Dim ColIsBase As Long
	Dim ColOffset As Long
	Dim ColOffsetName As Long
	Dim ParentCode(64) As String
	ColOffsetName = 56
	' Column A contains the account level in hierarchy
	ColLevel = 1
	' Column B identifies if the account is base  / leaf in hierarchy
	ColIsBase = 2
	' Column D is the first containing account codes
	ColOffset = 3
	' ColId = ActiveCell.Column
	' For RowId = ActiveCell.Row To Rows.Count
	For RowId = 3 To 310
		ColId = ColOffset + Cells(RowId, ColLevel).Value
		' Cells(RowId, ColId).Select
		ParentCode(ColId) = Cells(RowId, ColId).Value
		Cells(RowId, 100).Value = ParentCode(ColId - 1)
		Cells(RowId, 101).Value = Cells(RowId, ColId)
		Cells(RowId, 102).Value = Cells(RowId, ColIsBase)
		Cells(RowId, 103).Value = Cells(RowId, ColOffsetName)
		'If Not IsEmpty(Cells(RowId, ColId).Value) Then
		'    Cells(RowId, ColId).Font.Color = vbGreen
		'End If
	Next RowId
End Sub

以上是关于vbscript HFM元数据的市场层次结构的主要内容,如果未能解决你的问题,请参考以下文章

vbscript HFM元数据的帐户层次结构

vbscript 来自HFM元数据的实体NO层次结构

MDX 计算成员不允许多个层次结构元组

vbscript 以安全的方式从页面获取属性或元数据(因此,如果元数据不存在,则不会丢失)。在这个例子中,我们是替换

主数据项目实施方法与核心步骤

vbscript 多层次“智能”关键字搜索(VBS)