# Merge Weekly Excel & CSV Reports Automatically

**Use case:** 

Combine weekly sales reports, regional spreadsheets, and business exports into one Excel workbook. Automatically align column headers and identify source files. Process up to 50 Excel and CSV files in one run, without opening Excel or writing code.

## Input

```json
{
  "operation": "consolidate",
  "files": [
    {
      "url": "https://raw.githubusercontent.com/eschaq/dws-spreadsheet-samples/main/north.csv"
    },
    {
      "url": "https://raw.githubusercontent.com/eschaq/dws-spreadsheet-samples/main/south.xlsx"
    },
    {
      "url": "https://raw.githubusercontent.com/eschaq/dws-spreadsheet-samples/main/west.xls"
    }
  ],
  "outputFormat": "xlsx",
  "consolidate": {
    "strategy": "stack_rows",
    "addSourceColumn": true
  },
  "pivot": {
    "groupBy": [
      "Region"
    ],
    "values": [
      "Revenue"
    ],
    "aggregations": [
      "sum"
    ]
  }
}
```

## Output

```json
{
  "operation": {
    "label": "Operation",
    "format": "string"
  },
  "outputFormat": {
    "label": "Format",
    "format": "string"
  },
  "filesIn": {
    "label": "Files in",
    "format": "integer"
  },
  "filesLoaded": {
    "label": "Files loaded",
    "format": "integer"
  },
  "rowsIn": {
    "label": "Rows in",
    "format": "integer"
  },
  "rowsOut": {
    "label": "Rows out",
    "format": "integer"
  },
  "outputs": {
    "label": "Output files",
    "format": "array"
  },
  "warnings": {
    "label": "Warnings",
    "format": "array"
  },
  "chargedEvents": {
    "label": "Charged",
    "format": "object"
  },
  "stoppedAtChargeLimit": {
    "label": "Stopped at limit",
    "format": "boolean"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Excel & CSV Merger: Consolidate, Pivot & Batch Convert Actor is ready to run with the inputs already set for "Merge Weekly Excel & CSV Reports Automatically". [Sign up or log in](https://console.apify.com/create-task-from-example/yNIbNdjc7PwHYU8JD) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Merge Weekly Excel & CSV Reports Automatically" task

The Excel & CSV Merger: Consolidate, Pivot & Batch Convert Actor will start running based on the input automatically. You can also change all the input fields, like operation, files (url or base64), and more, to match your specific use case.

### 3. Receive the "Merge Weekly Excel & CSV Reports Automatically" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as operation, format, files in, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Merge Weekly Excel & CSV Reports Automatically" task via API](https://apify.com/dws_build/excel-csv-merger-consolidate-pivot-batch-convert.md).

## FAQ

### How much does it cost?

A completed consolidation costs $0.10, plus a small startup fee and standard Apify platform usage.

### Can I automate this every week?

Yes. Save the task with your file URLs and configure a recurring schedule in your own Apify account.

### Which file formats are supported?

Input supports XLSX, XLSM, XLS and CSV. Output supports XLSX, CSV and JSON.

### How many files can I merge?

Up to 50 files per run, with a combined maximum size of 30 MB.

## About this Actor

This example demonstrates how to use [Excel & CSV Merger: Consolidate, Pivot & Batch Convert](https://apify.com/dws_build/excel-csv-merger-consolidate-pivot-batch-convert.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/dws_build/excel-csv-merger-consolidate-pivot-batch-convert.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/dws_build/excel-csv-merger-consolidate-pivot-batch-convert.md

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`).
