XLS Object
 
Syntax
 
Result = XLS.AppInit()
 
Description
This function must be executed before any other method, function or property of the XLS object can be accessed. AppInit can also be executed as a sub without returning result.
 
Note: some methods of the XLS object can be executed, even if AppInit was not used. These methode automatically execute the AppInit function, however, you must close the Excel session by yourself using the AppClose method.
 
Parameter
Description
Result
Boolean. Returns the result after the initialization of a new Excel session.
 
Constant
Value
Description
True
-1
Successfully initialized
False
0
Failed to start Excel session
 
See Also
Example
 
Sub Main
 
Dim strName As String
 
   If Not XLS.AppInit() Then Exit Sub
 
   strName = XLS.AddWorkBook()
 
   XLS.AddWorkSheet "MijnBlad"
 
   Debug.Print XLS.ActiveWorkBook                'Map1
   Debug.Print XLS.ActiveSheet                'MijnBlad
 
   XLS.CloseWorkBook
  
   XLS.AppClose
 
End Sub