# Excel to JSON: XLSX, CSV & TSV files from URLs (`glistening_film/spreadsheet-to-json`) Actor

Convert XLSX, CSV and TSV files from URLs into clean JSON — one dataset item per spreadsheet row — with all sheets included and types preserved. $0.01 per successfully converted file, no start fee. Failed, unsupported or corrupt files are reported but never charged.

- **URL**: https://apify.com/glistening\_film/spreadsheet-to-json.md
- **Developed by:** [Yodesla](https://apify.com/glistening_film) (community)
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 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 to JSON: XLSX, CSV & TSV from URLs, pay per converted file

Turn **.xlsx, .csv and .tsv** files from URLs into clean JSON — every spreadsheet row becomes one
dataset item, so you can download the result as JSON, CSV, Excel or JSONL, or feed it straight
into your automation (Make, Zapier, n8n, your own code). **$0.01 per successfully converted
file, no start fee.**

### Use cases

- Feeding spreadsheet data into Make, Zapier, n8n or your own code
- Normalizing a batch of customer/vendor XLSX and CSV exports to one JSON schema
- Turning shared spreadsheets (public URLs) into API-ready rows
- Prepping tabular data for AI/RAG pipelines

### Features

- **All sheets** of a workbook, or only the ones you name.
- **Header detection:** the first non-empty row becomes the field names. Duplicate headers get
  `_2`, `_3`; blank headers become `column_N`. You can turn this off.
- **Types preserved:** numbers stay numbers, true/false stay booleans, dates become ISO 8601
  strings, and formulas return their saved (cached) value.
- **CSV auto-detection:** comma, semicolon, tab or pipe delimiters; UTF-8 (with or without BOM)
  or Windows-1252 text.
- Every row carries `_file`, `_sheet` and `_row` so you can trace it back.
- A **per-file report** (key-value store record `REPORT`) lists status, sheets, row counts,
  columns and truncation for every URL.

### Pricing: pay only for files that converted

**One event per successfully converted file ($0.01)**, however many sheets or rows it has (up to
your limits). Failed downloads, unsupported formats (e.g. legacy `.xls`), password-protected or
corrupt files, empty files and limit hits are **reported but never charged**. There is no start
fee. The run checks your spending limit before each file.

### Limits

- Up to 50 URLs per run; files up to 50 MB (default 20); up to 200,000 rows per sheet
  (default 50,000).
- 2,000,000 cells per file; 60 seconds of processing per file.
- Public `http(s)` links only; local and private-network addresses are refused.
- Not supported: legacy `.xls` (save as `.xlsx`), password-protected workbooks, `.ods`.
- Formulas: the value saved in the file is returned. Files written by tools that don't save
  computed values return empty values for formula cells.

### FAQ

**Does it support legacy .xls or .ods files?** No — `.xlsx`, `.csv` and `.tsv` only. Save
legacy `.xls` as `.xlsx` first.

**Does it read every sheet in a workbook?** Yes, all sheets by default, or only the ones you
name.

**How are formulas handled?** The cached value saved in the file is returned. Files written by
tools that don't save computed values return empty values for formula cells.

**Do I pay per row or per file?** Per file: $0.01 per successfully converted file, no start
fee, however many sheets or rows it has (up to your limits).

**What happens with a file that fails?** It is reported in the per-file report with its status
and never charged.

**Can I get the output in other formats?** Yes — download the dataset as JSON, CSV, Excel or
JSONL.

### Input example

```json
{
  "fileUrls": ["https://example.com/report.xlsx", "https://example.com/data.csv"],
  "firstRowIsHeader": true,
  "sheetNames": [],
  "maxRowsPerSheet": 50000
}
```

### Output example (one dataset item)

```json
{"_file": "https://example.com/report.xlsx", "_sheet": "Orders", "_row": 1,
 "id": 1, "amount": 19.99, "date": "2026-09-01T00:00:00", "paid": true}
```

# Actor input Schema

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

Public http(s) links to .xlsx, .csv or .tsv files (max 50 per run). Legacy .xls is not supported (save as .xlsx).

## `firstRowIsHeader` (type: `boolean`):

Use the first non-empty row as column names (duplicates get \_2, \_3...). Off: columns are column\_1, column\_2...

## `sheetNames` (type: `array`):

For workbooks: convert only sheets with these exact names. Empty = all sheets.

## `maxRowsPerSheet` (type: `integer`):

Rows beyond this are skipped and the sheet is marked truncated in REPORT.

## `maxFileSizeMb` (type: `integer`):

Larger files are skipped (not charged).

## Actor input object example

```json
{
  "fileUrls": [
    "https://people.sc.fsu.edu/~jburkardt/data/csv/hw_200.csv"
  ],
  "firstRowIsHeader": true,
  "maxRowsPerSheet": 50000,
  "maxFileSizeMb": 20
}
```

# Actor output Schema

## `rows` (type: `string`):

One item per spreadsheet row, with \_file, \_sheet and \_row plus one field per column.

## `report` (type: `string`):

Status per input URL (ok, download\_failed, unsupported\_format, invalid\_file, empty, resource\_limit), sheet names, row counts, columns, truncation. Only ok files are charged.

# 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://people.sc.fsu.edu/~jburkardt/data/csv/hw_200.csv"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("glistening_film/spreadsheet-to-json").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://people.sc.fsu.edu/~jburkardt/data/csv/hw_200.csv"] }

# Run the Actor and wait for it to finish
run = client.actor("glistening_film/spreadsheet-to-json").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://people.sc.fsu.edu/~jburkardt/data/csv/hw_200.csv"
  ]
}' |
apify call glistening_film/spreadsheet-to-json --silent --output-dataset

```

## MCP server setup

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

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/F0OiWhyvvBYW6qeRU/builds/utWa3tbT2bVBhVCSS/openapi.json
