Linker IT Software
Order Home
menubar-top-links menubar-top-rechts

SQL*XL: Database to Excel bridge

Related LIT software: litLIB: Excel power functions pack encOffice: Protect your Excel file easy and safe

Home Products SQL*XL Help VBA SQLXL Targets Target

Buy now

Download now

SQL*XL online help


SQL*XL API: TargetXLS Object

TargetXLS Object


Class clsTargetXLS is a subclass of:



The TargetXLS object implements the functionality to output data from SQL*XL to a new binary .xls MS Excel file. The properties of TargetXLS determine the way data is output to the .xls file. To obtain a reference to the TargetXLS object use the Targets property of the SQLXL object. Example: SQLXL.Targets( litXLS ).Headings = False

Physically, output is generated by the Statement objects notably the StmtDQL object that implements select statements. The execute method of the Statement outputs the data according to the setting of the Target property on the Statement. If Statement.Target = litXLS then output will be generated in a new .xls file.


Name Data Type Description
Filename As String File name for the new .xls file. (Full path!)
Headings As Boolean Print column headings



Create output to a new binary .xls file:

SQLXL.SQL.setText Text := "select * from emp"
Set SQLSL.SQL.Statements(1).Target= Targets(litXLS )
Targets(litXLS).FileName = "c:\test.xls"
Targets(litXLS).Headings = True

Note: Please record all code through the macro recorder.

SQL*XL ribbon in Excel