Guide Section: Processing Events and Performing Actions
EASAP Tree: EVENT PROCESSING > ACTION / PROCESSES
EXPORT TO PDF creates a PDF representation of a certain part of a spreadsheet.
When an EXPORT TO PDF is triggered, an image of the current state of the specified Excel range is saved as a PDF in the EASAP folder for that run.
Optionally, set Open in Browser: TRUE to open the PDF automatically in a new browser window.
EXPORT TO PDF is implemented via Excel and Windows and as a result, has the limitations outlined below.
EXPORT TO PDF reopens an Excel spreadsheet; this may be time-consuming if the spreadsheet is large.
To speed up this process EXPORT TO PDF will attempt to copy the selected portion of the spreadsheet into a new, smaller one, and then will generate the PDF from the subset spreadsheet.
There are two cases where this higher-performing temporary spreadsheet will not be generated:
A. If there is a header image or a frozen pane in Ranges: the PDF will be generated directly from the original spreadsheet
B. If there are hidden rows, an Author must decide between two options:
There are two requirements on VBA within the Excel spreadsheet:
Either 'disable events' as the first line of macro code, below,
If Application.EnableEvents = False Then Exit Sub
Or 'wrap' the macro code within any triggered functions to disable processing
If not Application.EnableEvents = False Then // macro code End If
This disables event-triggered macro's during the time EXPORT TO PDF is making its copy of the relevant parts of the spreadsheet.
![]() |
|
---|---|
Essential Parameters: | |
Spreadsheet: | the SPREADSHEET that points to the actual spreadsheet. |
Output File Name: | Enter a literal, SCALAR or FILE CHOICE reference as a name for the file to be created \ Should end in .pdf |
Optional Parameters: | |
Type: | Specify the scope of the source in the spreadsheet, SINGLE MULTI RANGES MULTI SHEETS AND RANGES |
Delimiter: | Set a character to delimit object references in Value: Default: % |
Sheet: | Select a SHEET source for Ranges: If Type:MULTI RANGES select a sheet for use with Ranges: |
Sheets: | source SHEET for Ranges: If Type: MULTI SHEETS AND RANGES then use a comma delimited list of the same length as the list in Ranges: |
Range: | Enter a literal or a SCALAR reference with a cell range to be pictured in the PDF |
Ranges: | Enter a comma-separated list of literal, SCALAR and/or LIST references of cell ranges to be pictured in the PDF |
Do if: | Enter a logical expression, if true then export is performed and otherwise not |
Scale: when Type: MULTI SHEETS AND RANGES | Enter a percent of the original size to create a smaller Default: 100 Must be less than or equal to 100 |
USER INTERFACE branch only | |
Open In Browser: | Set to TRUE to open the PDF document in a web browser window when it is created Default: FALSE |
OUTPUT branch only | |
Queue: | Set to TRUE to avoid running out of Excel processes resulting in an exception |
Notes,
Some limitations apply to EXPORT TO PDF when Type:→MULTISHEETS AND RANGES