agentic-net-examples / cells-data
AGENTS.md1 starsChanged 2 months agoMITView on GitHub
Create focused, runnable Aspose.Cells for .NET examples for working with Excel cell data. Follow ../AGENTS.md, then these category rules. Existing filenames are discovery hints, not proof that an API exists. In scope: A1 and row/column access, typed values, formatted and raw values, enumeration, search/replace, bulk import, sorting, validation, conversion of numeric strings, rich text, hyperlinks, subtotals, and data-oriented audits. Use another category when the dominant intent is styling (format-cells), formulas (manage-formulas), ranges (managing-ranges), or row/column structure (rows-and-columns). Every example must…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository32 other files it gives its agents.
- Aspose.Cells for .NET Product AgentAGENTS.md
- calculate-formulas/AGENTS.mdAGENTS.md
- comments-and-notes/AGENTS.mdAGENTS.md
- conversion/AGENTS.mdAGENTS.md
- document-properties/AGENTS.mdAGENTS.md
- encryption-and-protection/AGENTS.mdAGENTS.md
- format-cells/AGENTS.mdAGENTS.md
- globalization-and-localization/AGENTS.mdAGENTS.md
- macro-project/AGENTS.mdAGENTS.md
- manage-formulas/AGENTS.mdAGENTS.md
- manage-workbook/AGENTS.mdAGENTS.md
- managing-ranges/AGENTS.mdAGENTS.md
- open-workbook/AGENTS.mdAGENTS.md
- pivot-table/AGENTS.mdAGENTS.md
- queries-and-connections/AGENTS.mdAGENTS.md
- rows-and-columns/AGENTS.mdAGENTS.md
- save-workbook/AGENTS.mdAGENTS.md
- slicer/AGENTS.mdAGENTS.md
- smart-markers/AGENTS.mdAGENTS.md
- sparkline/AGENTS.mdAGENTS.md
- timeline/AGENTS.mdAGENTS.md
- workbook-merger/AGENTS.mdAGENTS.md
- working-with-charts/AGENTS.mdAGENTS.md
- working-with-html/AGENTS.mdAGENTS.md
- working-with-images/AGENTS.mdAGENTS.md
- working-with-json/AGENTS.mdAGENTS.md
- working-with-pdf/AGENTS.mdAGENTS.md
- working-with-shapes/AGENTS.mdAGENTS.md
- working-with-tables/AGENTS.mdAGENTS.md
- working-with-worksheets/AGENTS.mdAGENTS.md
- xml-maps/AGENTS.mdAGENTS.md
- llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 1 is common, 7 are distinctive, and 4 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Create focused, runnable Aspose.Cells for .NET examples for working with Excel cell data.
- Very specific: line 25
Use another category when the dominant intent is styling (format-cells), formulas (manage-formulas), ranges (managing-ranges), or …
- Very specific: line 44
Use PutValue rather than assigning through the cell indexer.
- Distinctive: line 49
Treat imported HTML, hyperlinks, CSV, JSON, and external paths as untrusted input.
- Distinctive: line 50
Keep sorting keys, validation areas, and import offsets explicit and verify them after execution.
- Distinctive: line 51
Do not use current culture implicitly for parsing.
- Very specific: line 86
Every example must demonstrate one primary data operation, use explicit types, generate deterministic data where possible, verify a …
- Distinctive: line 92
Prefer bulk import APIs for arrays and object collections rather than repeated per-cell writes.
- Distinctive: line 95
Do not claim thread safety broadly.
- Distinctive: line 96
Never mutate a workbook concurrently without an explicitly documented safe pattern.
- Common: line 103
Avoid credentials, personal data, UNC paths, and developer-specific absolute paths.
- Distinctive: line 114
Verify exact methods, overloads, enums, and option properties against the installed package or official API reference.
≈ “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.
Files
Cell Data Agent Instructions
Mission and precedence
Create focused, runnable Aspose.Cells for .NET examples for working with Excel cell data. Follow ../AGENTS.md, then these category rules. Existing filenames are discovery hints, not proof that an API exists.
Scope
In scope: A1 and row/column access, typed values, formatted and raw values, enumeration, search/replace, bulk import, sorting, validation, conversion of numeric strings, rich text, hyperlinks, subtotals, and data-oriented audits.
Use another category when the dominant intent is styling (format-cells), formulas (manage-formulas), ranges (managing-ranges), or row/column structure (rows-and-columns).
Canonical APIs
| Intent | Preferred APIs |
| Write a value | Cell.PutValue |
| Read a typed value | Value, StringValue, IntValue, DoubleValue, BoolValue, DateTimeValue |
| Access a cell | worksheet.Cells["A1"] or worksheet.Cells[row, column] |
| Bulk import | ImportArray, ImportTwoDimensionArray, ImportCustomObjects, ImportData |
| Search | Cells.Find, FindOptions |
| Enumerate | Cells.GetEnumerator, row/column enumerators, MaxDisplayRange |
| Convert numeric text | Cells.ConvertStringToNumericValue |
| Sort | Workbook.DataSorter, DataSorter, CellArea |
| Validate input | Validation, ValidationCollection, CellArea |
| Rich text | Cell.Characters, Cell.SetCharacters, FontSetting |
Hard rules
- Use
PutValuerather than assigning through the cell indexer. - Preserve data types; do not stringify numbers, dates, or booleans without a stated reason.
- Remember that numeric row and column indexes are zero-based.
- Distinguish raw values from formatted display strings.
- Bound enumeration to used or display ranges where practical; avoid scanning an entire worksheet grid.
- Treat imported HTML, hyperlinks, CSV, JSON, and external paths as untrusted input.
- Keep sorting keys, validation areas, and import offsets explicit and verify them after execution.
- Do not use current culture implicitly for parsing; specify culture when the scenario depends on it.
Canonical pattern
using System;
using Aspose.Cells;
namespace AsposeCellsCellData
{
internal class Program
{
static void Main()
{
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
Cell cell = worksheet.Cells["A1"];
cell.PutValue(125.50);
double value = cell.DoubleValue;
if (Math.Abs(value - 125.50) > 0.000001)
{
throw new InvalidOperationException("Unexpected cell value.");
}
workbook.Save("cell-data-result.xlsx");
Console.WriteLine($"A1 value: {value}");
}
}
}Example contract
Every example must demonstrate one primary data operation, use explicit types, generate deterministic data where possible, verify a concrete value/count/address, save only when persistence matters, and compile against the repository package.
New examples should start with metadata naming Title, Intent, Category, Primary API, Input, Output, and Expected Result. Use concise action-first filenames such as write-datetime-value-to-excel-cell.cs.
Bulk data and performance
- Prefer bulk import APIs for arrays and object collections rather than repeated per-cell writes.
- State starting row/column and whether headers are imported.
- Compare equivalent workloads in benchmarks and report dimensions and iterations.
- Do not claim thread safety broadly; enable documented multi-thread reading only for supported read-only scenarios.
- Never mutate a workbook concurrently without an explicitly documented safe pattern.
Validation and security
- Validate nulls, types, bounds, duplicate keys, and culture-sensitive conversions.
- Neutralize or reject untrusted spreadsheet formulas when importing user-controlled text if formula injection is a risk.
- Reject
javascript:and unsafe external links in sanitization examples. - Avoid credentials, personal data, UNC paths, and developer-specific absolute paths.
- Reopen saved output when persistence or type preservation is the subject.
SEO, GEO, and AEO
Target one natural intent such as "write data to Excel in C#," "read cell value with Aspose.Cells," or "import an array into Excel." The opening comment must state the operation and expected result. Use canonical product/API names and avoid keyword stuffing.
An extracted example must reveal the input type, target cell/range, primary API, expected value, and output file without external context.
Anti-hallucination and review gate
Verify exact methods, overloads, enums, and option properties against the installed package or official API reference. Compile and run. Reject code that invents collection indexers, scans unbounded grids, loses data types unintentionally, or claims validation without checking the result.
Review checklist: correct zero-based indexes; typed values preserved; iteration bounded; culture explicit when relevant; expected result asserted; links and inputs safe; build/run successful.
Related knowledge
- Category guide and featured examples
- Repository instructions
- Ranges
- Rows and columns
- Cell formatting
- Accessing worksheet cells documentation
Definition of done
The example is complete when its API is version-verified, data types and bounds are correct, its result is deterministic and checked, and both humans and AI systems can identify the solved cell-data problem immediately.
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
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.

