XLS Object
 
Syntax
 
XLS.OpenWorkBook filename[, UpdateLinks][, ReadOnly][, Password][, Delimiter][, CustomDelimiter]
 
Description
Opens an existing workbook and sets the opened file as the currently active workbook.
 
Parameter
Description
filename
String, required. The name of the file to be opened.
UpdateLinks
Boolean, optional. If True, references in the file will be updated when nescesary. Default value: False
ReadOnly
Boolean, optional. When True, the file is opened in read-only (shared) mode. Default value: False
Password
String, optional. When a file has password protection, this parameter must hold the valid password for the file.
Delimiter
Enumerated, optional. Can be one of the following values:
xlDelimCommas
xlDelimCustom  (The next parameter must be specified)
xlDelimNoApplicable  (this is the default value when omitted)
xlDelimNothing
xlDelimSemiColons
xlDelimSpaces
xlDelimTabs
CustomDelimiter
Specifies the special delimiter char(s). Only valid when Delimiter is xlDelimCustom.
 
See Also
Example
 
Sub Main
 
Dim mySheets() As String
Dim x As Integer
 
   If Not XLS.AppInit() Then Exit Sub
 
   XLS.AppVisible = True
 
   XLS.AddWorkBook
   XLS.AddWorkSheet "Test1"
   XLS.AddWorkSheet "Test2"
   XLS.AddWorkSheet "Test3"
   XLS.AddWorkSheet "Test4"
 
   XLS.SaveWorkBook , "o:\AdminSQL\Scripts\mijntest.xlsx"
 
   XLS.CloseWorkBook , False
 
   XLS.OpenWorkBook "o:\AdminSQL\Scripts\mijntest.xlsx"
 
   XLS.ListWorkSheets mySheets()
 
   For x = 1 To UBound(mySheets)
      Debug.Print mySheets(x)
   Next x
 
   XLS.AppClose
 
End Sub