$npx -y skills add DevExpress/agent-skills --skill devexpress-office-file-api-spreadsheetBuild .NET applications with the DevExpress Spreadsheet Document API for creating, reading, modifying, and exporting Excel workbooks programmatically without Microsoft Office. Use when working with .xlsx, .xls, .xlsm, .csv spreadsheet files, cell formatting, formulas, charts, piv
| 1 | # DevExpress Spreadsheet Document API |
| 2 | |
| 3 | The Spreadsheet Document API is a non-visual .NET library for creating, loading, editing, and exporting spreadsheet documents (Excel workbooks) programmatically — without requiring Microsoft Office. It supports .xlsx, .xls, .xlsm, .csv, .txt formats and can export to PDF, HTML, and images. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | Use this skill when you need to: |
| 8 | |
| 9 | - Create Excel workbooks (.xlsx, .xls, .xlsm) programmatically without Microsoft Office |
| 10 | - Read, parse, or extract data from existing .xlsx/.xls/.csv files |
| 11 | - Modify existing spreadsheets (add data, change formatting, update formulas) |
| 12 | - Apply cell formatting (fonts, colors, borders, number formats, conditional formatting) |
| 13 | - Work with formulas and calculated values (SUM, VLOOKUP, IF, array formulas, UDFs) |
| 14 | - Create and configure charts within spreadsheets (column, line, pie, scatter, pivot, Excel 2016) |
| 15 | - Build pivot tables from worksheet data |
| 16 | - Import data from arrays, collections, DataTables, or databases |
| 17 | - Export spreadsheets to PDF, HTML, or images |
| 18 | - Print spreadsheets or configure page setup and print titles |
| 19 | - Protect workbooks or individual worksheets with passwords |
| 20 | - Work with named ranges, tables (ListObjects), data validation, sparklines |
| 21 | |
| 22 | ## Prerequisites & Installation |
| 23 | |
| 24 | ### NuGet Packages |
| 25 | |
| 26 | | Package | Purpose | |
| 27 | |---------|---------| |
| 28 | | `DevExpress.Document.Processor` | Core spreadsheet processing (create, load, edit, save) | |
| 29 | |
| 30 | ### .NET (8/9/10+) |
| 31 | |
| 32 | ```bash |
| 33 | dotnet add package DevExpress.Document.Processor |
| 34 | ``` |
| 35 | |
| 36 | ### .NET Framework (4.6.2+) |
| 37 | |
| 38 | ``` |
| 39 | Install-Package DevExpress.Document.Processor |
| 40 | ``` |
| 41 | |
| 42 | > See [references/getting-started-dotnet-fw.md](references/getting-started-dotnet-fw.md) for the full framework-specific guide. |
| 43 | |
| 44 | **Important**: All DevExpress packages in a project must share the same version number. A valid DevExpress license is required. |
| 45 | |
| 46 | ### Package Versions |
| 47 | |
| 48 | Unless the user explicitly requests a specific version, always target the latest DevExpress release (v26.1 at the time of writing). `dotnet add package <PackageName>` without `--version` installs the latest stable version — prefer this form. Never pin an older version in project files, Dockerfiles, or CI/CD pipelines unless the user asks for it. This is especially important in integration scenarios (Docker, cloud deployments). All `DevExpress.*` packages in a project must share the same version. |
| 49 | |
| 50 | ### Non-Windows Development (Linux, macOS, Docker, Cloud) |
| 51 | |
| 52 | On non-Windows platforms, add the Skia-based drawing engine package: `dotnet add package DevExpress.Drawing.Skia` (plus `DevExpress.Pdf.SkiaRenderer` only if the app renders PDF page content, e.g. `Workbook.ExportToPdf`). The SkiaSharp-based engine is enabled **automatically** on non-Windows platforms. Enable `Settings.DrawingEngine` at app startup only to force Skia *on Windows* (e.g., to work around the 10K GDI-handle limit). |
| 53 | |
| 54 | See [references/getting-started.md](references/getting-started.md) for the full non-Windows setup and troubleshooting guide. |
| 55 | |
| 56 | ## Before You Start — Ask the Developer |
| 57 | |
| 58 | If the host agent has a structured question-asking tool available, use it to ask these questions one at a time with clear options — for example, Claude Code's `AskUserQuestion` tool or GitHub Copilot's `askQuestions` tool. If no such tool is available, ask the questions directly in the chat response before generating code. |
| 59 | |
| 60 | Before generating code, ask these questions to avoid rework: |
| 61 | |
| 62 | ### General Questions |
| 63 | 1. **Target framework**: Are you using .NET 8+ or .NET Framework 4.x? |
| 64 | 2. **New or existing project?**: Creating new or adding to existing? |
| 65 | 3. **Hosting model**: Console app, ASP.NET Core, Blazor, MAUI, WinForms, WPF, or something else? |
| 66 | |
| 67 | ### Spreadsheet-Specific Questions |
| 68 | 4. **Operation type**: Create new, read existing, modify, export, or convert? |
| 69 | 5. **Features needed**: Formatting, formulas, charts, pivot tables, data import, mail merge, protection? |
| 70 | 6. **Output format**: .xlsx, .csv, PDF, HTML, or image? |
| 71 | |
| 72 | > **Rule**: If the developer's answer is ambiguous or missing, ask before generating code. Do not guess. |
| 73 | |
| 74 | ## Component Overview |
| 75 | |
| 76 | The Spreadsheet Document API provides: |
| 77 | |
| 78 | - **Document management** |