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

agentic-net-examples / format-cells

AGENTS.md1 starsChanged 2 months 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,…

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
  1. Very specific:

    Create focused Aspose.Cells for .NET examples for fonts, fills, borders, alignment, number/date formats, text wrapping, themes, gradients, …

    line 19
  2. Very specific:

    Use globalization-and-localization when culture behavior is primary and cells-data when values rather than presentation are primary.

    line 21
  3. Very specific:

    Treat GetStyle() as a style value to modify and reapply with SetStyle().

    line 38
  4. Very specific:

    Use StyleFlag so bulk operations change only intended attributes.

    line 40
  5. Distinctive:

    Keep value and display format distinct.

    line 42
  6. Distinctive:

    Use theme colors only when theme behavior is the intent.

    line 43
  7. Distinctive:

    Verify formatting after save/reopen and, for visual claims, render a representative output.

    line 44
  8. Distinctive:

    Avoid style explosion; report style counts in performance examples.

    line 71
  9. Distinctive:

    Avoid developer-specific fonts unless fallback behavior is the scenario.

    line 74
  10. Distinctive:

    Verify exact style properties and enums against the installed package.

    line 80

≈ “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

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

GoalAPI
Modify one cell styleCell.GetStyle then Cell.SetStyle
Create reusable styleWorkbook.CreateStyle
Apply selected attributesStyleFlag with ApplyStyle
Apply to row/columnVerified row/column style methods on Cells
Number/date displayStyle.Number or Style.Custom
FillStyle.ForegroundColor, BackgroundColor, Pattern
BorderStyle.Borders and BorderType
AlignmentStyle.HorizontalAlignment, VerticalAlignment, wrapping/rotation properties

Hard rules

  • Treat GetStyle() as a style value to modify and reapply with SetStyle().
  • Set a fill pattern when a foreground/background color requires it.
  • Use StyleFlag so 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

Definition of done

The example is done when target, style attributes, underlying value, expected appearance, persistence, and performance implications are explicit and verified.

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.