# Dataset to Excel Export - Formatted XLSX, Multiple Sheets (`radarweb/dataset-to-excel`) Actor

Turn datasets into a ready-to-share Excel file: bold header, frozen first row, filters, fitted columns, clickable links, nested data as columns, one sheet per dataset. Formula-safe, streams large datasets, never drops late columns.

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

## Pricing

from $0.15 / 1,000 row exporteds

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

## Dataset to Excel: formatted XLSX export

Get a **clean, ready-to-share Excel file** from any Apify run, not a raw CSV dump.

### What you get

- **Header** in bold with a coloured background, **first row frozen**, **filters** on every column.
- **Column widths** fitted to the content, with long outliers ignored.
- **Clickable links**: URLs become real hyperlinks.
- **Nested data becomes columns**: `address.city`, `address.zip`. Lists of text become `cafe, bar`.
- **Several datasets → several sheets** (Rome, Milan, …) in one file, or all stacked in one sheet with a `_source` column.
- **Formula-safe**: scraped text like `=HYPERLINK(...)` is stored as text, so a file you share can never run a hidden formula.
- **Large datasets**: rows are streamed into the file (not held in memory). Beyond Excel's 1,048,576-row limit a new sheet (`p2`, `p3`…) starts automatically.
- Invisible control characters that make Excel refuse a file are removed. Cells longer than Excel's 32,767-character limit are truncated.

### Output

The `.xlsx` file in the run's key-value store, and a dataset row with a **download link** (`fileUrl`), row and sheet counts.

### As an integration

Add it to any scraper under **Integrations → Actor → Run succeeded** and leave *Datasets* empty: every run produces an Excel file. Combine it with *Run Results Notifier* to get the file by email.

### Pricing

Pay per row exported (see the Pricing tab).

# Actor input Schema

## `datasetIds` (type: `array`):

One or more dataset IDs. Each becomes its own sheet. Leave empty when used as an integration (the finished run's dataset is used). Pick a dataset (ID or name). Leave empty to try it with built-in sample data.

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

Optional, in the same order as the datasets.

## `combineIntoOneSheet` (type: `boolean`):

Stack all datasets into a single sheet, with a \_source column.

## `fileName` (type: `string`):

Without extension.

## `columns` (type: `array`):

Only these columns, in this order. Nested fields with dots: address.city.

## `flatten` (type: `boolean`):

address.city, address.zip … Lists of text become comma-separated.

## `clickableLinks` (type: `boolean`):

Cells containing a URL become hyperlinks.

## `maxRows` (type: `integer`):

0 = all rows.

## Actor input object example

```json
{
  "sheetNames": [],
  "combineIntoOneSheet": false,
  "fileName": "results",
  "columns": [],
  "flatten": true,
  "clickableLinks": true,
  "maxRows": 0
}
```

# Actor output Schema

## `file` (type: `string`):

No description

## `output` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("radarweb/dataset-to-excel").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("radarweb/dataset-to-excel").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 '{}' |
apify call radarweb/dataset-to-excel --silent --output-dataset

```

## MCP server setup

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

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/1rXlzia4ZgpPPgc3w/builds/tIIbHTjcxfAUxYfko/openapi.json
