apyhub
Back
▣ FILE CONVERSION

Convert Spreadsheets to PDF API

Hosted on ApyHub

What it does

The Excel to PDF API renders a spreadsheet as a PDF. Send an .xls, .xlsx or .ods file as an upload, point it at a remote url, or pass the bytes as a base64 string, and get the PDF back as a direct download or as a signed link.

Six endpoints cover those combinations. Download routes return binary PDF content, which suits a request someone is waiting on. Link routes return JSON with a data field holding a signed URI, which suits background jobs and anything that stores the file for later. All three download routes and the file upload link route accept landscape to rotate the page, and the file download route takes an output query value to name the generated file. File uploads go up to 100 MB per request.

Finance and operations teams use the Excel to PDF API to turn working spreadsheets into documents that circulate: invoices, month-end reports, price lists, and statements that should stay fixed once they leave the system. Internal tools reach for it when a user clicks export and expects a file colleagues can open without Excel installed.

It pairs with the CSV to Excel API when the data arrives as CSV and becomes a workbook first, and with the PDF Watermark API when the output ships marked as a draft or branded for a client. For slide decks in the same workflow, use the Presentation to PDF API. All of them are callable by AI agents through ApyHub MCP.

▣ ENDPOINT 01 / 06
POST
Convert spreadsheet upload to PDF signed link
https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/file/link

QUICKSTART

GUIDE

Quickstart

Upload a spreadsheet file to convert it to PDF.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/file/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/spreadsheet.xlsx"

What you'll get back

Returns a JSON object with a data string field containing the PDF file URI.

{
  "data": "https://example.com/output.pdf"
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Converts an uploaded spreadsheet file to PDF and returns a signed URL to the generated PDF. The request sends the spreadsheet as a binary file upload, and the response returns the PDF link in a JSON object.

Query Parameter(s)

AttributeTypeDescription
landscapeBooleanSets the PDF orientation. Default: false.

Request Body

ParameterTypeDescription
fileBinaryThe spreadsheet file to convert. Binary upload.

Response

Returns a JSON object with a data string field containing a URI to the generated PDF file.

AttributeTypeDescription
dataStringSigned URI for the converted PDF file.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 06
POST
Convert remote spreadsheet URL to PDF download
https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/url/download

QUICKSTART

GUIDE

Quickstart

Convert a spreadsheet from a URL into a PDF file.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.xlsx"}'

What you'll get back

Returns a binary file response containing the generated PDF. The output schema is a raw string with binary format, so there is no JSON wrapper or fields to describe.

TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Converts a spreadsheet available at a remote URL into a PDF and returns the generated file as a binary download. You provide the spreadsheet URL in the request body and can optionally request landscape output with a query parameter.

Query Parameter(s)

AttributeTypeDescription
landscapeBooleanWhen true, generates the PDF in landscape orientation. Default: false.

Request Body

ParameterTypeDescription
urlStringRemote spreadsheet URL to convert. Must be a URI.

Response

Returns a binary file download containing the generated PDF. The output schema is a binary string, so there is no JSON response body to document.

▣ ENDPOINT 03 / 06
POST
Convert remote spreadsheet URL to PDF signed link
https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/url/link

QUICKSTART

GUIDE

Quickstart

Convert a spreadsheet from a public URL into a PDF by sending the file link in the request body.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.xlsx"}'

What you'll get back

Returns a JSON object with a data string field containing the URI of the generated PDF.

{
  "data": "https://..."
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Converts a remotely hosted spreadsheet file, provided as a URL, into a PDF and returns a signed PDF link. The request accepts a spreadsheet URL in the body and the response contains the generated PDF URL.

Request Body

ParameterTypeDescription
urlStringThe remote spreadsheet file URL. Must be a valid URI.

Response

Returns a JSON object with a data string field — a signed URI pointing to the generated PDF file.

ParameterTypeDescription
dataStringSigned URI of the generated PDF file.
▣ ENDPOINT 04 / 06
POST
Convert base64-encoded spreadsheet to PDF download
https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/base64/download

QUICKSTART

GUIDE

Quickstart

Convert a Base64-encoded spreadsheet to PDF and download the result.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/base64/download?landscape=false" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"base64":"UEsDBBQAAAAIAAeLbV..."}'

What you'll get back

Returns a binary file response containing the generated PDF.

TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Base64-encoded file bytes.

About this endpoint

What it does

Converts a base64-encoded spreadsheet into a PDF file and returns the result as a binary download.

Query Parameter(s)

AttributeTypeDescription
landscapeBooleanOptional page orientation flag. Default: false.

Request Body

ParameterTypeDescription
base64StringBase64-encoded file bytes.

Response

Returns a binary file download as the response body. The output schema is a string with binary format, so the success response is the PDF content itself rather than a JSON object.

▣ ENDPOINT 05 / 06
POST
Convert base64-encoded spreadsheet to PDF signed link
https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/base64/link

QUICKSTART

GUIDE

Quickstart

Convert a spreadsheet from a Base64 string into a PDF by sending the encoded file bytes.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/base64/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"base64":"UEsDBBQAAAAIAAeLbV..."}'

What you'll get back

Returns a JSON object with a data string field containing a URI to the generated PDF.

{
  "data": "https://example.com/output.pdf"
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Base64-encoded file bytes.

About this endpoint

What it does

Converts a base64-encoded spreadsheet file into a PDF and returns a signed link to the generated PDF. Submit the file bytes as base64 in the request body; the response contains a URI to the PDF.

Request Body

ParameterTypeDescription
base64StringBase64-encoded file bytes.

Response

Returns a JSON object with a data string field formatted as a URI — this is the signed link to the generated PDF. The success response is an object with one top-level field: data (String).

ParameterTypeDescription
dataStringURI of the generated PDF signed link.
▣ ENDPOINT 06 / 06
POST
Convert spreadsheet upload to PDF download
https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/file/download

QUICKSTART

GUIDE

Quickstart

Upload a spreadsheet file to convert it into a PDF download.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-spreadsheet-to-pdf/file/download?output=output.pdf" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.xlsx"

What you'll get back

Returns a binary file stream (string with format: binary) containing the generated PDF.

TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
.xls, .xlsx, or .ods

About this endpoint

What it does

Uploads a spreadsheet file and returns a PDF download generated from that file. The request accepts the spreadsheet in the body and optional query parameters that affect the output filename and page orientation.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename for the generated PDF. Example: output.pdf.
landscapeBooleanPage orientation flag. Default: false.

Request Body

ParameterTypeDescription
fileBinarySpreadsheet file to convert. Binary upload; supported formats: .xls, .xlsx, .ods.

Response

Returns a binary file response containing the generated PDF download. The success response is a single binary payload.

ParameterTypeDescription
binaryStringPDF file content returned as binary data.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.