HTML
JPG
PDF
XML
XLSX
XLSX
Create Doughnut Chart in XLSX Documents via C#
High‑performance Microsoft Excel XLSX spreadsheet generation with Doughnut chart creation programmatically using server‑side .NET APIs.
Generating a Microsoft Excel XLSX file that contains a Doughnut chart is straightforward with Aspose.Cells for .NET. The library enables you to build, modify, and render spreadsheets without requiring Microsoft Office. In this article you will learn how to create a Doughnut chart, populate it with data, and save the workbook in a single, compact code snippet.
How to create a Doughnut chart in XLSX via C#
The following steps show how to add a Doughnut chart to a worksheet:
- Include the Aspose.Cells namespace.
- Create a
Workbookinstance. - Access the target worksheet.
- Fill worksheet cells with the data that the chart will use.
- Add a
Chartof typeChartType.Doughnut. - Define the data range for the chart series.
- Apply optional formatting (title, colors, legend).
- Save the workbook.
System Requirements
The library works on any platform that supports .NET Framework 4.0+, .NET Core 2.0+, .NET 5/6/7, Mono, Xamarin, or Azure. Development can be done with Microsoft Visual Studio, Rider, or any other IDE that supports C#.
- Install via NuGet:
nuget install Aspose.CellsorInstall-Package Aspose.Cells. - Or download the offline MSI/ZIP from the Aspose.Cells download page.
Create Doughnut Chart in XLSX – C#
Aspose.Cells for .NET is a powerful spreadsheet library that lets developers generate, modify, convert, render, and print Excel files across platforms. It supports a wide range of Excel features—including advanced chart types such as Doughnut, Pie, Bar, Line, and more—without the need for Microsoft Office.
XLSX What is XLSX File Format?
XLSX is the default file format for Microsoft Excel 2007 and later. It follows the Open Packaging Conventions (OPC) and stores spreadsheet data in a collection of XML parts within a ZIP container, making it lightweight and easy to process programmatically.
Read More