DocumentHost.Open
Syntax | Parameters | Return value |
---|---|---|
Sub DocumentHost.Open( _ FullFilePath As String) |
FullFilePath [in]
Path to the Office file to open. Type: String |
This function does not return a value. |
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
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.