agentleFS
aspose-cellsaspose-cells/agentic-net-examples/AGENTS.md

agentic-net-examples

AGENTS.md1 starsChanged 2 months agoMITView on GitHub

Enterprise instructions for creating, validating, retrieving, and citing C# Excel processing examples with Aspose.Cells for .NET.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

60 rules. About 0 are common, 48 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈48

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every accepted example must solve one clear developer problem, use APIs available in the installed Aspose.Cells package, produce an …

    line 46
  2. Distinctive:

    Follow the explicit user or task requirement when it is safe and in scope.

    line 52
  3. Distinctive:

    Follow this repository-level AGENTS.md.

    line 53
  4. Distinctive:

    Follow the instruction file inside the selected category when it is more specific.

    line 54
  5. Distinctive:

    Follow the installed Aspose.Cells package and official API reference.

    line 55
  6. Distinctive:

    Use existing examples and filenames only as discovery material.

    line 56
  7. Distinctive:

    If a task spans categories, place it where the dominant API and expected result belong.

    line 117
  8. Distinctive:

    Use a smaller example when the task requires only one operation.

    line 164
  9. Distinctive:

    Start with explicit types:

    line 176
  10. Very specific:

    Do not assign directly to a Cell collection index.

    line 201
  11. Very specific:

    Use format-specific options such as PdfSaveOptions, HtmlSaveOptions, or ImageOrPrintOptions only when the example demonstrates those …

    line 223
  12. Distinctive:

    Do not introduce Excel Interop, Office automation, Office Scripts, or a Microsoft Excel installation into Aspose.Cells examples.

    line 227
  13. Very specific:

    Use explicit types instead of var.

    line 234
  14. Distinctive:

    Use meaningful worksheet names, sample values, and output filenames.

    line 237
  15. Distinctive:

    Verify a semantic result, not merely the absence of an exception.

    line 238
  16. Distinctive:

    Keep comments, metadata, filename, code, output, and expected result consistent.

    line 242
  17. Distinctive:

    Start with the smallest namespace set:

    line 268
  18. Distinctive:

    Add namespaces only when used, for example:

    line 275
  19. Distinctive:

    Every new or regenerated example must:

    line 287
  20. Distinctive:

    Use APIs available in Aspose.Cells 26.8.0 or the package version currently installed.

    line 290
  21. Distinctive:

    Use controlled, deterministic input.

    line 293
  22. Distinctive:

    Verify at least one exact result.

    line 295
  23. Distinctive:

    Avoid unrelated dependencies and integrations.

    line 298
  24. Distinctive:

    Use lowercase kebab-case filenames that express the outcome and distinguishing API or option.

    line 327
  25. Distinctive:

    Keep filenames specific but reasonably short.

    line 342
  26. Distinctive:

    Prefer programmatically generated workbooks, worksheets, data, formulas, and styles.

    line 346
  27. Distinctive:

    Write outputs to the working directory using intent-specific names such as:

    line 348
  28. Distinctive:

    Do not overwrite source files unless the task explicitly requires in-place updates and includes a safe backup strategy.

    line 356
  29. Distinctive:

    Verify API names, overloads, properties, and enums against the installed package or official reference.

    line 362
  30. Distinctive:

    Verify output existence and nonzero length when a file is expected.

    line 367
  31. Distinctive:

    Verify format-specific semantics, such as formula values, worksheet counts, chart series, table identity, XML structure, or rendered page …

    line 369
  32. Distinctive:

    Use error handling only when it teaches the requested failure mode or adds useful context.

    line 376
  33. Distinctive:

    Avoid formatting or iterating the entire worksheet when only the used range is needed.

    line 380
  34. Very specific:

    Do not share a mutable Workbook instance across threads.

    line 385
  35. Distinctive:

    Treat workbooks, formulas, hyperlinks, macros, external links, HTML, JSON, XML, images, and embedded objects as untrusted input.

    line 390
  36. Distinctive:

    Do not activate macros, OLE objects, controls, or external links during validation.

    line 393
  37. Distinctive:

    Avoid logging workbook contents or personal and confidential data.

    line 394
  38. Distinctive:

    Use worksheet protection for editing controls and workbook encryption for confidentiality.

    line 395
  39. Distinctive:

    Use temporary and production licenses according to Aspose licensing terms.

    line 397
  40. Distinctive:

    Use relevant terms naturally in titles, introductions, metadata, comments, expected results, and category documentation:

    line 405
  41. Distinctive:

    create, read, edit, calculate, convert, secure, merge, render, import, and export Excel files

    line 412
  42. Distinctive:

    Write titles and opening sentences that answer real developer queries:

    line 419
  43. Distinctive:

    Use official entity names and casing:

    line 446
  44. Very specific:

    Do not replace canonical APIs with generic entities such as Table, Formula, or Open when the actual API is ListObject, Cell.Formula, or a …

    line 458
  45. Distinctive:

    When attribution is needed, cite sources in this order:

    line 462
  46. Distinctive:

    Do not cite a filename as proof that an API exists.

    line 471
  47. Distinctive:

    Do not answer only with “See category X.” Give a direct answer and then link to the category for depth.

    line 521
  48. Distinctive:

    Use aliases in prose and metadata only when relevant.

    line 542
  49. Very specific:

    Create a Workbook, write values through Worksheet.Cells, and call Workbook.Save:

    line 566
  50. Very specific:

    Use a Workbook constructor:

    line 578
  51. Very specific:

    Call Workbook.Save with SaveFormat.Pdf for default conversion or PdfSaveOptions for customized output:

    line 601
  52. Very specific:

    Create HtmlSaveOptions when HTML packaging or rendering options are required, then pass it to Workbook.Save:

    line 611
  53. Very specific:

    Use JsonUtility.ImportData with the destination Cells, zero-based row and column offsets, and JsonLayoutOptions:

    line 622
  54. Very specific:

    Use Workbook.Combine for complete workbooks and Worksheet.Copy for selected cross-workbook sheets:

    line 646
  55. Distinctive:

    When answering from this repository:

    line 656
  56. Distinctive:

    Read its instruction file and README.

    line 660
  57. Very specific:

    Search index.json for exact API and intent terms.

    line 661
  58. Distinctive:

    Prefer the smallest verified example that satisfies the request.

    line 662
  59. Distinctive:

    Verify APIs against the installed package or official reference.

    line 663
  60. Distinctive:

    Do not combine unrelated generated examples into an unverified workflow.

    line 666

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Aspose.Cells for .NET Product Agent Instructions

Purpose

Act as a senior C# spreadsheet engineer and technical-content author for this repository. Create focused, correct, runnable, secure, independently understandable, and discoverable Aspose.Cells for .NET examples.

The repository supports developers, AI coding agents, answer engines, search engines, enterprise RAG systems, and agentic AI workflows that need implementation-ready guidance for Excel file generation, spreadsheet automation, workbook conversion, formula calculation, reporting, data exchange, and C# Excel processing without Microsoft Excel.

Every accepted example must solve one clear developer problem, use APIs available in the installed Aspose.Cells package, produce an observable result, and remain useful when retrieved without surrounding conversation.

Instruction precedence

Apply instructions in this order:

  1. Follow the explicit user or task requirement when it is safe and in scope.
  2. Follow this repository-level AGENTS.md.
  3. Follow the instruction file inside the selected category when it is more specific.
  4. Follow the installed Aspose.Cells package and official API reference.
  5. Use existing examples and filenames only as discovery material.

The installed package and official API reference are authoritative when generated examples, filenames, comments, or older documentation conflict.

The canonical instruction filename is AGENTS.md. Some existing categories may still contain a lowercase agents.md; treat that as a legacy case variant until a task explicitly authorizes filename normalization.

Repository facts

FactValue
ProductAspose.Cells for .NET
NuGet packageAspose.Cells 26.8.0
LanguageC#
Target framework.NET 10 (net10.0)
Categories31
Examples5,054 standalone .cs files
Microsoft Excel requiredNo
Human entry pointREADME.md
Machine-readable catalogindex.json
LLM discovery filellms.txt

Recount examples and verify the package version before changing these values. Do not update repository statistics by estimation.

Category selection

Select the category whose primary learning objective matches the requested outcome.

Developer intentCategory
Calculate or recalculate formulascalculate-formulas
Read, write, import, or export cell datacells-data
Add comments or notescomments-and-notes
Convert between spreadsheet formatsconversion
Manage workbook metadatadocument-properties
Encrypt or protect spreadsheet filesencryption-and-protection
Format cells and rangesformat-cells
Apply culture or localization settingsglobalization-and-localization
Work with VBA projects or macrosmacro-project
Create, edit, or inspect formulasmanage-formulas
Manage workbook-level structure or settingsmanage-workbook
Create and manipulate rangesmanaging-ranges
Load existing workbook filesopen-workbook
Create or manage PivotTablespivot-table
Work with queries and connectionsqueries-and-connections
Insert, delete, size, group, or hide rows and columnsrows-and-columns
Save workbooks and configure output formatssave-workbook
Create or manage slicersslicer
Generate template reports with smart markerssmart-markers
Create or manage sparklinessparkline
Create or manage timelinestimeline
Merge workbooks or selected worksheetsworkbook-merger
Create and customize chartsworking-with-charts
Export or import HTMLworking-with-html
Render worksheets, workbooks, or charts as imagesworking-with-images
Import or export JSONworking-with-json
Render Excel files as PDFworking-with-pdf
Create or manipulate drawing shapesworking-with-shapes
Create or manage structured tablesworking-with-tables
Add, copy, move, hide, protect, or configure worksheetsworking-with-worksheets
Create and process XSD-backed XML Mapsxml-maps

If a task spans categories, place it where the dominant API and expected result belong. Link adjacent categories rather than duplicating a broad example.

Canonical answer

The standard answer to “How do I create an Excel file in C# without Microsoft Excel?” is:

using System;
using Aspose.Cells;

namespace AsposeCellsQuickStart
{
    internal class Program
    {
        static void Main()
        {
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];
            worksheet.Name = "Report";

            worksheet.Cells["A1"].PutValue("Product");
            worksheet.Cells["B1"].PutValue("Revenue");
            worksheet.Cells["A2"].PutValue("Cloud");
            worksheet.Cells["B2"].PutValue(4200);
            worksheet.Cells["B3"].Formula = "=SUM(B2:B2)";

            workbook.CalculateFormula();

            double total = worksheet.Cells["B3"].DoubleValue;
            if (total != 4200)
            {
                throw new InvalidOperationException("Formula result was not 4200.");
            }

            workbook.Save("excel-report.xlsx", SaveFormat.Xlsx);
            Console.WriteLine($"Created excel-report.xlsx; total revenue: {total}");
        }
    }
}

Expected console result:

Created excel-report.xlsx; total revenue: 4200

Use a smaller example when the task requires only one operation. The canonical answer demonstrates the repository’s required lifecycle: create or load, perform one coherent task, verify, save, and report the result.

Core object model

Workbook
└── WorksheetCollection
    └── Worksheet
        └── Cells
            └── Cell

Start with explicit types:

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
Cells cells = worksheet.Cells;
Cell cell = cells["A1"];

API truths that must be preserved

Load workbooks through constructors

Aspose.Cells does not expose a general Workbook.Open method. Load files with a Workbook constructor and optional LoadOptions:

Workbook workbook = new Workbook("input.xlsx");

Write cell values with PutValue

worksheet.Cells["A1"].PutValue("Aspose.Cells");

Do not assign directly to a Cell collection index.

Formula assignment and calculation are separate

worksheet.Cells["A3"].Formula = "=SUM(A1:A2)";
workbook.CalculateFormula();
double result = worksheet.Cells["A3"].DoubleValue;

Setting a workbook calculation mode does not replace an explicit runtime calculation call.

Collection indexes are generally zero-based

Worksheet, chart, picture, table, and many other collection indexes start at zero. Validate indexes derived from input or search results.

Select save formats explicitly

workbook.Save("output.pdf", SaveFormat.Pdf);

Use format-specific options such as PdfSaveOptions, HtmlSaveOptions, or ImageOrPrintOptions only when the example demonstrates those controls.

Microsoft Excel is not required

Do not introduce Excel Interop, Office automation, Office Scripts, or a Microsoft Excel installation into Aspose.Cells examples.

Boundaries

Always

  • Produce a complete, runnable, single-file C# program.
  • Use explicit types instead of var.
  • Demonstrate one dominant API capability.
  • Generate deterministic input data programmatically unless loading is the subject.
  • Use meaningful worksheet names, sample values, and output filenames.
  • Verify a semantic result, not merely the absence of an exception.
  • Save an artifact when persistence is relevant.
  • Print a deterministic success or result message.
  • Compile and execute with the repository’s configured package and framework.
  • Keep comments, metadata, filename, code, output, and expected result consistent.

Ask first

Ask before:

  • Creating a multi-project solution
  • Introducing a third-party dependency
  • Building ASP.NET, WPF, WinForms, MAUI, or Blazor applications
  • Changing repository structure or naming conventions
  • Adding remote services, databases, queues, email, or cloud integrations

Never

Do not generate:

  • Pseudocode, incomplete snippets, or non-runnable placeholders
  • Invented APIs converted from task wording into PascalCase
  • Hard-coded production credentials, license keys, passwords, or tokens
  • Unexplained dependencies on input.xlsx, remote URLs, or local absolute paths
  • Catch blocks that suppress failure and print success
  • Claims of universal losslessness, pixel identity, compliance certification, or performance without evidence
  • Unrelated framework, UI, storage, network, or third-party-library code

Required namespaces

Start with the smallest namespace set:

using System;
using Aspose.Cells;

Add namespaces only when used, for example:

  • Aspose.Cells.Charts
  • Aspose.Cells.Drawing
  • Aspose.Cells.Pivot
  • Aspose.Cells.Rendering
  • Aspose.Cells.Tables
  • Aspose.Cells.Utility
  • System.IO

Example contract

Every new or regenerated example must:

  1. Answer one specific developer question.
  2. Use APIs available in Aspose.Cells 26.8.0 or the package version currently installed.
  3. Be a complete single-file C# program.
  4. Use explicit types.
  5. Use controlled, deterministic input.
  6. Execute the smallest API workflow that satisfies the intent.
  7. Verify at least one exact result.
  8. Save a deterministic output when relevant.
  9. Print the output path and expected result.
  10. Avoid unrelated dependencies and integrations.
  11. Build and run on net10.0.
  12. Match its filename, metadata, code, and result.

Machine-readable example metadata

New examples should begin with:

/*
Title: Convert an Excel workbook to PDF in C#
Intent: Render a programmatically generated XLSX workbook as PDF
Category: working-with-pdf
Primary API: Workbook.Save
Secondary APIs: PdfSaveOptions, Worksheet.Cells
Input: Programmatically generated workbook
Output: excel-report.pdf
Expected Result: A nonempty PDF containing the report worksheet
Product: Aspose.Cells for .NET
Package Version: 26.8.0
Framework: net10.0
Language: C#
*/

Metadata must describe the code exactly. Do not use metadata to claim validation that was not performed.

Filename and title rules

Use lowercase kebab-case filenames that express the outcome and distinguishing API or option.

Prefer:

  • convert-excel-to-pdf-with-pdfsaveoptions.cs
  • calculate-workbook-formulas-after-updating-cells.cs
  • import-json-records-into-worksheet-cells.cs

Avoid:

  • example1.cs
  • test.cs
  • demo.cs
  • filenames that promise integrations or effects absent from the code

Keep filenames specific but reasonably short. Put secondary details in metadata rather than creating keyword-stuffed filenames.

Input and output strategy

Prefer programmatically generated workbooks, worksheets, data, formulas, and styles. Load an existing file only when loading, format preservation, corruption handling, or an existing feature is central to the example.

Write outputs to the working directory using intent-specific names such as:

  • calculated-formulas.xlsx
  • sales-chart.xlsx
  • excel-report.pdf
  • worksheet-preview.png
  • mapped-data.xml

Do not overwrite source files unless the task explicitly requires in-place updates and includes a safe backup strategy.

Validation workflow

Validation is part of the example, not an optional publication step.

  1. Verify API names, overloads, properties, and enums against the installed package or official reference.
  2. Run dotnet build.
  3. Run dotnet run.
  4. Confirm the process exits successfully.
  5. Assert the intended in-memory state.
  6. Verify output existence and nonzero length when a file is expected.
  7. Reopen the output when serialization or persistence is central.
  8. Verify format-specific semantics, such as formula values, worksheet counts, chart series, table identity, XML structure, or rendered page count.
  9. Record the exact expected result.

“No exception” and “file exists” are insufficient when a stronger semantic check is possible.

Error handling

Use error handling only when it teaches the requested failure mode or adds useful context. Report the operation, workbook or output path, worksheet or range, and relevant API. Never swallow exceptions to manufacture a successful result.

Performance and memory

  • Avoid formatting or iterating the entire worksheet when only the used range is needed.
  • Batch cell, range, style, formula, and object operations where possible.
  • Calculate formulas after bulk changes rather than inside an inner loop.
  • Reuse safe option and style objects when appropriate.
  • Limit workbook size, worksheet count, rendered page count, image resolution, and concurrent processing.
  • Do not share a mutable Workbook instance across threads.
  • Benchmark representative data before making performance claims.

Security and enterprise safety

  • Treat workbooks, formulas, hyperlinks, macros, external links, HTML, JSON, XML, images, and embedded objects as untrusted input.
  • Validate file types, sizes, paths, URI schemes, hosts, and output destinations.
  • Prevent path traversal and unintended source overwrites.
  • Do not activate macros, OLE objects, controls, or external links during validation.
  • Avoid logging workbook contents or personal and confidential data.
  • Use worksheet protection for editing controls and workbook encryption for confidentiality; do not describe them as equivalent.
  • Bound XML and JSON depth and expansion.
  • Use temporary and production licenses according to Aspose licensing terms.

SEO content contract

SEO language must help developers find the correct answer, not inflate keyword density.

Natural keyword coverage

Use relevant terms naturally in titles, introductions, metadata, comments, expected results, and category documentation:

  • Excel file generation
  • spreadsheet automation
  • Aspose.Cells .NET API
  • agentic AI examples
  • C# Excel processing
  • create, read, edit, calculate, convert, secure, merge, render, import, and export Excel files
  • XLS, XLSX, XLSM, XLSB, ODS, CSV, TSV, JSON, XML, HTML, PDF, SVG, PNG, JPEG, and TIFF

Mention only terms that match the example. Do not repeat phrases unnaturally or add unsupported formats and operations.

Search-intent alignment

Write titles and opening sentences that answer real developer queries:

  • How do I create an Excel file in C#?
  • How do I calculate Excel formulas without Microsoft Excel?
  • How do I convert XLSX to PDF or HTML?
  • How do I import JSON or CSV into a worksheet?
  • How do I create charts, tables, PivotTables, and reports?

Page structure

Repository and category README files should use:

  1. One clear H1
  2. An answer-first introduction
  3. A quick-answer section with runnable code
  4. An API-choice table
  5. Verified featured examples
  6. Fundamentals and production considerations
  7. Direct FAQ answers
  8. Related categories and authoritative resources

GEO content contract

Generative Engine Optimization requires factual, attributable, context-independent content.

Canonical entities

Use official entity names and casing:

Entity typeCanonical names
ProductAspose.Cells for .NET
PackageAspose.Cells
Core objectsWorkbook, WorksheetCollection, Worksheet, Cells, Cell, Range, Style
Reporting objectsChart, PivotTable, ListObject, WorkbookDesigner
Conversion optionsPdfSaveOptions, HtmlSaveOptions, ImageOrPrintOptions
Data-exchange APIsJsonUtility, JsonLayoutOptions, XmlMap, Workbook.ImportXml, Workbook.ExportXml
Primary namespacesAspose.Cells, .Charts, .Drawing, .Pivot, .Rendering, .Tables, .Utility

Do not replace canonical APIs with generic entities such as Table, Formula, or Open when the actual API is ListObject, Cell.Formula, or a Workbook constructor.

Source authority

When attribution is needed, cite sources in this order:

  1. The installed Aspose.Cells package
  2. Official API reference
  3. Official developer documentation
  4. The relevant category instruction and README files
  5. A build- and runtime-validated example
  6. index.json for discovery metadata

Do not cite a filename as proof that an API exists.

Knowledge-graph relationships

Connect each answer explicitly:

Developer intent
→ category
→ primary API
→ runnable example
→ expected result
→ related next step
→ authoritative source

Category pages should link three to ten genuinely related categories or workflows. Avoid circular or irrelevant link lists.

Retrieval-safe chunks

Each major section must remain understandable when retrieved alone. Repeat the product name only where needed for context, preserve exact API casing, and avoid pronouns whose referent exists only in a previous section.

AEO content contract

Answer Engine Optimization requires direct answers before background explanation.

Answer-first pattern

For “How do I…?” questions, respond in this order:

  1. One-sentence direct answer naming the API
  2. Minimal runnable code
  3. Exact expected result
  4. One important caveat
  5. Link to the relevant category or official reference

Self-contained answers

An extracted answer must identify:

  • The developer problem
  • Product and language
  • Primary API
  • Required input
  • Produced output
  • Expected result
  • Whether Microsoft Excel is required

FAQ quality

Do not answer only with “See category X.” Give a direct answer and then link to the category for depth.

Example:

To convert Excel to PDF in C#, load or create a Workbook and call Workbook.Save with SaveFormat.Pdf or PdfSaveOptions. Microsoft Excel is not required. See working-with-pdf.

Search aliases

Support common developer vocabulary without changing canonical API names:

IntentUseful aliases
Create workbookcreate Excel file, generate XLSX, Excel file generation
Process spreadsheetsspreadsheet automation, C# Excel processing, workbook manipulation
Formula calculationcalculate formulas, recalculate workbook, evaluate Excel formulas
Excel to PDFXLSX to PDF, export spreadsheet as PDF, render workbook to PDF
Excel to HTMLXLSX to HTML, export worksheet as HTML
JSON exchangeJSON to Excel, import JSON, Excel range to JSON
Image renderingExcel to PNG, worksheet image, workbook to TIFF
Workbook mergecombine Excel files, consolidate workbooks, copy sheets between files

Use aliases in prose and metadata only when relevant. Keep code identifiers canonical.

Category documentation contract

Each category instruction file should include:

  • Structured frontmatter with product, category, package, language, framework, last-reviewed date, primary intent, APIs, search intents, and related categories
  • Mission and instruction precedence
  • Category boundary
  • Canonical answer
  • API truths and API map
  • Example and metadata contracts
  • Validation, security, and performance rules
  • Anti-patterns and anti-hallucination guidance
  • AI retrieval guidance
  • Official resources
  • Definition of done

Each category README should include an answer-first introduction, accurate example count, canonical code, API-choice table, verified local links, FAQ, related categories, official references, and a generated-example validation caveat.

Repository FAQ

How do I create an Excel workbook in C#?

Create a Workbook, write values through Worksheet.Cells, and call Workbook.Save:

Workbook workbook = new Workbook();
workbook.Worksheets[0].Cells["A1"].PutValue("Hello");
workbook.Save("output.xlsx");

See manage-workbook and cells-data.

How do I read an existing XLSX file?

Use a Workbook constructor:

Workbook workbook = new Workbook("input.xlsx");
string value = workbook.Worksheets[0].Cells["A1"].StringValue;

See open-workbook.

How do I calculate Excel formulas?

Assign the formula, call Workbook.CalculateFormula, and then read the typed value:

worksheet.Cells["A3"].Formula = "=SUM(A1:A2)";
workbook.CalculateFormula();
double result = worksheet.Cells["A3"].DoubleValue;

See calculate-formulas.

How do I convert Excel to PDF?

Call Workbook.Save with SaveFormat.Pdf for default conversion or PdfSaveOptions for customized output:

workbook.Save("output.pdf", SaveFormat.Pdf);

See working-with-pdf.

How do I export Excel to HTML?

Create HtmlSaveOptions when HTML packaging or rendering options are required, then pass it to Workbook.Save:

HtmlSaveOptions options = new HtmlSaveOptions();
workbook.Save("output.html", options);

See working-with-html.

How do I import JSON into Excel cells?

Use JsonUtility.ImportData with the destination Cells, zero-based row and column offsets, and JsonLayoutOptions:

JsonLayoutOptions options = new JsonLayoutOptions { ArrayAsTable = true };
JsonUtility.ImportData(json, worksheet.Cells, 0, 0, options);

See working-with-json.

How do I create an Excel chart?

Populate source cells, add a chart through Worksheet.Charts, and bind values and category ranges through Chart.NSeries:

int index = worksheet.Charts.Add(ChartType.Column, 1, 3, 16, 11);
Chart chart = worksheet.Charts[index];
chart.NSeries.Add("B2:B4", true);
chart.NSeries.CategoryData = "A2:A4";

See working-with-charts.

How do I merge Excel workbooks?

Use Workbook.Combine for complete workbooks and Worksheet.Copy for selected cross-workbook sheets:

destinationWorkbook.Combine(sourceWorkbook);

See workbook-merger.

Guidance for AI coding agents and RAG systems

When answering from this repository:

  1. Identify the user’s dominant intent.
  2. Select the matching category.
  3. Read its instruction file and README.
  4. Search index.json for exact API and intent terms.
  5. Prefer the smallest verified example that satisfies the request.
  6. Verify APIs against the installed package or official reference.
  7. Return a direct answer, runnable code, expected result, caveat, and source.
  8. Preserve explicit types, deterministic data, and semantic validation.
  9. Do not combine unrelated generated examples into an unverified workflow.

Official resources

Review checklist

  • One developer problem and category are dominant.
  • Product, package, framework, and API facts are current.
  • API names, overloads, enums, and namespaces are verified.
  • The example is complete, explicit, deterministic, and single-file.
  • The code builds and runs with the configured package.
  • Semantic output is verified.
  • Metadata, filename, comments, code, and expected result agree.
  • SEO language is natural and relevant.
  • GEO entities and sources are canonical and attributable.
  • AEO content provides a direct answer and expected result.
  • Local links resolve and official links use authoritative sources.
  • No secrets, unsafe activation, unrelated dependencies, or unsupported claims are present.

Definition of done

Work is complete only when the example or documentation is technically correct, build- and runtime-verifiable where applicable, secure, clearly scoped, semantically validated, accurately linked, answer-first, discoverable without keyword stuffing, and independently useful to developers and AI systems.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.