HypDeleteMetadata

Data source types: Essbase, Planning, Financial Management, Hyperion Enterprise, Oracle's Hyperion Reporting and Analysis

Description

HypDeleteMetadata() deletes Smart View metadata from the workbook in any of three modes:

  • Mode 1 - Delete all Smart View metadata only for the provided worksheet storage

  • Mode 2 - Delete all Smart View metadata only from the provided workbook storage

  • Mode 3 - Delete all Smart View metadata from the provided workbook storage and from all the worksheets’ storage

Syntax

HypDeleteMetadata(vtDispObject, vtbWorkbook, vtbClearMetadataOnAllSheets)

vtDispObject As Variant

vtbWorkbook As Variant

vtbClearMetadataOnAllSheetsWithinWorkbook AsVariant

Parameters

vtDispObject: Dispatch object of worksheet or workbook indicating where to delete metadata. If NULL is passed, the vtbWorkbook flag will determine the active worksheet or active workbook and will be operated upon.

vtbWorkbook: Boolean flag indicating that you passed worksheet dispatch or workbook dispatch. If NULL is passed in vtDispObject, then this flag will determine that the user wants to delete metadata from active worksheet or active workbook.

vtbClearMetadataOnAllSheetsWithinWorkbook: Boolean flag indicating that if Smart View metadata should be deleted from all sheets within the workbook. This flag is used only if vtbWorkbook flag is True.

Return Value

Returns SS_OK if successful; otherwise, returns the appropriate error code.

Example

Public Declare Function HypDeleteMetaData Lib "HsAddin" (ByVal vtDispObject As Variant, _
ByVal vtbWorkbook As Variant, _
ByVal vtbClearMetadataOnAllSheetsWithinWorkbook As Variant) As Long

Sub TestDeleteMetadata()
	Dim oRet As Long
	Dim oWorkbook As Workbook
	Dim oSheet As Worksheet

	Set oWorkbook = ActiveWorkbook
	Set oSheet = ActiveSheet

	oRet = HypDeleteMetaData(oSheet, False, True)      ‘ Mode 1
	'oRet = HypDeleteMetaData(oWorkbook, True, False)  ‘ Mode 2
	'oRet = HypDeleteMetaData(oWorkbook, True, True)   ‘ Mode 3

	MsgBox	 (oRet)

End Sub