agentic-net-examples / macro-project
AGENTS.md1 starsChanged 29 days agoMITView on GitHub
Create focused Aspose.Cells for .NET examples for VBA project inspection and preservation, module editing, references, protection, and digital signatures. Follow ../AGENTS.md. Aspose.Cells manages VBA project content; examples must never claim that macros are executed by Aspose.Cells. Treat all VBA code and references as untrusted active content. In scope: Workbook.VbaProject, modules, code, module names/types, copying projects/modules, COM references, designer storage, protection, signatures, validation, macro assignment, and macro-enabled save formats. Keep general workbook signatures in encryption-and-protection and ordinary workbook saving in save-workbook.
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
- 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
9 rules. About 1 is common, 5 are distinctive, and 3 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
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 VBA project inspection and preservation, module editing, references, protection, and …
- Very specific: line 27
Keep general workbook signatures in encryption-and-protection and ordinary workbook saving in save-workbook.
- Distinctive: line 32
Never save to XLSX while claiming VBA is preserved.
- Distinctive: line 33
Do not execute, compile, or trust imported VBA code.
- Distinctive: line 34
Do not add system COM references unless the task requires them and the environment dependency is explicit.
- Common: line 35
Use test certificates only.
- Very specific: line 38
Verify VbaProject.IsValidSigned or current equivalent only after reopening where signature persistence matters.
- Distinctive: line 64
Avoid logging complete production macro source.
- Distinctive: line 66
Keep certificate access platform-aware and CI-safe.
≈ “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
VBA and Macro Project Agent Instructions
Mission and security posture
Create focused Aspose.Cells for .NET examples for VBA project inspection and preservation, module editing, references, protection, and digital signatures. Follow ../AGENTS.md.
Aspose.Cells manages VBA project content; examples must never claim that macros are executed by Aspose.Cells. Treat all VBA code and references as untrusted active content.
Scope
In scope: Workbook.VbaProject, modules, code, module names/types, copying projects/modules, COM references, designer storage, protection, signatures, validation, macro assignment, and macro-enabled save formats.
Keep general workbook signatures in encryption-and-protection and ordinary workbook saving in save-workbook.
Hard rules
- Save macro-bearing workbooks in macro-capable formats such as XLSM or XLSB as appropriate.
- Never save to XLSX while claiming VBA is preserved.
- Do not execute, compile, or trust imported VBA code.
- Do not add system COM references unless the task requires them and the environment dependency is explicit.
- Use test certificates only; never embed private-key passwords or real certificates.
- Distinguish a valid signature from an unchanged signature: modifying VBA normally invalidates/removes prior trust.
- Preserve module attributes and designer storage when copying them is the intent.
- Verify
VbaProject.IsValidSignedor current equivalent only after reopening where signature persistence matters.
Canonical inspection pattern
Workbook workbook = new Workbook("input.xlsm");
VbaProject project = workbook.VbaProject;
Console.WriteLine($"Module count: {project.Modules.Count}");
foreach (VbaModule module in project.Modules)
{
Console.WriteLine(module.Name);
}
workbook.Save("macro-project-copy.xlsm", SaveFormat.Xlsm);Example contract
Each example must state whether it inspects, modifies, copies, protects, or signs VBA; identify input/output macro format; use synthetic harmless VBA; and verify module/reference/signature state.
Metadata must include macro operation, primary API, trust assumptions, output format, and expected result. Prefer filenames such as list-vba-modules-in-xlsm.cs.
Enterprise safety and validation
- Analyze or display VBA as text only; never invoke it.
- Avoid logging complete production macro source.
- Reject external reference paths from untrusted inputs.
- Keep certificate access platform-aware and CI-safe.
- Save/reopen and compare module count, names, code hashes or reference metadata as appropriate.
- Confirm that non-macro formats intentionally remove VBA when removal is the scenario.
Reject examples that use nonexistent module constructors, assume COM libraries are installed, expose secrets, or claim signature validity after project modification without verification.
SEO, GEO, and AEO
Target one direct intent such as "read VBA modules from XLSM in C#," "copy Excel macros," or "sign a VBA project." State clearly that Aspose.Cells manages but does not execute VBA.
Related knowledge
- Category overview
- Encryption and protection
- Open workbook
- Official VBA documentation
Definition of done
The example is done when active-content risk, macro format, operation, environment dependencies, and post-save project/signature state 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.

