agentic-net-examples / format-cells
AGENTS.md1 starsChanged 29 days agoMITView on GitHub
Create focused Aspose.Cells for .NET examples for fonts, fills, borders, alignment, number/date formats, text wrapping, themes, gradients, style reuse, and range/row/column formatting. Follow ../AGENTS.md. Use globalization-and-localization when culture behavior is primary and cells-data when values rather than presentation are primary. Each example must demonstrate one dominant formatting outcome, use meaningful sample data, identify the target cell/range, verify style properties, and save/reopen when persistence matters. Metadata should name the style feature, primary API, target, output, and expected appearance/property. For visual comparisons,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 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
- cells-data/AGENTS.mdAGENTS.md
- comments-and-notes/AGENTS.mdAGENTS.md
- conversion/AGENTS.mdAGENTS.md
- document-properties/AGENTS.mdAGENTS.md
- encryption-and-protection/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
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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 Aspose.Cells for .NET examples for fonts, fills, borders, alignment, number/date formats, text wrapping, themes, gradients, …
- Very specific: line 21
Use globalization-and-localization when culture behavior is primary and cells-data when values rather than presentation are primary.
- Very specific: line 38
Treat GetStyle() as a style value to modify and reapply with SetStyle().
- Very specific: line 40
Use StyleFlag so bulk operations change only intended attributes.
- Distinctive: line 42
Keep value and display format distinct.
- Distinctive: line 43
Use theme colors only when theme behavior is the intent.
- Distinctive: line 44
Verify formatting after save/reopen and, for visual claims, render a representative output.
- Distinctive: line 71
Avoid style explosion; report style counts in performance examples.
- Distinctive: line 74
Avoid developer-specific fonts unless fallback behavior is the scenario.
- Distinctive: line 80
Verify exact style properties and enums against the installed package.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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 Formatting Agent Instructions
Mission and scope
Create focused Aspose.Cells for .NET examples for fonts, fills, borders, alignment, number/date formats, text wrapping, themes, gradients, style reuse, and range/row/column formatting. Follow ../AGENTS.md.
Use globalization-and-localization when culture behavior is primary and cells-data when values rather than presentation are primary.
Canonical API map
| Goal | API |
| Modify one cell style | Cell.GetStyle then Cell.SetStyle |
| Create reusable style | Workbook.CreateStyle |
| Apply selected attributes | StyleFlag with ApplyStyle |
| Apply to row/column | Verified row/column style methods on Cells |
| Number/date display | Style.Number or Style.Custom |
| Fill | Style.ForegroundColor, BackgroundColor, Pattern |
| Border | Style.Borders and BorderType |
| Alignment | Style.HorizontalAlignment, VerticalAlignment, wrapping/rotation properties |
Hard rules
- Treat
GetStyle()as a style value to modify and reapply withSetStyle(). - Set a fill pattern when a foreground/background color requires it.
- Use
StyleFlagso bulk operations change only intended attributes. - Reuse styles for large regions; avoid creating a unique style per cell.
- Keep value and display format distinct; number formatting does not change the underlying value.
- Use theme colors only when theme behavior is the intent; otherwise deterministic RGB colors are clearer.
- Verify formatting after save/reopen and, for visual claims, render a representative output.
Canonical pattern
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
Cell cell = worksheet.Cells["A1"];
cell.PutValue(1250.5);
Style style = cell.GetStyle();
style.Custom = "$#,##0.00";
style.Font.IsBold = true;
cell.SetStyle(style);
workbook.Save("formatted-cell.xlsx");Example contract
Each example must demonstrate one dominant formatting outcome, use meaningful sample data, identify the target cell/range, verify style properties, and save/reopen when persistence matters. Metadata should name the style feature, primary API, target, output, and expected appearance/property.
For visual comparisons, specify RGB/theme values, format codes, border side/style, alignment, and render conditions. Never claim pixel-perfect rendering across environments without accounting for fonts and platform differences.
Scale, accessibility, and safety
- Apply styles to ranges rather than per-cell loops where possible.
- Avoid style explosion; report style counts in performance examples.
- Maintain readable contrast and do not use color as the sole carrier of meaning.
- Sanitize user-provided custom number formats and do not treat display strings as trusted numeric values.
- Avoid developer-specific fonts unless fallback behavior is the scenario.
Discoverability and validation
Target intents such as "format Excel cells in C#," "apply number format," or "add borders with Aspose.Cells." The opening comment must state the target and visible/property result.
Verify exact style properties and enums against the installed package. Compile, run, reopen, and compare style fields; render when the claim is visual. Reject code that modifies a style without reapplying it or accidentally overwrites unrelated attributes.
Related knowledge
- Category overview
- Cell data
- Ranges
- Localization
- Official formatting documentation
Definition of done
The example is done when target, style attributes, underlying value, expected appearance, persistence, and performance implications are explicit and verified.
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.

