HypUIConnect

Describes the Oracle Smart View for Office VBA function, HypUIConnect.

Cloud data provider types: Oracle Essbase, Planning, Planning Modules, Financial Consolidation and Close, Tax Reporting

On-premises data provider types: Oracle Essbase, Oracle Hyperion Planning, Oracle Hyperion Financial Management, Oracle Business Intelligence Enterprise Edition

Description

On-premises data sources: For on-premises data sources, HypUIConnect() prompts the user with the Connect to Data Source dialog box when the user name and password are not provided. It does not prompt if the user name and password are already provided.

Cloud data sources and on-premises form-based authentication: For cloud data sources and for on-premises sources using form-based authentication, you must use the HypUIConnect VBA function to connect to an existing private connection. HypUIConnect() always prompts for authentication where the user must provide the user name, password, and domain to log in.

HypUIConnect() can be used in two ways:

  • Using a friendly connection name.

    The friendly connection name is first created using HypCreateConnection.

  • Using a connection string, in the place of a friendly name, consisting of URL, server, application, database name.

Syntax

HypUIConnect (vtSheetName, vtUserName, vtPassword, vtFriendlyName)

ByVal vtSheetName As Variant

ByVal vtUserName As Variant

ByVal vtPassword As Variant

ByVal vtFriendlyName As Variant

Parameters

vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.

vtUserName: A valid user name

vtPassword: The password for this user

vtFriendlyName: The connection name of the data provider. The friendly name parameter can accept either of the following:

  • A connection name created using HypCreateConnection

  • A connection string consisting of a URL, server name, application name, and database name, in the format URL|server|app|db.

    The URL component of the connection string follows the guidelines in Private Connection URL Syntax in the Oracle Smart View for Office User's Guide.

Return Value

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

Example

In this example, we connect to the Essbase Sample application, Basic database, with the friendly name of "My Sample Basic."

Public Declare PtrSafe Function HypUIConnect Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtFriendlyName As Variant) As Long

HypUIConnect("Empty", "UserName", "Password", "My Sample Basic")

Essbase Example Using a Connection String

In this example, we connect to the Essbase Sample application, Basic database.

HypUIConnect("Sheet1", "UserName", "Password", "http://hostname:19000/aps/SmartView|servername|Sample|Basic")

Planning Example Using a Connection String

In this example, we connect to the Planning Vision application, Plan1 database.

HypUIConnect("Sheet1", "UserName", "Password", "http://hostname.com:9000/HyperionPlanning/SmartView|servername|Vision|Plan1")

Financial Management Example Using a Connection String

In this example, we connect to the Financial Management STATJP4 application.

HypUIConnect("Sheet1", "UserName", "Password", "http://hostname.com:19000/hfmadf/officeprovider|<servername>|STATJP4|STATJP4")

Note that for Financial Management, the db component can be empty; for example:

HypUIConnect("Sheet1", "UserName", "Password", "http://hostname.com:19000/hfmadf/officeprovider|<servername>|STATJP4|")