Visualizing hierarchical data as a percentage‑based pyramid can make complex distributions instantly understandable. In this article you’ll learn how to create a Pyramid100PercentStacked chart in Excel using C# with Aspose.Cells for .NET. The guide includes everything you need—from setting up the workbook to customizing the chart—so you can integrate this chart type into reporting dashboards, business‑intelligence tools, or any automated Excel generation workflow.

This article covers the following topics:

C# Excel Library to Create Pyramid Charts

Aspose.Cells for .NET is a comprehensive Excel manipulation library that removes the need for Microsoft Office automation. It provides full support for all modern chart types, including the Pyramid100PercentStacked chart introduced in recent Excel versions.

Key benefits of using Aspose.Cells:

  • Rich API – Access every Excel feature programmatically.
  • No Office Dependency – Works on any server or cloud environment.
  • High Performance – Handles large workbooks with minimal memory footprint.
  • Cross‑Format Support – Read/write XLSX, XLS, CSV, ODS, and more.

Getting Started

  1. Download the latest Aspose.Cells for .NET from the releases page.

  2. Install via NuGet:

    PM> Install-Package Aspose.Cells
    
  3. Add a reference to Aspose.Cells in your project.

Create a Pyramid100PercentStacked Chart in Excel using C#

Below is a complete, ready‑to‑run example that:

  1. Creates a new workbook.
  2. Populates sample data representing market share percentages.
  3. Inserts a Pyramid100PercentStacked chart.
  4. Customizes titles, axis labels, and series formatting.
  5. Saves the workbook as PyramidChart_Output.xlsx.

Explanation of the Code

StepWhat It Does
1Instantiates a new Workbook and grabs the default worksheet (Sheet1).
2Writes header cells and sample data for two quarters (Q1, Q2).
3Adds a chart of type ChartType.Pyramid100PercentStacked. The chart occupies rows 7‑25 and columns 0‑10.
4Adds two Series objects; each series reads data from the corresponding column (B for Q1, C for Q2).
5Binds the category axis to the list of product categories located in column A.
6Demonstrates common customizations: plot‑area background, data labels (showing percentages), and legend placement.
7Saves the workbook as PyramidChart_Output.xlsx.

Running the program produces an Excel file that contains a Pyramid100PercentStacked chart visualizing the relative market share of each product category for Q1 and Q2, with percentages automatically calculated to total 100 % for each layer.

Free License & Resources

Aspose provides a temporary free license that removes evaluation watermarks and unlocks full functionality for 30 days.

Conclusion

Creating a Pyramid100PercentStacked chart with Aspose.Cells for .NET is straightforward—just a few lines of C# code are enough to build, fill, and fully customize the chart. The library’s rich API eliminates the need for Microsoft Office on the server, offering a reliable solution for automated reporting, dashboards, and data‑visualization pipelines.

If you have any questions, need further customizations, or want to share your feedback, feel free to join the Aspose.Cells community on our support forum.

See Also