Create Waterfall Chart in XLSX Documents via C#
Native and high performance Microsoft Excel XLSX spreadsheet with Waterfall chart creation programmatically using server side .NET APIs.
How to create a Waterfall chart in XLSX via C#
A Waterfall chart helps visualize how an initial value is affected by a series of positive and negative values. With Aspose.Cells you can build such a chart in just a few lines of code.
- Include the Aspose.Cells namespace in your class file.
- Create an instance of the Workbook class.
- Access the first worksheet of the workbook.
- Populate the worksheet with the data that will be represented in the Waterfall chart.
- Add a Waterfall chart to the worksheet and bind it to the data range.
- Optionally customize the chart title, legend, and formatting.
- Save the workbook as an XLSX file.
System Requirements
Make sure the target system runs Microsoft Windows (or any OS supported by .NET Core/.NET 5+), has the .NET Framework / .NET Core / .NET 5+ installed, and a development environment such as Visual Studio.
- Install via NuGet:
nuget install Aspose.Cellsor in the Package Manager Console:Install-Package Aspose.Cells. - Alternatively, download the offline MSI installer or the ZIP containing all DLLs from the Aspose.Cells .NET download page.
Create Waterfall Chart in XLSX – C#
The code above creates a simple Waterfall chart that visualizes the flow from the Start value through Sales, Expenses, Tax, and finally calculates the Profit automatically.
XLSX What is XLSX File Format?
XLSX is the modern Open XML workbook format introduced with Microsoft Office 2007. It is a ZIP package that contains a collection of XML files describing worksheets, charts, styles, and other workbook components. Aspose.Cells works directly with the XLSX package, allowing full‑fidelity creation and manipulation without the need for Microsoft Office.
Read More