AI-friendly repository containing validated C# examples for Aspose.Cells for .NET API.
This repository provides working code examples demonstrating Aspose.Cells for .NET capabilities. All examples are automatically generated, compiled, executed, and validated using the Aspose.Cells Examples Generator.
Examples are organized by feature category:
calculate-formulas/cells-data/comments-and-notes/conversion/document-properties/encryption-and-protection/format-cells/globalization-and-localization/macro-project/manage-formulas/manage-workbook/managing-ranges/open-workbook/pivot-table/queries-and-connections/rows-and-columns/save-workbook/slicer/smart-markers/sparkline/timeline/workbook-merger/working-with-charts/working-with-html/working-with-images/working-with-json/working-with-pdf/working-with-shapes/working-with-tables/working-with-worksheets/xml-maps/
Each category contains standalone .cs files that can be compiled and run independently.
- .NET SDK (net10.0 or compatible version)
- Aspose.Cells for .NET NuGet package
- Valid Aspose license (for production use)
Each example is a self-contained C# file. To run an example:
cd <CategoryFolder>
dotnet new console -o ExampleProject
cd ExampleProject
dotnet add package Aspose.Cells
# Copy the example .cs file as Program.cs
dotnet build
dotnet runusing (Workbook workbook = new Workbook("input.xlsx"))
{
// Work with workbook
}Worksheet worksheet = workbook.Worksheets[0];
Cell cell = worksheet.Cells["A1"];
cell.PutValue("Hello World");workbook.Save("output.xlsx");- Zero-based indexing: Worksheets use 0-based indexing (
Worksheets[0]= first worksheet) - Core object: Aspose.Cells works with
Workbookinstead ofDocument - Supported formats: XLSX, XLS, XLSM, CSV, TSV, ODS, PDF, HTML, JSON, and more
- Deterministic cleanup: Use
usingstatements where applicable - Console output: Success and error messages are written to
Console.WriteLineandConsole.Error
Examples in this repository are automatically generated. To suggest new examples:
- Submit tasks to the Aspose.Cells Examples Generator
- Generated examples are validated via compilation and execution
- Passing examples are included in repository updates
All examples use Aspose.Cells for .NET and require a valid license for production use. See licensing information on the Aspose website.
This repository is maintained by automated code generation. For AI-friendly guidance, see agents.md.
Last updated: 2026-05-25