# Word Table to Excel & CSV: Convert DOCX Tables to Sheets (`adhistory/word-tables-to-excel`) Actor

Word table to Excel converter at $1.50 per 1,000 tables. Paste .docx or shared Google Docs links and get every table as rows keyed by its header, one Excel file per document (one sheet per table) and a CSV per table. Merged cells handled.

- **URL**: https://apify.com/adhistory/word-tables-to-excel.md
- **Developed by:** [Brandon Ob](https://apify.com/adhistory) (community)
- **Categories:** Automation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 table extracteds

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

## Word Table to Excel & CSV: convert DOCX tables to spreadsheets

This Word table to Excel converter takes links to Word (.docx) files or shared Google Docs and returns every table inside as rows keyed by the table's header, plus **one Excel file per document (one sheet per table)** and **one CSV per table**. Each table keeps the heading written above it, merged cells are filled in so filters work, and numbers like `1,250` arrive as real numbers. You pay per table delivered: $1.50 per 1,000 tables, nothing for documents that fail or have no tables.

### What does Word Table to Excel & CSV do?

- Finds **every table in a Word document**, in reading order, including tables nested inside a table cell.
- Converts each one to **Excel and CSV**: an `.xlsx` workbook per document with one sheet per table (frozen header row), a CSV per table, and the rows as JSON in the dataset.
- Labels each table with the **heading above it** ("Supplier price list", "Table 3. Prices by region"), and names the Excel sheet after it.
- Handles **merged cells**: a merged value is repeated in every row and column it covers, so pivot tables and filters work. You can turn that off.
- Spots **title rows** merged across the whole table (common in SAS, SPSS and report exports), moves them to a `title` field and uses the real header row underneath.
- Turns plain numbers (`1,250`, `3.50`, `-42`) into numbers in Excel; IDs with leading zeros, dates and phone numbers stay as text.
- Accepts **Google Docs links** shared as "Anyone with the link" and downloads them as .docx for you.
- Lists documents that could not be read, and documents with no tables, in a `SUMMARY` record.

### Use cases

- **Operations and procurement:** convert supplier price lists, rate cards and order forms sent as Word files into Excel you can import.
- **Analysts and researchers:** pull results tables out of Word reports, statistical output (SAS/SPSS exported to Word) and survey write-ups.
- **Legal and compliance teams:** extract schedules, fee tables and obligation lists from contracts and policies in .docx.
- **HR and project managers:** turn timetables, rosters and project plans kept in Word into CSV for a tracker or database.
- **Developers and no-code builders:** add a "Word document to rows" step to a pipeline and send the tables to Google Sheets, Airtable or a database.

### How to convert a Word table to Excel

1. Open the Actor and paste links to .docx files, one per line. Each link must download the file without a login. For a Google Doc, share it as "Anyone with the link" and paste the normal document link.
2. Optional: turn off **First row is the header** if your tables have no header row, or raise **Minimum data rows** to skip small layout tables.
3. Click **Start**. Open the **Tables** view, or use the `excelUrl` link for one spreadsheet per document.
4. To convert new documents regularly, save the input as a task and schedule it, or call the Actor from the API, Make, Zapier or n8n.

Try it first with the word `sample` (a built-in example document with four tables).

### Input

| Field | What it does |
|---|---|
| `docUrls` | Links to .docx files or shared Google Docs, one per line. `sample` runs the built-in example. |
| `firstRowIsHeader` | Use each table's first row as column names (default on). |
| `repeatMergedCells` | Copy a merged cell's value into every cell it spans (default on). |
| `includeNestedTables` | Also return tables inside table cells (default on). |
| `minRows` | Skip tables with fewer data rows than this (default 1). |
| `maxItems` | Stop after this many tables (default 200). |

```json
{
  "docUrls": ["sample", "https://example.com/files/price-list.docx"],
  "firstRowIsHeader": true
}
```

### Output

One dataset item per table. From the built-in sample:

| docUrl | table | heading | rowCount | columns |
|---|---|---|---|---|
| sample | 1 | Supplier price list | 7 | SKU, Product, Unit, Price (USD), Lead time (days) |
| sample | 2 | Quarterly sales by region | 5 | Region, Q1 units, Q1 revenue, Q2 units, ... |
| sample | 3 | Project schedule | 5 | Task, Owner, Start, End, Status |
| sample | 4 | Contacts | 3 | Team, Name, Role, Phone |

```json
{
  "docUrl": "sample",
  "table": 4,
  "tablesInDoc": 4,
  "heading": "Contacts",
  "title": "",
  "nested": false,
  "columns": ["Team", "Name", "Role", "Phone"],
  "rowCount": 3,
  "columnCount": 4,
  "rows": [
    {"Team": "Sales", "Name": "Jordan Price", "Role": "Account manager", "Phone": "555-0142"},
    {"Team": "Sales", "Name": "Riley Chen", "Role": "Sales assistant", "Phone": "555-0143"},
    {"Team": "Support", "Name": "Morgan Diaz", "Role": "Support lead", "Phone": "555-0170"}
  ],
  "csvUrl": "https://api.apify.com/v2/key-value-stores/.../records/01-sample-tables-table-04.csv",
  "excelUrl": "https://api.apify.com/v2/key-value-stores/.../records/01-sample-tables.xlsx",
  "extractedAt": "2026-11-19T09:12:00+00:00"
}
```

In the "Contacts" table, "Sales" is one merged cell in Word; it comes back on both rows.

### Pricing

Pay per result: **$1.50 per 1,000 tables** ($0.0015 per table), with no start fee. Documents that fail or contain no tables are free. Set a maximum cost per run and the Actor stops cleanly at it. A run with the built-in sample costs well under one cent.

### Limits

- **.docx only.** Old Word 97-2003 `.doc` files, PDFs, `.odt` and `.rtf` are not read; save them as .docx first. For PDFs use [PDF Table to Excel & CSV](https://apify.com/adhistory/pdf-tables-to-excel).
- Tables must be real Word tables. Text lined up with tabs or spaces is not a table, and tables pasted as pictures need [Image Table to Excel & CSV](https://apify.com/adhistory/image-tables-to-excel).
- Links must download without a login. SharePoint, OneDrive and Dropbox links work only when they point straight at the file (for Dropbox, use `?dl=1`).
- Formatting (colours, fonts, column widths) is not copied, only the text in each cell. Formulas in Word fields come back as their displayed value.
- Files up to 50 MB.

### FAQ

**How do I convert a table from Word to Excel without copy-paste?** Paste the document link into this Actor and download the `excelUrl` workbook: every table is its own sheet with the header row frozen. That is the same result as copying each table into Excel by hand, for any number of documents at once.

**Can it convert all tables in a Word document at once?** Yes. Every table in the document becomes a separate dataset item, CSV file and Excel sheet, in the order they appear.

**What happens to merged cells?** By default the merged value is written into every cell it covered, so each row stands on its own. Turn off "Repeat merged cell values" to keep it only in the first cell, like Word shows it.

**Does it work with Google Docs?** Yes, when the doc is shared as "Anyone with the link can view". Paste the normal `docs.google.com/document/d/...` link; the Actor downloads it as .docx.

**Can I send the tables to Google Sheets?** Yes: chain it with [Google Sheets Export & Import](https://apify.com/adhistory/google-sheets-export-actor), or use the CSV link in Sheets with `IMPORTDATA`.

**Am I charged for documents that failed?** No. Only delivered tables are charged; failures are listed in `SUMMARY`.

### Related tools

- [HTML Table to Excel & CSV](https://apify.com/adhistory/html-tables-to-excel): tables from public web pages, merged cells and two-row headers handled.
- [PDF Table to Excel & CSV](https://apify.com/adhistory/pdf-tables-to-excel): tables from PDF files, joined across page breaks.
- [Image Table to Excel & CSV](https://apify.com/adhistory/image-tables-to-excel): tables from screenshots, photos and scans.
- [Invoice PDF to Excel & CSV](https://apify.com/adhistory/invoice-pdf-to-excel): invoice numbers, totals and line items from invoice PDFs.
- [Bank Statement PDF to Excel & CSV](https://apify.com/adhistory/bank-statement-to-excel): transactions and balances from bank statements.
- [Payslip PDF to Excel & CSV](https://apify.com/adhistory/payslip-pdf-to-excel): gross pay, tax, deductions and net pay from payslips.
- [Google Sheets Export & Import](https://apify.com/adhistory/google-sheets-export-actor): send the rows straight into a Google Sheet.

Found a bug or need a feature? Open an issue on the Issues tab — I usually reply within a day.

# Actor input Schema

## `docUrls` (type: `array`):

Links to Word .docx files, one per line, reachable without a login. A Google Docs link works when the doc is shared as 'Anyone with the link'. Enter the word sample to try a built-in example document.

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

Use each table's first row as column names. Turn off to get Column 1, Column 2 and so on.

## `repeatMergedCells` (type: `boolean`):

A merged cell's value is copied into every row and column it spans, so filters and pivot tables work. Turn off to keep it only in the first cell.

## `includeNestedTables` (type: `boolean`):

Also return tables nested inside another table's cell, as separate tables after their parent.

## `minRows` (type: `integer`):

Skip tables with fewer data rows than this (layout tables, single-cell boxes).

## `maxItems` (type: `integer`):

Stop after this many tables. You are charged per table delivered.

## Actor input object example

```json
{
  "docUrls": [
    "sample",
    "https://calibre-ebook.com/downloads/demos/demo.docx",
    "https://raw.githubusercontent.com/apache/poi/trunk/test-data/document/bug57031.docx"
  ],
  "firstRowIsHeader": true,
  "repeatMergedCells": true,
  "includeNestedTables": true,
  "minRows": 1,
  "maxItems": 200
}
```

# Actor output Schema

## `tables` (type: `string`):

No description

## `summary` (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 = {
    "docUrls": [
        "sample",
        "https://calibre-ebook.com/downloads/demos/demo.docx",
        "https://raw.githubusercontent.com/apache/poi/trunk/test-data/document/bug57031.docx"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adhistory/word-tables-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 = { "docUrls": [
        "sample",
        "https://calibre-ebook.com/downloads/demos/demo.docx",
        "https://raw.githubusercontent.com/apache/poi/trunk/test-data/document/bug57031.docx",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("adhistory/word-tables-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 '{
  "docUrls": [
    "sample",
    "https://calibre-ebook.com/downloads/demos/demo.docx",
    "https://raw.githubusercontent.com/apache/poi/trunk/test-data/document/bug57031.docx"
  ]
}' |
apify call adhistory/word-tables-to-excel --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,adhistory/word-tables-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/RHcjiWEt80eFw1ssZ/builds/kNgmrLk6oYkqHbWIX/openapi.json
