agentic-net-examples / conversion
AGENTS.md1 starsChanged 2 months agoMITView on GitHub
Create production-minded, reproducible Aspose.Cells for .NET conversion examples. Follow ../AGENTS.md, then this guide. In scope: Excel-to-PDF/HTML/CSV/text/image/ODS/XPS conversions, format-specific save options, worksheet selection, streams, encoding, pagination, fidelity checks, split outputs, and batch conversion. Use working-with-pdf, working-with-html, or working-with-images when advanced target-specific rendering is the dominant intent. Use open-workbook or save-workbook when loading or persistence mechanics are primary. Include System.IO only when file or stream validation is used. Each example must identify source and target formats, use one primary conversion objective, configure…
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
- cells-data/AGENTS.mdAGENTS.md
- comments-and-notes/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
9 rules. About 1 is common, 6 are distinctive, and 2 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈6
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 production-minded, reproducible Aspose.Cells for .NET conversion examples.
- Very specific: line 23
Use working-with-pdf, working-with-html, or working-with-images when advanced target-specific rendering is the dominant intent.
- Distinctive: line 43
Treat PDF/image conversion as rendering.
- Distinctive: line 44
Use streams safely and reset positions only when the consumer requires it.
- Distinctive: line 45
Never claim perfect fidelity without inspecting representative output.
- Distinctive: line 78
Use representative formulas, fonts, charts, images, and page setup only when fidelity is being tested.
- Common: line 79
Never embed secrets or personal data in conversion samples.
- Distinctive: line 82
Use fonts available in the deployment environment and report substitution issues.
- Distinctive: line 89
Verify overloads and option ownership in the installed package.
≈ “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
File Format Conversion Agent Instructions
Mission and scope
Create production-minded, reproducible Aspose.Cells for .NET conversion examples. Follow ../AGENTS.md, then this guide.
In scope: Excel-to-PDF/HTML/CSV/text/image/ODS/XPS conversions, format-specific save options, worksheet selection, streams, encoding, pagination, fidelity checks, split outputs, and batch conversion.
Use working-with-pdf, working-with-html, or working-with-images when advanced target-specific rendering is the dominant intent. Use open-workbook or save-workbook when loading or persistence mechanics are primary.
Canonical API map
| Target | Preferred APIs |
Workbook.Save, SaveFormat.Pdf, PdfSaveOptions | |
| HTML/MHTML | HtmlSaveOptions, SaveFormat.Html, SaveFormat.MHtml |
| CSV/TSV/text | TxtSaveOptions, SaveFormat.Csv, encoding/separator options |
| Images | SheetRender, WorkbookRender, ImageOrPrintOptions |
| ODS and Excel formats | Workbook.Save with an explicit SaveFormat or save-options type |
| Streams | Matching Workbook.Save(Stream, ...) overload verified for the target |
Hard rules
- Match file extension,
SaveFormat, and save-options type. - State whether conversion applies to the workbook, active sheet, or each sheet.
- Populate formulas and call calculation before conversion when rendered values must be current.
- Configure encoding, delimiter, quoting, and sheet export deliberately for text formats.
- Explain that CSV is single-sheet and does not preserve workbook formatting, charts, formulas, or comments as Excel objects.
- Treat PDF/image conversion as rendering; verify page/image output, not only file existence.
- Use streams safely and reset positions only when the consumer requires it.
- Never claim perfect fidelity without inspecting representative output.
Canonical pattern
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Cells["A1"].PutValue("Revenue");
worksheet.Cells["B1"].PutValue(125000);
PdfSaveOptions options = new PdfSaveOptions
{
OnePagePerSheet = true
};
workbook.Save("converted-workbook.pdf", options);
if (!File.Exists("converted-workbook.pdf"))
{
throw new InvalidOperationException("PDF output was not created.");
}Include System.IO only when file or stream validation is used.
Example contract
Each example must identify source and target formats, use one primary conversion objective, configure only relevant options, create deterministic content where possible, and verify output signature/count/size or reopenability.
Metadata must include source, target, primary API, important options, output, and expected result. Prefer filenames such as convert-xlsx-to-pdf-in-csharp.cs.
Fidelity, security, and scale
- Use representative formulas, fonts, charts, images, and page setup only when fidelity is being tested.
- Never embed secrets or personal data in conversion samples.
- Sanitize hyperlinks and HTML; mitigate CSV formula injection for untrusted exported text.
- Bound batch sizes, memory streams, image DPI, and output paths.
- Use fonts available in the deployment environment and report substitution issues.
- For benchmarks, report workbook dimensions, target format, package version, environment, and repeat count.
Discoverability and validation
Target direct intents such as "convert Excel to PDF in C#" or "export XLSX to CSV with UTF-8." Put source, target, and primary option in the opening comment without keyword stuffing.
Verify overloads and option ownership in the installed package. Compile, run, confirm output exists and is non-empty, then parse/reopen or inspect pages/images where feasible. Reject mismatched extensions, silent sheet loss, and unsupported fidelity claims.
Related knowledge
- Category overview
- HTML
- Images
- Official conversion documentation
Definition of done
The example is done when source, target, scope, options, and expected artifact are explicit; output is validated proportionately to the format; and the conversion intent is easy to retrieve and cite.
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.

