ONLYOFFICE Docs icon

ONLYOFFICE Docs

Consume ONLYOFFICE Document Server API (Conversion, Document Builder)

Conversion → Spreadsheet to PDF

AI-generated

Summary

Convert a spreadsheet to PDF through the ONLYOFFICE Document Server. Choose a source URL or an input binary field, select the spreadsheet’s input format, and optionally adjust page layout and PDF output settings.

Inputs

  • File Source (required) — Choose URL (default) for a file the Document Server can download, or Binary Input to upload a file from a previous node.
  • File URL (required) — Source file URL; used when File Source is URL.
  • Input Binary Field (required) — Name of the incoming binary field containing the spreadsheet; used when File Source is Binary Input. Defaults to data.
  • Input Format Name or ID (required) — Spreadsheet format to convert. The available formats are those the node lists as convertible to PDF; defaults to docx in the UI.
  • Orientation — PDF page orientation: Portrait (default) or Landscape.
  • Spreadsheet Options — Optional layout controls: fit to height or width in pages (0 means automatic), ignore the spreadsheet print area, margins, page dimensions, scale (10–400%), grid lines, and row/column headings. Defaults include A4 dimensions, standard margins, 100% scale, ignoring the print area, and hiding grid lines and headings.
  • Output Mode — Choose File Data (default) to download the PDF into the output binary field, or URL Only to return the Document Server URL without downloading.
  • Output File Name — Output filename without extension when using File Data; defaults to converted. The node adds the .pdf extension.
  • Put Output File in Field — Binary field name for the PDF when using File Data; defaults to data.

Output shape

One output item per input item, containing the converted PDF as binary data or a URL.

File Data returns JSON metadata (success, fileName, inputFormat, outputFormat, operation, and convertedUrl) plus the PDF in the configured binary field. URL Only returns JSON metadata (success, convertedUrl, outputFormat, inputFormat, and operation) without binary data. With Continue On Fail enabled, a failed item returns an error field in JSON.

Examples

Example 1: Convert a spreadsheet already downloaded by an earlier node

Set File Source to Binary Input, choose the input binary field (typically data), and select the spreadsheet format. Optionally set the page orientation, scale, fit-to-page settings, margins, page size, grid lines, or headings. Use File Data to pass the PDF binary to later nodes, or URL Only to pass its URL.

Links

Discussion