The XLSX output option displays the report in a Microsoft Excel Workbook format file.
Syntax:
PRINT reportname ARRANGE clause WHERE clause .. ORDER BY clause .. OPTION XLSX
The following OPTION parameters are available to customize the output:
Parameter |
Value |
Description |
FILENAME |
value |
Specifies the full path and file name. If no path is defined, output will be saved in the current working directory. |
PASSWORD |
value |
Specifies the password for the Excel file. Passwords are case sensitive. |
SHOW_CANCEL_DIALOG |
ON (default) OFF |
Specifies whether to suppress cancel dialog box during the print process. |
ROW_SPACING |
value |
Specifies the spacing between spreadsheet rows. |
COLUMN_SPACING |
value |
Specifies the spacing between spreadsheet columns. |
INCLUDE_IMAGES |
ON OFF |
Specifies whether image objects on the report should be included in the exported file. |
INCLUDE_TEXT |
ON OFF |
Specifies whether text is included in the exported file. |
PAGES_PER_WORKSHEET |
ON OFF |
Specifies the page limit per worksheet. |
PRINT_GRID_LINES |
ON OFF |
Specifies whether grid lines are displayed in the exported file. |
PASS_SETTINGS |
value |
Specifies the number of times a report traverses the data before generating pages. |
OPEN |
ON OFF |
Specifies whether the report should be opened after it is generated. |
ON OFF |
Specifies the report output (defined as FILENAME filename.ext ) to be sent via e-mail as an attachment. See additional options when EMAIL value is set to ON. EMAIL SET ON |
Notes:
•Each additional OPTION parameter must be separated by the pipe | symbol.
•When printing to the XLS format, the report objects must be spaced apart appropriately or "padded" in order for the report data to appear correctly in the Excel report output. Experimenting with vertical and horizontal will also allow you to attain your desired output. Also, please refrain from using elaborate fonts that may not be supported within Excel.
Examples:
--To print Invoices as an XLSX file
PRINT Invoice WHERE CustID = 127 +
OPTION XLSX +
|FILENAME Invoice.XLSX +
|SHOW_CANCEL_DIALOG OFF +
|ROW_SPACING 1 +
|COLUMN_SPACING 1 +
|PRINT_GRID_LINES ON +
|OPEN ON
--To print an encrypted spreadsheet
PRINT BonusRates OPTION XLSX +
|FILENAME BonusRate.xlsx +
|PASSWORD PeachCobbler