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: TargetPDF Object

TargetPDF Object


Class clsTargetPDF is a subclass of:



The TargetPDF object implements the functionality to output data from SQL*XL to a PDF file. The properties of TargetPDF determine the way data is output to the PDF file. To obtain a reference to the targetPDF object use the Targets property of the SQLXL object. Example: SQLXL.Targets( litPDF ).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 = litPDF then output will be generated in a PDF file.


Name Data Type Description
FileName As String File name for the resulting pdf file (full path name!)
Headings As Boolean Print column headings
FitWidth As Boolean Makes the width of the pdf file large enough to fit the contents.



Create output to PDF:

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

Note: Please record all code through the macro recorder.

SQL*XL ribbon in Excel