# Excel to CSV Converter - XLSX Sheets to CSV or TSV Files (`kotaro-project/excel-to-csv-converter`) Actor

Convert the sheets of up to 20 public .xlsx files into CSV or TSV files with a download link and the first rows of each sheet. Pick sheets by name or take all. Formulas become their saved values, dates become ISO. UTF-8, UTF-8 with BOM for Excel, or Shift_JIS. Pay per file.

- **URL**: https://apify.com/kotaro-project/excel-to-csv-converter.md
- **Developed by:** [KOTARO project](https://apify.com/kotaro-project) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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 CSV Converter

Turn the sheets of public `.xlsx` files into CSV (or TSV) files. Each sheet becomes one file with a download link, and you see its first rows right in the results.

### What you get

For every `.xlsx` file:

- **files**: one entry per sheet with `sheet`, `downloadUrl`, `rows`, `columns` and `preview` (the first 5 rows)
- **downloadUrl**, **rows** and **preview** of the first sheet at the top level, for a quick look
- **missingSheets** if a sheet name you asked for does not exist

### Input

| Field | What it is |
|---|---|
| `fileUrls` | Public addresses of `.xlsx` files, up to 20, each up to 50 MB |
| `sheets` | Sheet names to convert. Empty = the first sheet only |
| `allSheets` | Convert every sheet (same price) |
| `delimiter` | Comma, tab (makes `.tsv`), semicolon or pipe |
| `encoding` | UTF-8, UTF-8 with BOM (opens correctly in Excel), or Shift_JIS |
| `dateFormat` | `iso` (2026-11-14) or a pattern such as `%d/%m/%Y` |
| `skipEmptyRows` | Leave out empty rows |

The sample input converts Microsoft's public "Financial Sample" workbook, so you can see a result in a few seconds.

### Good to know

- Formulas are written as the values saved in the file, not as formulas.
- Old `.xls` files are not supported. Save them as `.xlsx` first.
- Files that unpack to more than 500 MB (zip bombs) are refused. Only the files you name are downloaded; internal and private addresses are refused.
- The CSV files are kept in the run's key-value store, under the storage retention of your Apify plan.

### Price

You pay once per `.xlsx` file converted (`file-converted`), whatever the number of sheets. Files that cannot be downloaded or read are **not charged**. An empty input ends at once with a free note.

# Actor input Schema

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

Public addresses of .xlsx files, up to 20, each up to 50 MB. Old .xls files are not supported. Internal addresses are refused.

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

Names of the sheets to convert. Leave empty to convert only the first sheet.

## `allSheets` (type: `boolean`):

Convert every sheet of each file into its own CSV file. This does not change the price.

## `delimiter` (type: `string`):

The character between values. Tab makes .tsv files.

## `encoding` (type: `string`):

UTF-8 for most tools. UTF-8 with BOM opens with correct characters when double-clicked in Excel. Shift_JIS for older Japanese software.

## `dateFormat` (type: `string`):

iso writes 2026-11-14 or 2026-11-14 09:30:00. Or a pattern such as %d/%m/%Y.

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

Leave out rows that have no values.

## Actor input object example

```json
{
  "fileUrls": [
    "https://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx"
  ],
  "allSheets": false,
  "delimiter": "comma",
  "encoding": "utf-8",
  "dateFormat": "iso",
  "skipEmptyRows": true
}
```

# Actor output Schema

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

No description

# 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://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kotaro-project/excel-to-csv-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://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx"] }

# Run the Actor and wait for it to finish
run = client.actor("kotaro-project/excel-to-csv-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://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx"
  ]
}' |
apify call kotaro-project/excel-to-csv-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kotaro-project/excel-to-csv-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/f0VbgUJmn8u8w4IWv/builds/rdT3eELVfQScXjwnZ/openapi.json
