DocumentHost.DataSet

This property is read only.

Syntax Parameters Return value
ReadOnly Property DocumentHost.DataSet( _
    Optional VarNamesRow As Integer = -1, _
    Optional CaseNamesCol As Integer = -1, _
    Optional DataRowStart As Integer = -1, _
    Optional DataColStart As Integer = -1, _
    Optional DataRowEnd As Integer = -1, _
    Optional DataColEnd As Integer = -1, _
    Optional VariableTypesArray As Variant, _
    Optional VariableWidthArray As Variant, _
    Optional VariableFormatsArray As Variant) As InputSpreadsheet
  • VarNamesRow [in, optional]

    The row to retrieve the variable names.

    Type: Integer

    Default value: -1

  • CaseNamesCol [in, optional]

    The column to retrieve the case names (-1 to not import case names).

    Type: Integer

    Default value: -1

  • DataRowStart [in, optional]

    The first row in the Excel file that represents the data.

    Type: Integer

    Default value: -1

  • DataColStart [in, optional]

    The first column in the Excel file that represents the data.

    Type: Integer

    Default value: -1

  • DataRowEnd [in, optional]

    The last row in the Excel file that represents the data.

    Type: Integer

    Default value: -1

  • DataColEnd [in, optional]

    The last column in the Excel file that represents the data.

    Type: Integer

    Default value: -1

  • VariableTypesArray [in, optional]

    An array specifying the columns' data types. 0 represents numeric, 1 is numeric with text labels, and 2 is text.

    Type: Variant

  • VariableWidthArray [in, optional]

    An array specifying the columns' widths.

    Type: Variant

  • VariableFormatsArray [in, optional]

    An array specifying the columns' formats.

    Type: Variant

InputSpreadsheet

SVB Example

Opening an Office document in Statistica

Sub Main

    'Open Weather report.xls as an Excel ActiveX document
    Dim H1 As DocumentHost
    Set H1 = DocumentHosts.Open(Path & "\Examples\Datasets\Weather report.xls")

    'Select the Excel file's range for the analysis
    VariableTypes = Array(0, 2, 0, 2)
    VariableWidths = Array(8, 128, 8, 128)
    VariableFormats = Array("m/d/yyyy", "", "General", "")

    'Set the Excel file's data to a spreadsheet
    Dim S1 As Spreadsheet
    Set S1 = H1.DataSet(1, 0, 2, 1, 31, 4, VariableTypes, VariableWidths, VariableFormats)

    'Perform a simple descriptive statistics
    Dim newanalysis2 As Analysis
    Set newanalysis2 = Analysis (scBasicStatistics, S1)
    Dim oStaDocs2 As StaDocuments

    'Basic Statistics and Tables: Weather report.xls (B2:AE31)
    Dim oAD1 As STABasicStatistics.BasStartup
    Set oAD1 = newanalysis2.Dialog
    oAD1.Statistics = scBasDescriptives

    newanalysis2.Run

    Dim oAD2 As STABasicStatistics.BasDescriptiveStatistics
    Set oAD2 = newanalysis2.Dialog
    oAD2.Variables = "3 "

    'Show the results
    oAD2.Summary.Visible = True

    'Close the Excel file and spreadsheet
    S1.Close(False)
    H1.Close(False)

End Sub