# PPTX DOCX XLSX Generator (Office Files from Markdown & JSON) (`josefbednar/pptx-docx-xlsx-generator`) Actor

Generate real Office files via API: PowerPoint PPTX decks, Word DOCX documents, and Excel XLSX spreadsheets from Markdown or JSON. Clean built-in themes, tables, bullets, code blocks. Built for automations and AI agents (MCP-ready). Pay per document.

- **URL**: https://apify.com/josefbednar/pptx-docx-xlsx-generator.md
- **Developed by:** [Josef Bednář](https://apify.com/josefbednar) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## PPTX, DOCX & XLSX Generator — Office Files from Markdown & JSON

Generate real, editable Microsoft Office files via API: **PowerPoint (.pptx)**,
**Word (.docx)**, and **Excel (.xlsx)** — from plain Markdown or structured JSON. No
Office install, no LibreOffice, no template licensing. Pick a clean built-in theme and
get a polished file back in well under a second.

Made for **automation pipelines and AI agents**. LLMs write great content but cannot
emit Office binaries — this actor is the missing step, and it works as an **MCP tool**
so an agent can turn its Markdown into a finished deck, report, or spreadsheet in one call.

### What it does

- **PowerPoint** — Markdown headings / `---` become slides; bullets, numbered lists,
  tables, and code blocks are rendered with a title slide and accent styling
- **Word** — headings, paragraphs, bullet/numbered lists, styled tables, and code
  blocks in a clean, readable document
- **Excel** — each Markdown table becomes a worksheet (numbers auto-detected), or pass
  JSON rows directly; frozen header row and auto-sized columns
- **Three themes** — `clean` (light, teal), `boardroom` (light, navy serif), `night` (dark)

### Input

| Field | Type | Notes |
|---|---|---|
| `format` | select | `pptx`, `docx`, or `xlsx` (required) |
| `markdown` | string | Content as Markdown |
| `data` | object | Structured JSON alternative to Markdown (see below) |
| `theme` | select | `clean`, `boardroom`, or `night` |
| `title` | string | Title slide / document title |
| `author` | string | Written to file properties |
| `filename` | string | Output name (extension added automatically) |

#### Markdown → slides

Split slides with `---` or a `#`/`##` heading. Everything CommonMark-ish in between —
bullets, `1.` lists, `| tables |`, and ` ``` ` code fences — is rendered.

#### Structured JSON

```json
{ "slides": [ { "title": "Q3", "bullets": ["Up 18%", "2 launches"],
  "table": { "header": ["Region","Rev"], "rows": [["EU","1.2M"],["US","0.9M"]] } } ] }
```

For Excel: `{ "sheets": { "Leads": [ {"name":"Acme","mrr":4200} ] } }` or a bare array of objects.

### Output

The file is stored in the run's key-value store; the dataset record has the direct URL:

```json
{
  "status": "SUCCESS",
  "format": "pptx",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/document.pptx",
  "sizeBytes": 88412,
  "units": "4 slides",
  "generationTimeMs": 312
}
```

### Call it from code

```bash
curl -s "https://api.apify.com/v2/acts/josefbednar~pptx-docx-xlsx-generator/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST -H 'Content-Type: application/json' \
  -d '{"format":"docx","title":"Weekly Report","markdown":"## Summary\nAll systems green.\n\n- Uptime 99.98%\n- 0 incidents"}'
```

### FAQ

**Are the files really editable?**
Yes — these are genuine OOXML files (the same format Office saves), fully editable in
PowerPoint, Word, Excel, Google Workspace, LibreOffice, and Keynote/Numbers.

**Can it match my brand?**
Pick a theme today; per-brand color/logo templates are on the roadmap. Open an issue
or review with what you need.

**Does it handle large documents?**
Comfortably — hundreds of slides / thousands of spreadsheet rows. Very large inputs
scale linearly in time and memory.

# Actor input Schema

## `format` (type: `string`):

Which Office file to generate.

## `markdown` (type: `string`):

Document content as Markdown. For PPTX: `---` or `#`/`##` headings start a new slide. For XLSX: each Markdown table becomes a sheet. Ignored if structured `data` is provided.

## `data` (type: `object`):

Alternative to Markdown. PPTX: {"slides":\[{"title":"...","bullets":\["..."],"paragraphs":\["..."],"table":{"header":\[],"rows":\[\[]]}}]}. XLSX: {"sheets":{"Sheet name":\[{"col":"value"}]}} or a plain array of objects.

## `theme` (type: `string`):

Visual theme for the generated file.

## `title` (type: `string`):

Used for the title slide (PPTX), document heading metadata, and file properties.

## `author` (type: `string`):

Written into file properties; shown on the PPTX title slide.

## `filename` (type: `string`):

Name of the generated file in the key-value store. Extension is added automatically.

## Actor input object example

```json
{
  "format": "pptx",
  "markdown": "## Highlights\n- Revenue up 18% QoQ\n- Two new market launches\n- Churn at all-time low of 2.1%\n\n---\n\n## Regional performance\n\n| Region | Revenue | Growth |\n| --- | --- | --- |\n| EU | 1200000 | +21% |\n| US | 900000 | +14% |\n| APAC | 400000 | +32% |\n\n---\n\n## Next quarter\n1. Ship v2 onboarding\n2. Expand partner program\n3. Hire three engineers\n",
  "theme": "clean",
  "title": "Quarterly Review",
  "filename": "document"
}
```

# Actor output Schema

## `files` (type: `string`):

No description

## `result` (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 = {
    "markdown": `## Highlights
- Revenue up 18% QoQ
- Two new market launches
- Churn at all-time low of 2.1%

---

## Regional performance

| Region | Revenue | Growth |
| --- | --- | --- |
| EU | 1200000 | +21% |
| US | 900000 | +14% |
| APAC | 400000 | +32% |

---

## Next quarter
1. Ship v2 onboarding
2. Expand partner program
3. Hire three engineers`,
    "title": "Quarterly Review"
};

// Run the Actor and wait for it to finish
const run = await client.actor("josefbednar/pptx-docx-xlsx-generator").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 = {
    "markdown": """## Highlights
- Revenue up 18% QoQ
- Two new market launches
- Churn at all-time low of 2.1%

---

## Regional performance

| Region | Revenue | Growth |
| --- | --- | --- |
| EU | 1200000 | +21% |
| US | 900000 | +14% |
| APAC | 400000 | +32% |

---

## Next quarter
1. Ship v2 onboarding
2. Expand partner program
3. Hire three engineers
""",
    "title": "Quarterly Review",
}

# Run the Actor and wait for it to finish
run = client.actor("josefbednar/pptx-docx-xlsx-generator").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 '{
  "markdown": "## Highlights\\n- Revenue up 18% QoQ\\n- Two new market launches\\n- Churn at all-time low of 2.1%\\n\\n---\\n\\n## Regional performance\\n\\n| Region | Revenue | Growth |\\n| --- | --- | --- |\\n| EU | 1200000 | +21% |\\n| US | 900000 | +14% |\\n| APAC | 400000 | +32% |\\n\\n---\\n\\n## Next quarter\\n1. Ship v2 onboarding\\n2. Expand partner program\\n3. Hire three engineers\\n",
  "title": "Quarterly Review"
}' |
apify call josefbednar/pptx-docx-xlsx-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,josefbednar/pptx-docx-xlsx-generator"
        }
    }
}

```

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/rxBTZazqWawYHYUnC/builds/IoqyfmHWECiImX9QN/openapi.json
