HTML JPG PDF XML XLSX
  Product Family
XLSX

Create Treemap Chart in XLSX Documents via C#

Programmatically generate interactive Treemap charts in Microsoft Excel XLSX files using high‑performance Aspose.Cells for .NET APIs.

Generating a Treemap chart inside an Excel workbook programmatically is straightforward with Aspose.Cells for .NET. The library does not require Microsoft Office on the server, yet it lets you create rich, hierarchical visualisations that are fully compatible with Excel 2013 and later.

How to create a Treemap chart in XLSX via C#

The following steps walk you through creating a Treemap chart from scratch:

  1. Include the required namespaces.
  2. Instantiate a Workbook object.
  3. Populate the worksheet with hierarchical data.
  4. Add a chart of type Treemap.
  5. Set the data source, chart title, and visual style.
  6. Save the workbook as an XLSX file.

System Requirements

A .NET development environment (Visual Studio, Rider, or VS Code) with .NET Framework 4.6+, .NET Core 2.1+, .NET 5/6/7, or Mono is sufficient. The library works on Windows, Linux, and macOS.

 

Create Treemap Chart in XLSX – C#

 
Aspose.Cells for .NET is a powerful spreadsheet processing library that enables developers to create, modify, convert and render Excel files without Microsoft Office. It supports every Excel feature, including the newest chart types such as Treemap, Sunburst, and Waterfall, making it ideal for modern data‑visualisation scenarios.

XLSX What is XLSX File Format?

XLSX is the default file format for Microsoft Excel 2007 and later. It stores workbook data in a compressed Open XML package, which is fully supported by Aspose.Cells, ensuring that charts, formulas, and formatting are preserved when generating files on the server.

Read More