Skip to main content

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​

InputTypeRequiredDefaultWhat it is
PathFileNoWorkbook; not needed when a session is given.
TargetFileYesPDF file to create.
SheetStringNoOnly this sheet; the whole workbook when empty.
QualityStringNostandardstandard for printing; minimum for a smaller file to publish online.
Include propertiesBooleanNotrueCopy the workbook's title, author and other properties into the PDF.
Ignore print areasBooleanNofalseExport whole sheets even where a print area is set.
From pageNumberNoFirst printed page to export; from the first page when empty.
To pageNumberNoLast printed page to export; to the last page when empty.
OverwriteBooleanNotrueReplace the PDF when it already exists; false stops with EXCEL_DESKTOP.EXISTS.
PasswordCredentialNoPassword needed to open the workbook; passed to Excel through the environment, not the command line.
SessionStringNoAn 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 sheetBooleanNofalseOnly the active sheet (G3).
If existsStringNoWhen 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​

OutputTypeWhat it is
pathFileThe PDF file written (with a number added when one was already there).