Export to PDF
Export the whole workbook, the active sheet or one sheet to PDF (from a file, or a workbook open in an Excel session, unsaved changes included), choosing quality, page range, print areas and document properties.
Command in the Excel desktop toolkit · id ooa.excel_desktop/export_pdf · 13 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | No | Workbook; not needed when a session is given. | |
| Target | File | Yes | PDF file to create. | |
| Sheet | String | No | Only this sheet; the whole workbook when empty. | |
| Quality | String | No | standard | standard for printing; minimum for a smaller file to publish online. |
| Include properties | Boolean | No | true | Copy the workbook's title, author and other properties into the PDF. |
| Ignore print areas | Boolean | No | false | Export whole sheets even where a print area is set. |
| From page | Number | No | First printed page to export; from the first page when empty. | |
| To page | Number | No | Last printed page to export; to the last page when empty. | |
| Overwrite | Boolean | No | true | Replace the PDF when it already exists; false stops with EXCEL_DESKTOP.EXISTS. |
| Password | Credential | No | Password needed to open the workbook; passed to Excel through the environment, not the command line. | |
| Session | String | No | An Excel session open in this run: the step works on that workbook as it is now, changes not yet saved included; the path is not needed then (G3). | |
| Active sheet | Boolean | No | false | Only the active sheet (G3). |
| If exists | String | No | When the PDF is already there: replace it, stop the step, or add a number such as (2) to the name (G3); follows overwrite when empty. |
Outputs
| Output | Type | What it is |
|---|---|---|
| path | File | The PDF file written (with a number added when one was already there). |