apyhub
Back
▣ FILE CONVERSION

Convert CSV to Excel API

Hosted on ApyHub

What it does

The CSV to Excel API turns a CSV file into an XLSX workbook. Send the file as an upload or point it at a remote url, and get the workbook back either as a direct download or as a signed link.

Four endpoints cover the combinations. POST /file/download and POST /url/download stream the .xlsx back as binary, which suits a request a user is waiting on. POST /file/link and POST /url/link return JSON with a signed data URI, which suits background jobs and anything that stores the result for later. The file download route also accepts an optional output query parameter to set the filename.

Teams reach for the CSV to Excel API when tabular data has to leave a system in a form people can open. Common jobs include handing database exports to finance teams, generating reports from CSV logs, and turning a download endpoint's output into a workbook for an internal tool.

The conversion writes the CSV rows into the workbook as values, which is what a CSV holds. Excel formatting, formulas and charts are applied downstream by whoever opens the file.

It pairs with the Convert CSV to JSON API when the destination is code rather than a spreadsheet, and with the Convert Spreadsheets to PDF API when the workbook goes out as a read-only document. To build the CSV from a report in the first place, start with the Table Extraction API. All of them are callable by AI agents through ApyHub MCP.

▣ ENDPOINT 01 / 04
POST
Convert uploaded CSV to XLSX and stream download
https://api.eu.apyhub.com/apyhub/convert-csv-to-xlsx/file/download

QUICKSTART

GUIDE

Quickstart

Upload a CSV file to convert it into an XLSX download.

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

What you'll get back

Returns a binary file download as the response body.

TRY ITLIVE · 50 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*
CSV file to convert.

About this endpoint

What it does

Converts an uploaded CSV file into an XLSX file and streams the resulting spreadsheet back as a binary download.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename. The schema shows output.xlsx as an example.

Request Body

ParameterTypeDescription
fileBinaryCSV file to convert. Binary upload.

Response

Returns a binary file stream as the success response. The output schema is a single string with binary format, so the response body is the generated XLSX file content.

ParameterTypeDescription
binary response bodyStringDownloadable file content in binary format.

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

▣ ENDPOINT 02 / 04
POST
Convert uploaded CSV to XLSX and return signed link
https://api.eu.apyhub.com/apyhub/convert-csv-to-xlsx/file/link

QUICKSTART

GUIDE

Quickstart

Upload a CSV file to convert it into an XLSX download link.

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

What you'll get back

Returns a JSON object with a data string field containing a URI for the generated XLSX file.

{
  "data": "https://storage.example.com/convert/output.xlsx?sig=abc"
}
TRY ITLIVE · 50 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*
CSV file to convert.

About this endpoint

What it does

Converts an uploaded CSV file into an XLSX file and returns a signed link to the converted file.

Request Body

ParameterTypeDescription
fileBinaryCSV file to convert.

Response

Returns a JSON object with a data string field containing a URI for the converted XLSX file, typically a signed download link.

ParameterTypeDescription
dataStringURI to the converted XLSX file.

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

▣ ENDPOINT 03 / 04
POST
Convert remote CSV URL to XLSX and stream download
https://api.eu.apyhub.com/apyhub/convert-csv-to-xlsx/url/download

QUICKSTART

GUIDE

Quickstart

Download an XLSX file from a CSV URL by sending the source file link.

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

What you'll get back

Returns a binary file response (string with format: binary) containing the generated XLSX content.

TRY ITLIVE · 50 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 remote CSV file referenced by a URL into an XLSX file and returns the result as a streamed binary download.

Request Body

ParameterTypeDescription
urlStringThe remote CSV file URL to convert. Must be a valid URI.

Response

Returns a binary stream containing the generated XLSX file. The output schema is a binary string, so the success response is a file download rather than a JSON object.

▣ ENDPOINT 04 / 04
POST
Convert remote CSV URL to XLSX and return signed link
https://api.eu.apyhub.com/apyhub/convert-csv-to-xlsx/url/link

QUICKSTART

GUIDE

Quickstart

Convert a CSV file from a public URL into an XLSX file.

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

What you'll get back

Returns a JSON object with a data string field containing the generated XLSX file URL.

{
  "data": "https://storage.example.com/convert/output.xlsx?sig=abc"
}
TRY ITLIVE · 50 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 CSV file available at a remote URL into an XLSX file, then returns a signed URL to the generated XLSX file.

Request Body

ParameterTypeDescription
urlStringThe remote CSV file URL to convert. Must be a valid URI.

Response

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

ParameterTypeDescription
dataStringSigned URI for the converted XLSX file.
▣ 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.