# File Output (PPTX, DOCX, PDF, XLSX)

Ask the AI to "create a presentation summarizing last quarter's results" or "generate an Excel file with this data" — and it produces the actual file, not just a description of one. You can preview it inline and download it immediately.

Note
The AI generates files inside a secure server-side sandbox. It writes the file, and Studio makes it available for preview and download. The AI does not access your local filesystem — all file operations happen server-side, and you choose when to download.

## Objective

Understand how the AI generates document files, how to preview them across platforms, and how to download them for sharing or further editing.

## Prerequisites

- Signed in to Treasure AI Studio ([Getting Started](/products/ai-studio/getting-started))
- Familiarity with the chat interface ([AI Chat Interface](/products/ai-studio/chat/chat))


## Why File Output Matters

Data analysis rarely ends at a query result. Stakeholders need decks, reports, and spreadsheets they can review, annotate, and forward. Studio closes the gap between insight and deliverable:

- **For Marketers:** Ask for a campaign performance deck and get a ready-to-present PPTX with charts and key takeaways
- **For Data Analysts:** Export query results to Excel with proper column headers and multiple sheets for different cuts of the data
- **For Solutions Engineers:** Generate a PDF report documenting a client's CDP configuration with segment definitions and journey flows
- **For all users:** Turn any conversation into a shareable document without switching to another application


## Supported File Formats

| Format | Extension | What the AI Generates | Common Use Cases |
|  --- | --- | --- | --- |
| **PowerPoint** | `.pptx` | Slide decks with titles, bullet points, charts, and speaker notes | Quarterly reviews, campaign summaries, stakeholder presentations |
| **Word** | `.docx` | Formatted documents with headings, paragraphs, tables, and lists | Analysis reports, project documentation, requirements specs |
| **PDF** | `.pdf` | Portable documents for read-only sharing | Executive summaries, compliance reports, client deliverables |
| **Excel** | `.xlsx` | Spreadsheets with structured data, multiple sheets, and column headers | Data exports, pivot-ready datasets, financial models |


## Requesting a File

Ask the AI in natural language. Be specific about format when it matters:

| Request | What You Get |
|  --- | --- |
| "Create a presentation on Q1 results" | PPTX with slides for each key metric, charts, and summary |
| "Write a report on our segment strategy" | DOCX with headings, analysis sections, and recommendations |
| "Export this query result to Excel" | XLSX with data in a named sheet, proper column types |
| "Generate a PDF summary of this conversation" | PDF with formatted text, tables, and any charts referenced |


Pro Tip
You can guide the AI's output by being specific: "Create a 5-slide deck with one slide per region, include a bar chart on each slide, and add speaker notes." The more structure you provide, the more polished the result.

## Previewing Files

When the AI generates a file, a **file notification card** appears in the chat stream showing the filename, format icon, and action buttons. You can preview the file without downloading it.

### Web

Click the **Preview** button on the file card to open the built-in viewer. The file panel appears in the sidebar with a file tree and full-screen preview.

**Format-specific viewers:**

| Format | Viewer Features |
|  --- | --- |
| **PPTX** | Slide thumbnail sidebar (left), main slide view (center), speaker notes (bottom). Navigate with arrow keys, Home/End, or click thumbnails |
| **DOCX** | Rendered HTML view with headings, tables, and formatting preserved. Light and dark mode support |
| **PDF** | Vertical scrolling with zoom controls (0.5x to 3.0x). Fit-to-width mode. Page counter at top |
| **XLSX** | Spreadsheet grid with sortable columns. Sheet tabs at bottom for multi-sheet workbooks. Resizable columns |


PPTX viewer showing slide thumbnails and main slide preview
### Desktop (Mac)

Desktop uses the same file panel as Web, showing a file tree and viewer in the sidebar. Files can be previewed inline or opened in the full viewer.

**PDF rendering** uses the native PDF engine for high-fidelity display. **DOCX** files are converted to HTML and rendered in a sandboxed frame.

### Mobile (iOS)

Tap the file card to open a **full-screen preview**. The viewer adapts to each format:

- **PPTX** — Slide-by-slide viewer optimized for touch
- **DOCX** — Scrollable HTML rendering in a native web view
- **PDF** — Native PDF viewer with pinch-to-zoom
- **XLSX** — Horizontally scrollable spreadsheet with sheet tabs


Technical Note
Large files (over 100KB of rendered content) may show a "Preview truncated" notice on Mobile to ensure smooth scrolling performance. Download the full file for complete viewing.

## Downloading Files

### Web

Click the **Download** button on the file card or in the file viewer toolbar. The file downloads to your browser's default download location.

### Desktop (Mac)

Click the download button in the file viewer. Files download through the Electron file save dialog, letting you choose the destination.

### Mobile (iOS)

Tap the **Download** button on the file preview screen. The file is saved using the iOS share sheet, where you can save to Files, AirDrop, or open in another app.

## Additional File Formats

Beyond the four primary document types, Studio can preview files the AI generates or references during analysis:

| Format | Preview Support | Notes |
|  --- | --- | --- |
| **Images** (PNG, JPG, GIF, SVG) | Full preview | Inline display with zoom |
| **HTML** | Sandboxed preview | Interactive HTML rendered in a secure iframe |
| **Code** (SQL, Python, YAML, JSON, etc.) | Syntax-highlighted view | 20+ languages supported with line numbers |
| **Markdown** | Rendered view | Full Markdown rendering with headers, lists, and tables |
| **CSV / TSV** | Table view | Parsed and displayed as a sortable table |


## File Management

### Web

The **file panel** in the sidebar shows all files generated in the current conversation as a tree view. You can:

- Browse files by name and type
- Click any file to preview it
- Download individual files
- Delete files you no longer need


### Desktop (Mac)

The **file panel** displays files the same way as on Web, with a tree view and inline preview. Each file includes preview and download controls.

### Mobile (iOS)

Files appear in the chat as notification cards. Tap any card to preview. The file list is accessible from the chat's file section.

## How the AI Generates Files

Understanding the generation process helps you make better requests:

1. **Planning** — The AI determines the file structure (slides, sections, sheets) based on your request and the data available
2. **Writing** — The AI generates the file using document creation tools inside the secure sandbox
3. **Notification** — A file card appears in the chat stream with the filename and format
4. **Preview** — You can immediately preview the file in the built-in viewer
5. **Iteration** — Ask the AI to modify the file: "Add a slide for APAC results" or "Change the title to Q1 Review"


Technical Note
File generation happens server-side. The AI writes files to a sandboxed workspace associated with your chat session. Files are accessible for the lifetime of the conversation and can be downloaded at any time.

## Verification

After reading this guide, you can:

- [ ] Request the AI to generate a PPTX, DOCX, PDF, or XLSX file
- [ ] Preview the generated file using the built-in viewer on your platform
- [ ] Download the file for sharing or further editing
- [ ] Navigate a multi-slide PPTX and a multi-sheet XLSX in the preview
- [ ] Ask the AI to modify a generated file within the same conversation


## Troubleshooting

| Issue | Solution |
|  --- | --- |
| File preview is blank | Wait a moment — large files take time to render. If still blank, download and open locally |
| PPTX slides look different than expected | The built-in viewer renders a faithful approximation. For pixel-perfect results, download and open in PowerPoint |
| XLSX columns are narrow | Columns auto-size based on content. In the web viewer, drag column edges to resize |
| PDF zoom is too small | Click the zoom percentage to toggle fit-to-width mode, or use the +/- controls |
| Mobile preview truncated | Large files are truncated for performance. Download the full file to view all content |
| File not appearing in chat | Check that the AI finished generating — look for the completion indicator in the chat stream |


## Next Steps

- [File Upload & Download](/products/ai-studio/files/file-upload-download) — Upload files for the AI to analyze
- [File Viewers](/products/ai-studio/files/file-viewers) — Detailed guide to all built-in file viewers
- [Charts & Data Visualization](/products/ai-studio/visualization/charts) — Interactive charts that complement file output
- [Query Result Tables](/products/ai-studio/query/query-results) — Tabular data that can be exported to Excel