Library.ExtractEnterpriseData
This function explores an Enterprise Data Configuration or Run an Enterprise Analysis Configuration.
Syntax | Parameters | Return Value |
---|---|---|
Function Library.ExtractEnterpriseData( _ enterpriseObject As Variant, _ isDataConfig As Boolean, _ runSilent As Boolean, _ Optional labelCriteria As Variant, _ Optional dtCriteria As Variant, _ Optional sqlCriteria As Variant, _ Optional parameters As Variant) As Spreadsheet |
Specifies the Data Configuration (monitor) id, Analysis Configuration (profile) id, or full Enterprise path of the Enterprise object to run. Type: Variant If True, then the enterpriseObject parameter is a Data Configuration; otherwise, it is an Analysis Configuration. Type: Boolean If True, then the Data/Analysis configuration is run without UI. Type: Boolean Specifies the optional criteria for the labels when running the configuration. Type: Variant Specified the optional date/time criteria when running the configuration. Type: Variant Specifies the optional SQL criteria when running the configuration. Type: Variant Type: Variant |
Spreadsheet |
Remarks
This call will execute an Enterprise Data or Analysis Configuration, returning the resulting spreadsheet . Parameters control how to specify the configuration, if the standard Enterprise user interface is to be used, and allow you to programmatically specify any filtering criteria to be used when executing the configuration.
The date/time criterion parameter can be specified as an XML string using the following format. The <id> tag can be replaced with a <name> tag to specify the query by name if the ID is unknown.
<datetime_info> <query> <id>1</id> <datetime> <type>all</type> <count>1</count> <time_unit>day</time_unit> <from>0.0</from> <to>0.0</to> </datetime> </query> <apply_to_all>false</apply_to_all> </datetime_info>
Optionally, one could use the DateTimeCriterion object to specify the date range (see example below).
SVB Example
Extracting data from Statistica Enterprise:
Option Explicit Option Base 1 Sub Main Dim dtc As New DateTimeCriterion dtc.Type = swcRange dtc.RangeNumber = 2 dtc.RangeUnit = swcQuarter Dim ss as Spreadsheet 'Extract data from the last two quarters. Set ss = Application.ExtractEnterpriseData("\path\to\analysis config", False, False, "", dtc) ss.Visible = True End Sub