apyhub
FILE MANIPULATION

Split Excel API

What it does

Excel Splitter breaks uploaded Excel workbooks into separate files based on the value in a chosen column. Send one or more .xlsx or .xlsm files, choose a sheet by 1-based sheet_index, and choose a 1-based target_column_index to group rows by.

The split request returns a jobs array. Each job includes a job_id, filename, status, progress, and the sheet and column indexes used for that file. Use /status/:job_id to check an individual job, or /overall-status with job_ids to get aggregate progress across multiple splits.

When a job is finished, /download/:job_id returns the split Excel output as binary data. This is useful when you need to turn a single workbook into per-department, per-region, or per-category files without doing the grouping logic in your own code.

Use Excel Splitter when you receive consolidated spreadsheets and need to distribute them into smaller workbooks for reporting, review, or downstream processing.

▣ ENDPOINT 01 / 04
POST
Split Excel files into one workbook per value group in a column
http://localhost:8080/pankajretestflows/split-excel-files

QUICKSTART

GUIDE

Quickstart

Upload one or more Excel files to split them by sheet and target column.

curl -X POST "http://localhost:8080/pankajretestflows/split-excel-files" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/report.xlsx"

What you'll get back

Returns a JSON object with a jobs array. Each item in jobs includes job_id (string), filename (string), status (string), and progress (integer); it may also include sheet_index and target_column_index as integers.

{
  "jobs": [
    {
      "job_id": "a1b2c3d4",
      "filename": "report.pdf",
      "status": "queued",
      "progress": 0,
      "sheet_index": 1,
      "target_column_index": 3
    }
  ]
}
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*
files*
Excel files (.xlsx, .xlsm) to split.
sheet_index
Sheet number per file (1-based), one value per uploaded file.
target_column_index
Column number to split by per file (1-based), one value per uploaded file.

About this endpoint

What it does

Splits one or more Excel files into separate workbooks based on the unique values in a specified column. The request uploads the source files and, for each uploaded file, optionally provides the sheet number and target column number used for the split.

Request Body

ParameterTypeMandatoryDescription
filesString ArrayYesExcel files to split. Supported formats: .xlsx, .xlsm.
sheet_indexString ArrayNoSheet number per file, 1-based. Provide one value for each uploaded file.
target_column_indexString ArrayNoColumn number to split by per file, 1-based. Provide one value for each uploaded file.

Response

Returns a JSON object with a jobs array field. Each item in jobs is an object containing the submitted job details, including job_id, filename, status, and progress, with optional sheet_index and target_column_index fields.

AttributeTypeMandatoryDescription
jobsObject ArrayYesArray of job objects. Each job includes job_id (String), filename (String), status (String), and progress (Integer). Optional fields: sheet_index (Integer) and target_column_index (Integer).

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Use the returned jobs[].job_id value as the job identifier.

Body

Name
Type
Description
bodyREQUIRED
object

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

▣ ENDPOINT 02 / 04
GET
Get the status of an Excel split job
http://localhost:8080/pankajretestflows/split-excel-files/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a split-excel-files job by its job ID.

curl -X GET "http://localhost:8080/pankajretestflows/split-excel-files/status/:job_id/status/12345" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with job_id string, status string, progress integer, and optional error string.

{
  "job_id": "12345",
  "status": "processing",
  "progress": 60,
  "error": null
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Retrieves the current status of an Excel split job using its job identifier. The response returns the job ID, its current status, and progress, with an optional error message if one is present.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesIdentifies the split job.

Response

Returns a JSON object with job_id as a string, status as a string enum, progress as an integer from 0 to 100, and error as a nullable string. The success response includes the job's current state and completion percentage.

ParameterTypeMandatoryDescription
job_idStringYesThe split job identifier.
statusENUMYesCurrent job state. Allowed values: queued, processing, done, failed.
progressIntegerYesCompletion progress as a percentage from 0 to 100.
errorStringNoError message if present; nullable.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ ENDPOINT 03 / 04
GET
Download a finished Excel split output
http://localhost:8080/pankajretestflows/split-excel-files/download/:job_id

QUICKSTART

GUIDE

Quickstart

Download the generated Excel file for a completed split job by passing its job_id in the path.

curl -X GET "http://localhost:8080/pankajretestflows/split-excel-files/download/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a binary file stream (string with format: binary), not a JSON object.

(binary file content)
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Downloads the finished output file for a previously created Excel split job. The job_id path parameter identifies which split job’s binary file to retrieve.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesIdentifies the split job to download, as a string.

Response

Returns a binary file response, represented in the schema as a top-level string with binary format. The schema does not define a JSON object wrapper or any named response fields.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ ENDPOINT 04 / 04
GET
Aggregate progress across Excel split jobs
http://localhost:8080/pankajretestflows/split-excel-files/overall-status

QUICKSTART

GUIDE

Quickstart

Check the overall status for one or more split-excel-files jobs by passing the job_ids query parameter.

curl -X GET "http://localhost:8080/pankajretestflows/split-excel-files/overall-status?job_ids=job-123,job-456" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with required status and progress fields, plus optional details, total_files, and completed_files fields.

  • status is a string enum (unknown, queued, processing, done, failed)
  • progress is an integer from 0 to 100
  • details is an array of objects with job_id, status, and progress
  • total_files and completed_files are integer counts
{
  "status": "processing",
  "progress": 60,
  "details": [
    {
      "job_id": "job-123",
      "status": "processing",
      "progress": 60
    }
  ],
  "total_files": 2,
  "completed_files": 1
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the aggregate progress for one or more Excel split jobs identified by job_ids. The response includes an overall status, an overall progress value, and optional per-job details plus file counts.

Query Parameter(s)

AttributeTypeMandatoryDescription
job_idsStringYesJob identifier(s) used to look up the split-job status aggregate.

Response

Returns a JSON object with required status and progress fields, plus optional details, total_files, and completed_files fields. The status field is a string enum, and progress is an integer from 0 to 100.

AttributeTypeMandatoryDescription
statusENUMYesOverall status of the split jobs. Allowed values: unknown, queued, processing, done, failed.
detailsObject ArrayNoPer-job progress entries. Each item contains:<br>- job_id (String): Job identifier.<br>- status (String): Job status value.<br>- progress (Integer): Job progress value.
progressIntegerYesOverall progress percentage. Minimum 0, maximum 100.
total_filesIntegerNoTotal number of files involved in the split jobs.
completed_filesIntegerNoNumber of files that have completed processing.

Query parameters

Name
Type
Description
job_idsREQUIRED
string
▣ 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.