Visualizing data in three‑dimensional form can make trends stand out and improve readability. The Cylindrical Bar chart is a 3‑D variant of the classic bar chart that displays each data series as a cylinder, adding depth without sacrificing clarity. This article shows you how to create a Cylindrical Bar chart in an Excel workbook using Aspose.Cells for .NET and C#.

In this guide you will learn:

  • What the Aspose.Cells C# Excel library offers for chart creation.
  • How to generate a Cylindrical Bar chart step by step.
  • How to customize the chart’s appearance (axis titles, colors, legends, etc.).
  • Where to obtain a free temporary license for evaluation.

C# Excel Library to Create Cylindrical Bar Chart

Aspose.Cells for .NET is a comprehensive Excel automation library that enables developers to create, modify, and render Excel files without Microsoft Office. It supports all chart types offered by Excel, including the 3‑D Cylindrical Bar chart.

Key advantages of using Aspose.Cells for .NET:

  • Full‑featured API – Access to workbook, worksheet, cell, chart, and formatting objects.
  • Zero‑dependency – Works on any .NET platform ( .NET Framework, .NET Core, .NET 5/6/7 ).
  • High performance – Handles large data sets with low memory footprint.
  • Cross‑format support – Read/write XLS, XLSX, CSV, ODS and many more.

Installing Aspose.Cells

You can obtain Aspose.Cells via NuGet:

PM> Install-Package Aspose.Cells

Or download the latest release from the Aspose.Cells releases page.

Create a Cylindrical Bar Chart in Excel using C#

The following example creates a workbook, populates it with sample sales data, adds a Cylindrical Bar chart, and saves the result as an XLSX file.

Complete C# Code Example

Explanation of the Code

StepWhat the code does
1Creates a new Workbook and obtains the first worksheet (Sheet1).
2Populates the worksheet with a small data set (regions and quarterly sales).
3Adds a Cylindrical Bar chart (ChartType.CylindricalBar) and positions it on the sheet.
4Adds three series—one for each quarter—linking them to the cells that contain the numeric data.
5Sets axis titles, legend location, series colors, and a modest 3‑D rotation to highlight the cylindrical shape.
6Saves the workbook as CylindricalBarChart_Output.xlsx. The generated file can be opened in Excel, Google Sheets, or any compatible viewer.

Running the Example

  1. Create a new Console Application project in Visual Studio or your preferred IDE.
  2. Add the Aspose.Cells NuGet package (Install-Package Aspose.Cells).
  3. Replace the generated Program.cs content with the code above.
  4. Build and run the project. The console will confirm that the workbook has been saved, and you will find CylindricalBarChart_Output.xlsx in the project’s output folder.

Get a Free Temporary License

Aspose.Cells is a commercial product, but you can obtain a free temporary license for evaluation:

  • Visit the Aspose temporary license page.
  • Follow the on‑screen instructions to receive a license file (normally Aspose.Total.NET.lic).
  • Place the license file in your project’s root directory and activate it before using any Aspose.Cells API:
// Load the temporary license (do this once at application startup)
var license = new License();
license.SetLicense("Aspose.Total.NET.lic");

The temporary license removes evaluation restrictions for a limited period, allowing you to test all features—including chart creation—without limitations.

Free Resources

Conclusion

Creating a Cylindrical Bar chart with Aspose.Cells for .NET is straightforward: prepare the data, add a chart of type ChartType.CylindricalBar, bind series, and apply optional styling. The library handles all the low‑level Excel operations, enabling you to generate professional‑looking, 3‑D visualizations programmatically.

Feel free to experiment with additional customizations—such as data labels, gradient fills, or dynamic data sources—to tailor the chart to your specific reporting needs. If you encounter any issues or have further questions, the Aspose community and support forums are excellent places to seek help.

See Also