# Excel & CSV to JSON Converter - XLSX, XLS, All Sheets API (`sophisticated_occasion/excel-csv-to-json-converter`) Actor

Convert Excel (XLSX, XLS) and CSV/TSV files from URLs to clean JSON: all or selected sheets, smart header detection, ISO dates, typed numbers, empty rows removed. For APIs, n8n, Make and ETL. $0.009 per file + $0.002 per 100 rows.

- **URL**: https://apify.com/sophisticated_occasion/excel-csv-to-json-converter.md
- **Developed by:** [HUG0 S](https://apify.com/sophisticated_occasion) (community)
- **Categories:** Developer tools, Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.97 / 1,000 file converteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Excel & CSV to JSON Converter - XLSX, XLS, All Sheets API

Turn **Excel (XLSX, XLS)** and **CSV/TSV** files into clean **JSON rows** for APIs, n8n, Make, Zapier and ETL pipelines.

**$0.009 per file + $0.002 per started 100 rows.** No start fee; a 500-row file costs $0.019. Files that fail are free.

### Quick start: example input, output and cost

Turn XLSX, XLS, CSV and TSV files into JSON rows: all sheets, header detection, ISO dates, typed numbers. $0.009 per file plus $0.002 per 100 rows.

**Example input**

```json
{
  "fileUrls": [
    "https://raw.githubusercontent.com/datasets/co2-ppm/main/data/co2-mm-mlo.csv"
  ]
}
```

**Cost example:** One 5,000-row file = $0.009 + 50 x $0.002 = **$0.109**.

### Features

- All sheets or only the sheets you name.
- **Header detection**: title rows above the table are skipped, empty or duplicate column names get unique names.
- Dates as ISO 8601, numbers as numbers, empty cells as `null`, empty rows dropped.
- CSV: delimiter (`,` `;` tab `|`) and encoding (UTF-8, Windows-1252) detected automatically.
- **Row mode** (one dataset item per row, with `sourceUrl`, `sheet`, `row`) or **sheet mode** (one item per sheet with a `rows` array).
- Per-file summary (sheets, columns, row counts) in the key-value store (`FILE-0000`...).

### Use it in n8n, Make or Zapier (no code)

This actor works with Apify's official integrations, so you can send results to Google Sheets, Slack, Notion, a CRM or any of thousands of other apps.

**n8n**: [n8n.io](https://n8n.io)

1. In the Nodes panel, search **Apify** and install the verified node. Add your Apify API token.
2. Choose **Actors > Run actor and get dataset**, Actor source **Apify Store**, Actor URL `https://apify.com/sophisticated_occasion/excel-csv-to-json-converter`.
3. Paste the input below into **Input JSON**. Each result item becomes an n8n item.

**Make**: [make.com](https://www.make.com/en/register)

1. Add the **Apify > Run an Actor** module, select this actor, turn on *Run synchronously*.
2. Add **Apify > Get Dataset Items** and map the `defaultDatasetId` from step 1.
3. Connect any app (Google Sheets > Add a Row, Slack > Create a Message, ...).

**Zapier:** use the **Apify** app, action **Run Actor** (pick this actor, paste the input), then **Fetch Dataset Items**.

**Example input**

```json
{
  "fileUrls": [
    "https://raw.githubusercontent.com/datasets/co2-ppm/main/data/co2-mm-mlo.csv"
  ],
  "outputMode": "rows",
  "headerRow": 0,
  "noHeader": false
}
```

**API (any language):** `POST https://api.apify.com/v2/acts/sophisticated_occasion~excel-csv-to-json-converter/run-sync-get-dataset-items` with header `Authorization: Bearer <APIFY_TOKEN>` and the input above as the JSON body.

### Limits and safety

Files up to 60 MB; `maxRowsPerFile` caps the output (and the cost). XLSX parsing is protected against zip bombs and XML attacks. Formulas are returned as their last saved value.

### Responsible use

Only convert files you own or are allowed to use. Use direct download links. We follow **robots.txt** for every download, use an honest User-Agent (`SheetConverter/1.0`), and never log in or bypass protections, so links behind a login (or sites that disallow automated access) will not work.

| Event | Price |
|---|---|
| File converted | $0.009 |
| Per started 100 rows output | $0.002 |

*Maintained by DigiVibeTech. Questions or bugs: use the Issues tab; we reply within 2–5 business days.*

# Actor input Schema

## `fileUrls` (type: `array`):

Direct download links to XLSX, XLS, CSV or TSV files you own or may use (up to 500). Example: monthly Mauna Loa CO2 data (public domain, ODC-PDDL).

## `outputMode` (type: `string`):

Row mode is easiest for automations; sheet mode keeps sheets together.

## `sheets` (type: `array`):

Sheet names to convert. Empty = all sheets.

## `headerRow` (type: `integer`):

0 = detect automatically (skips title rows above the table). Otherwise the row number of the header.

## `noHeader` (type: `boolean`):

Columns are then named column_1, column_2, ...

## `skipEmptyRows` (type: `boolean`):

Rows with no values are left out.

## `maxRowsPerFile` (type: `integer`):

Hard limit per file (all sheets together), so the cost is predictable.

## Actor input object example

```json
{
  "fileUrls": [
    "https://raw.githubusercontent.com/datasets/co2-ppm/main/data/co2-mm-mlo.csv"
  ],
  "outputMode": "rows",
  "headerRow": 0,
  "noHeader": false,
  "skipEmptyRows": true,
  "maxRowsPerFile": 100000
}
```

# Actor output Schema

## `results` (type: `string`):

All result items (overview view)

## `errors` (type: `string`):

Inputs that could not be processed, with the reason

## `summary` (type: `string`):

Counts of processed, billed and failed items

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fileUrls": [
        "https://raw.githubusercontent.com/datasets/co2-ppm/main/data/co2-mm-mlo.csv"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sophisticated_occasion/excel-csv-to-json-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "fileUrls": ["https://raw.githubusercontent.com/datasets/co2-ppm/main/data/co2-mm-mlo.csv"] }

# Run the Actor and wait for it to finish
run = client.actor("sophisticated_occasion/excel-csv-to-json-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fileUrls": [
    "https://raw.githubusercontent.com/datasets/co2-ppm/main/data/co2-mm-mlo.csv"
  ]
}' |
apify call sophisticated_occasion/excel-csv-to-json-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sophisticated_occasion/excel-csv-to-json-converter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/PyHe1CWbMM01NRkA7/builds/KoYhrUBhZ1Gfn2eEp/openapi.json
