Jetformat

Convert an Excel workbook to PDF

Resource + verb. Run excel to-pdf for visible worksheets, then get or set cells on the same workbook.

By Jetformat

Excel-to-PDF conversion turns the visible worksheets in an XLSX workbook into one PDF in workbook order. Hidden sheets are skipped. A worksheet can span several PDF pages, so inspect the output rather than using the sheet count as a page count.

Before conversion, separate data correctness from page layout. A formula result must be available before it can print correctly, and a correct result can still appear on a clipped or poorly paginated sheet.

Prepare the workbook

Use .xlsx input. Legacy .xls and macro-enabled .xlsm are not supported. Identify the visible worksheets and the range that should appear in the report. Hidden sheets are not a way to request extra appendix pages; only visible worksheets enter the conversion output.

Convert and verify step by step

  1. Run jetformat validate workbook.xlsx to check the input.
  2. Use jetformat excel inspect workbook.xlsx --json to inspect its structure.
  3. Read important values with excel get, and recalculate when the file lacks cached formula results.
  4. Convert the prepared workbook to a new PDF.
  5. Run pdf info and visually check totals, column boundaries, and page breaks.
jetformat excel to-pdf workbook.xlsx -o workbook.pdf
jetformat pdf info workbook.pdf

Handle blank formula cells

Some workbook-writing libraries store formula expressions without cached results. Recalculate to a separate file so you can compare the source and the prepared workbook:

jetformat excel recalc workbook.xlsx -o recalculated.xlsx
jetformat excel to-pdf recalculated.xlsx -o workbook.pdf

Review critical totals after recalculation. A formula expression being present is not proof that the cached value is current or that the formula is supported. Number formats on recalculated cells are not applied yet, so check displayed dates, currency, and percentages especially carefully.

Compare the available operations

Question Operation What to verify
What is in this cell? excel get Value and selected sheet
What worksheets exist? excel inspect Names and visibility
Are formula caches missing? excel recalc Resulting values
What will be distributed? excel to-pdf Printed pages
Should only a range print? excel print-area Range and final pagination

Count output pages, not worksheets

As an illustration, 3 visible worksheets could produce 7 PDF pages. That conversion uses 7 credits; one recalculation command adds 1 credit for 8 credits total. Reading cells, validating the workbook, and inspecting the PDF add no credits. These numbers describe an example workload, not fixed workbook pagination.

Native charts inside worksheets are not rendered in the PDF yet. If the report depends on a chart, treat that as a limitation to resolve before distributing the output. Checking only the first page can miss an omitted chart or a clipped table on a later sheet.

Sources and next tasks

XLSX is part of ECMA-376 Office Open XML. See the Excel command reference, recalculation workflow, and print-area guide for the corresponding Jetformat operations.

Last updated