> ## Documentation Index
> Fetch the complete documentation index at: https://agents.nanonets.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate files

> Create PDFs, spreadsheets, Word documents, CSVs, and reports from agent work.

Agents can create files as part of a task.

This is useful when your team needs a report, spreadsheet, draft document, or downloadable result.

<Frame caption="The agent generated an invoice_summary.md file, shown in the task feed as a downloadable result.">
  <img src="https://mintcdn.com/nanonets-fb7e8f2a/eksLpltcNl29FEi2/images/generated-file.png?fit=max&auto=format&n=eksLpltcNl29FEi2&q=85&s=a8aa096ca02acd4944d62bdcf54daac9" alt="Task feed showing a generated file, invoice_summary.md, as a downloadable result" width="600" height="92" data-path="images/generated-file.png" />
</Frame>

## Common file types

Agents can create:

* PDF reports
* Excel spreadsheets
* Word documents
* CSV files
* HTML pages
* Markdown documents

## When to generate a file

Use file generation when you want the agent to create a finished output.

Examples:

* A PDF summary of an invoice review.
* An Excel file with extracted line items.
* A Word draft for a customer response.
* A CSV file for upload into another system.
* A Markdown report for internal notes.

## How it works

<Steps>
  <Step title="Tell the agent what to create">
    Example: "Create an Excel file with one row per invoice line item."
  </Step>

  <Step title="Choose the format">
    Pick the file type your team needs, such as PDF, Excel, Word, or CSV.
  </Step>

  <Step title="Use data from the task">
    The agent can use extracted data, lookup results, user answers, or summaries from earlier steps.
  </Step>

  <Step title="Download or send the file">
    The finished file appears in the task. The agent can also upload it to Google Drive or send it by email.
  </Step>
</Steps>

## Use the right format

| Need                                  | Best format |
| ------------------------------------- | ----------- |
| A polished report                     | PDF         |
| A spreadsheet for review              | Excel       |
| A simple data export                  | CSV         |
| A document someone will edit          | Word        |
| A web-style summary                   | HTML        |
| Internal notes or lightweight reports | Markdown    |

## Create spreadsheets from documents

If your goal is to turn tables from a PDF into a spreadsheet, use the PDF to Excel capability.

This is helpful for invoices, purchase orders, statements, and reports with many rows.

## Share generated files

After creating a file, the agent can:

* Leave it in the task for download.
* Upload it to Google Drive.
* Attach it to an email.
* Send a link in Slack or Teams.

<Note>
  Keep file instructions simple. Tell the agent the format, the audience, and the exact sections or columns you want.
</Note>
