SQL Object
 
Syntax
 
SQL.RunMSExcel ViewOrTableOrQuery [, SaveAs][, AltHeaderCaption] _
               [, AltSubHeaderCaption][, TimeOut]
 
Description
Opens a VIEW, TABLE or a SELECT query, and presents the data in the Microsoft program Excel using a new and completely automatically formatted Excel worksheet.
 
The output is similar to the output option: "Excel worksheet" in the SQL Designer
 
Parameter
Description
ViewOrTableOrQuery
A reference to a View, Table or Select query.
SaveAs
Optional. If a valid path and file name are entered here, the document is not opened, but saved directly to SaveAs.
AltHeaderCaption
Optional. Replaces the default header in the worksheet.
AltSubHeaderCaption
Optional. Replaces the default text directly below the header.
TimeOut
Optional. Specifies the maximum wait time in seconds for the query. If the result does not appear within the specified time, the query is aborted and an error message is generated. Default value: 30 seconds.
 
See Also
other SQL.Runxxxxxxxx methodes, Excel-werkblad.
Example
 
Sub Main
 
   Dim sQuery As String
 
   sQuery = InputBox$("Select Query:")
   SQL.RunMSExcel sQuery, , "Demo!"
 
End Sub