HypDeleteMetaData

Data provider types: Oracle Essbase, Oracle Hyperion Planning, Oracle Planning and Budgeting Cloud, Oracle Hyperion Financial Management, Oracle Hyperion Reporting and Analysis

Description

HypDeleteMetaData() deletes Oracle Smart View for Office metadata from the workbook in any of three modes:

  • Mode 1—Delete all Smart View metadata only from 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, vtbClearMetadataOnAllSheetsWithinWorkbook)

vtDispObject As Variant

vtbWorkbook As Variant

vtbClearMetadataOnAllSheetsWithinWorkbook As Variant

Parameters

vtDispObject: Dispatch object of worksheet or workbook that indicates where to delete metadata. If Null is passed, then vtbWorkbook determines the active worksheet or active workbook and will be operated upon.

vtbWorkbook: Boolean. Indicates 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. Specifies that Smart View metadata should be deleted from all sheets within the workbook. Used only if vtbWorkbook is True.

Return Value

Returns 0 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 Example_HypDeleteMetaData()
        Dim Ret As Long
        Dim Workbook As Workbook
        Dim Sheet As Worksheet

        Set Workbook = ActiveWorkbook
        Set Sheet = ActiveSheet

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

        MsgBox   (Ret)

End Sub