Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

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

ParameterDescription

AdjustedDetail

Property AdjustedDetail As AdjustedDetail

Specifies whether the data query will return adjusted or unadjusted data.

  • AdjustedDetail_Adjusted – return adjusted data. This is the default.
  • AdjustedDetail_Unadjusted – return unadjusted data.

DataMode

Property DataMode As DataMode

Specifies the type of hierarchy data to return.

  • DataMode_All – Return all types of data. This is the default.
  • DataMode_CTA – Return Cumulative Translation Adjustment data only.
  • DataMode_Leaf – Return data for leaf cells only.

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.

  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown if the specified schedule name is invalid.

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.

  • SortOrder_Alphabetically– Return symbols sorted in alphabetical order.
  • SortOrder_Hierarchically – Return symbols as defined by their hierarchy order.

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.

  • Parameters: symbolSpec – String representing a single symbol spec. For example: TRIALBAL#99.
  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the symbol spec is invalid.

ClearSpecs

Sub ClearSpecs([dimensionName As String])

Removes all symbol specs for the specified dimension that have been added or loaded in the Data Query.

  • Parameters: dimensionName – Optional string representing the dimension in which to clear.  If no dimension is specified, specs will be cleared for all dimensions.
  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the specified dimension name is invalid.

LoadQuery

Sub LoadQuery(fileName As String)

Loads a data extract that has been previously built and saved from the menu option: Data Extract.

  • Parameters: filename  – String representing the full path to the query file to load. For example: C:\SymbolQuery.lvqsq.
  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the file cannot be loaded.

RunToWorksheet

Sub RunToWorksheet([worksheetName As String], [cell As String])

Runs a symbol query and places the results into the specified worksheet and cell location.

  • Parameters:

    worksheetName  – Optional string representing the name of the worksheet to place the results.  If the worksheet does not exist, it will be created.  If the worksheetName parameter is not specified, the current worksheet will be used.

    cell – Optional string representing the cell location to begin the symbol query. If the cell parameter is not specified, the default cell location A1 will be used.

  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the query is invalid or when the specified worksheet name or cell are invalid.

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

Published:

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

ParameterDescription

AdjustedDetail

Property AdjustedDetail As AdjustedDetail

Specifies whether the data query will return adjusted or unadjusted data.

  • AdjustedDetail_Adjusted – return adjusted data. This is the default.
  • AdjustedDetail_Unadjusted – return unadjusted data.

DataMode

Property DataMode As DataMode

Specifies the type of hierarchy data to return.

  • DataMode_All – Return all types of data. This is the default.
  • DataMode_CTA – Return Cumulative Translation Adjustment data only.
  • DataMode_Leaf – Return data for leaf cells only.

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.

  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown if the specified schedule name is invalid.

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.

  • SortOrder_Alphabetically– Return symbols sorted in alphabetical order.
  • SortOrder_Hierarchically – Return symbols as defined by their hierarchy order.

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.

  • Parameters: symbolSpec – String representing a single symbol spec. For example: TRIALBAL#99.
  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the symbol spec is invalid.

ClearSpecs

Sub ClearSpecs([dimensionName As String])

Removes all symbol specs for the specified dimension that have been added or loaded in the Data Query.

  • Parameters: dimensionName – Optional string representing the dimension in which to clear.  If no dimension is specified, specs will be cleared for all dimensions.
  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the specified dimension name is invalid.

LoadQuery

Sub LoadQuery(fileName As String)

Loads a data extract that has been previously built and saved from the menu option: Data Extract.

  • Parameters: filename  – String representing the full path to the query file to load. For example: C:\SymbolQuery.lvqsq.
  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the file cannot be loaded.

RunToWorksheet

Sub RunToWorksheet([worksheetName As String], [cell As String])

Runs a symbol query and places the results into the specified worksheet and cell location.

  • Parameters:

    worksheetName  – Optional string representing the name of the worksheet to place the results.  If the worksheet does not exist, it will be created.  If the worksheetName parameter is not specified, the current worksheet will be used.

    cell – Optional string representing the cell location to begin the symbol query. If the cell parameter is not specified, the default cell location A1 will be used.

  • Errors: ErrorCode.INVALID_PARAMETER – This error is thrown when the query is invalid or when the specified worksheet name or cell are invalid.

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

For an optimal Community experience, Please view on Desktop