agentic-net-examples / manage-workbook
AGENTS.md1 starsChanged 29 days agoMITView on GitHub
Create focused enterprise examples for workbook lifecycle and workbook-level structures with Aspose.Cells for .NET. Follow ../AGENTS.md. In scope: workbook creation/lifecycle, settings, worksheet collection coordination, copying between workbooks, content-type properties, custom XML parts, style cleanup, streams, disposal, shared-workbook settings, workbook-wide replace/audit, and batch management. Use working-with-worksheets for worksheet-only operations, document-properties for ordinary metadata, open-workbook for loading mechanics, and save-workbook for output-format behavior. The root repository generally prefers explicit types. A using declaration is acceptable only if repository policy permits it; otherwise…
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
- format-cells/AGENTS.mdAGENTS.md
- globalization-and-localization/AGENTS.mdAGENTS.md
- macro-project/AGENTS.mdAGENTS.md
- manage-formulas/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
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Create focused enterprise examples for workbook lifecycle and workbook-level structures with Aspose.Cells for .NET.
- Very specific: line 23
Use working-with-worksheets for worksheet-only operations, document-properties for ordinary metadata, open-workbook for loading mechanics, …
- Distinctive: line 39
Keep one workbook-level objective per example.
- Distinctive: line 41
Do not dispose a workbook before the caller finishes reading or saving it.
- Distinctive: line 43
Verify workbook-wide cleanup does not change visible content or required styles.
- Distinctive: line 44
Treat custom XML as untrusted structured input.
- Distinctive: line 69
Use memory streams only for genuinely stream-based scenarios.
- Distinctive: line 70
Avoid holding many large workbooks simultaneously.
- Distinctive: line 71
Do not expose custom XML, metadata, or formula content in logs.
- Distinctive: line 72
Use secure XML parsing and synthetic data.
- Distinctive: line 80
Verify exact collection members and settings 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
Workbook Management Agent Instructions
Mission and scope
Create focused enterprise examples for workbook lifecycle and workbook-level structures with Aspose.Cells for .NET. Follow ../AGENTS.md.
In scope: workbook creation/lifecycle, settings, worksheet collection coordination, copying between workbooks, content-type properties, custom XML parts, style cleanup, streams, disposal, shared-workbook settings, workbook-wide replace/audit, and batch management.
Use working-with-worksheets for worksheet-only operations, document-properties for ordinary metadata, open-workbook for loading mechanics, and save-workbook for output-format behavior.
Canonical API map
| Intent | APIs |
| Create/load workbook | Workbook constructors with verified options |
| Workbook settings | Workbook.Settings / WorkbookSettings |
| Coordinate worksheets | Workbook.Worksheets / WorksheetCollection |
| Custom XML | Workbook.CustomXmlParts and verified collection APIs |
| Content-type metadata | Workbook.ContentTypeProperties |
| Remove unused styles | Workbook.RemoveUnusedStyles |
| Lifecycle | IDisposable, Dispose, streams, exception-safe ownership |
Hard rules
- Keep one workbook-level objective per example.
- Define ownership of workbooks and streams; dispose only objects the example owns.
- Do not dispose a workbook before the caller finishes reading or saving it.
- For streams, document whether they remain open and reset position only when required.
- Verify workbook-wide cleanup does not change visible content or required styles.
- Treat custom XML as untrusted structured input; parse securely and avoid entity expansion.
- Distinguish document properties, content-type properties, and custom XML parts.
- Preserve formulas, styles, drawings, and named ranges deliberately when copying worksheets.
Canonical pattern
using Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Name = "Summary";
worksheet.Cells["A1"].PutValue("Managed workbook");
workbook.Save("managed-workbook.xlsx");The root repository generally prefers explicit types. A using declaration is acceptable only if repository policy permits it; otherwise use try/finally with explicit disposal.
Example contract
Each example must state workbook source, owned resources, primary workbook operation, affected collections/settings, output, and expected postcondition. Use deterministic workbook content and task-specific output names.
For batch examples, isolate per-file failures, avoid overwriting inputs, bound concurrency, and report successes/failures without leaking paths or workbook data.
Lifecycle, safety, and performance
- Use memory streams only for genuinely stream-based scenarios.
- Avoid holding many large workbooks simultaneously; dispose each after its output is verified.
- Do not expose custom XML, metadata, or formula content in logs.
- Use secure XML parsing and synthetic data.
- Measure cleanup and batch performance with equivalent inputs and report dimensions/environment.
- Reopen outputs and verify worksheet counts, names, custom XML/content properties, and representative cell/style values.
Discoverability and validation
Target one intent such as "create Excel workbook in C#," "remove unused Excel styles," "add custom XML to XLSX," or "dispose Aspose.Cells Workbook." The opening comment must identify the workbook-level operation and expected state.
Verify exact collection members and settings against the installed package. Compile, run, reopen, and assert the postcondition. Reject mixed-feature demos, ambiguous ownership, invalid custom XML assumptions, and cleanup claims without comparison.
Related knowledge
- Category overview
- Open workbook
- Save workbook
- Worksheets
- Document properties
- Create workbook documentation
Definition of done
The example is done when workbook ownership, scope, operation, affected state, security assumptions, output, and reopened postcondition 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.

