Create DoughnutExploded Chart in XLSX Documents via C#
Native and high‑performance Microsoft Excel XLSX spreadsheet with DoughnutExploded chart creation programmatically using server‑side .NET APIs.
Generating a Microsoft Excel XLSX file with a DoughnutExploded chart programmatically is straightforward with Aspose.Cells for .NET. This chart type is ideal for visualising proportional data where each segment is slightly separated from the centre, giving a “exploded” appearance.
The following guide demonstrates how to:
- Add sample data to a worksheet.
- Insert a DoughnutExploded chart.
- Configure the chart’s series, title and style.
- Save the workbook as an XLSX file.
How to create DoughnutExploded chart in XLSX via C#
The steps below show the minimal code required to generate a DoughnutExploded chart. The example is fully runnable and does not require Microsoft Excel to be installed on the server.
- Install Aspose.Cells via NuGet (
Install-Package Aspose.Cells). - Add the
using Aspose.Cells;directive. - Create a
Workbookinstance. - Fill a worksheet with data.
- Add a
Chartof typeChartType.DoughnutExploded. - Define the data range for the chart series.
- (Optional) Set a chart title and apply a built‑in style.
- Save the workbook.
System Requirements
Aspose.Cells for .NET works on any platform that supports .NET Framework 4.0+, .NET Core 2.0+, .NET 5/6/7, Mono, Xamarin and Azure. No Microsoft Office installation is required.
Install the library from NuGet:
nuget install Aspose.Cellsor use the Package Manager Console:
Install-Package Aspose.CellsAlternatively, download the offline MSI installer or the ZIP package from the Aspose.Cells .NET downloads page.
Create DoughnutExploded Chart - C#
XLSX What is XLSX File Format?
XLSX is the modern file format for Microsoft Excel workbooks introduced with Office 2007. It follows the Open Packaging Conventions (OPC) and stores workbook data, styles, and relationships in a collection of XML parts compressed into a ZIP archive.
Read More