DataExtract Class
The DataExtract class represents a data extract query that is built from the menu option: Data Extract. The functions and properties of this class can be used to build a new data extract query, modify an existing data extract query and output the results to a worksheet.
Property Summary
- Property AdjustedDetail As AdjustedDetail
- Property DataMode As DataMode
- Property Schedule As String
- Property ShowSymbolDescription As Boolean
- Property SortOrder As SortOrder
- Property SuppressZero As Boolean
- Property VaryingDimension As String
- Property SeperateNumericAndStringValue As Boolean
Sub/Function Summary
- Sub AddSymbolSpec(symbolSpec As String)
- Sub ClearSpecs([dimensionName As String])
- Sub LoadQuery(fileName As String)
- Sub RunToWorksheet([worksheetName As String], [cell As String])
Properties
Parameter | Description |
---|---|
AdjustedDetail |
Property AdjustedDetail As AdjustedDetail Specifies whether the data query will return adjusted or unadjusted data.
|
DataMode |
Property DataMode As DataMode Specifies the type of hierarchy data to return.
|
Schedule |
Property Schedule As String Specifies the name of the schedule to include in the data query. If this property is not set, base data will be returned.
|
ShowSymbolDescription |
Property ShowSymbolDescription As String Specifies whether symbol descriptions are returned. Symbol descriptions are returned in an extra column. The default setting is FALSE. |
SortOrder |
Property SortOrder As SortOrder Sets the order in which symbols will be returned.
This is the default. |
SuppressZero |
Property SupressZero As Boolean Specifies whether rows with zero data will be returned. The default value is TRUE. |
VaryingDimension |
Property VaryingDimension As String If this property is set, symbols for the specified dimension will be displayed as columns. |
SeperateNumericAndStringValue |
Property SeperateNumericAndStringValue As Boolean Specifies whether the data that is returned should be displayed in separate numeric and string columns. The default value is FALSE. |
Subs/Functions
Parameter | Description |
---|---|
AddSymbolSpec |
Sub AddSymbolSpec(symbolSpec As String) Adds a symbol spec representing the hierarchy you wish to query. A symbol spec must be added for every base dimension.
|
ClearSpecs |
Sub ClearSpecs([dimensionName As String]) Removes all symbol specs for the specified dimension that have been added or loaded in the Data Query.
|
LoadQuery |
Sub LoadQuery(fileName As String) Loads a data extract that has been previously built and saved from the menu option: Data Extract.
|
RunToWorksheet |
Sub RunToWorksheet([worksheetName As String], [cell As String]) Runs a symbol query and places the results into the specified worksheet and cell location.
|
Sample Usage:
Sub RunDataExtract()
On Error GoTo ErrorHandler
Dim query As Longview.DataExtract Set query = New Longview. DataExtract query.AdjustedDetail = AdjustedDetail_Unadjusted query.DataMode = DataMode_CTA
query.LoadQuery “C:\MyDataExtract.lvqde”
query.ClearSpecs “Entities”
query.AddSymbolSpec “CANADA#99”
query.RunToWorksheet “MyDataExtract”, “B1”
ErrorHandler:
If Err.Number <> 0 Then
MsgBox “Unable to run Data Extract (“ & Err.Number & “) – “ & Err.Description
End If
End Sub