HTML
JPG
PDF
XML
XLSX
XLSX
Create LineStacked chart in XLSX Documents via C#
Programmatically generate high‑performance Microsoft Excel XLSX spreadsheets with LineStacked charts using server‑side .NET APIs.
Generating a Microsoft Excel XLSX file with a LineStacked chart (stacked line chart) is straightforward with Aspose.Cells for .NET. The library enables you to create, format, and populate charts without any dependency on Microsoft Office. Whether you need to embed the chart in a reporting engine, a web service, or a desktop application, the following guide shows how to achieve this in just a few lines of code.
How to create a LineStacked chart in XLSX via C#
The process consists of preparing the data range, adding a chart object, setting its type to LineStacked, customizing series and appearance, and finally saving the workbook.
- Include the required namespace in your source file.
- Instantiate the Workbook class.
- Populate a worksheet with sample data.
- Add a chart to the worksheet and set its type to ChartType.LineStacked.
- Configure chart title, axes, and series formatting.
- Save the workbook as an XLSX file.
System Requirements
Aspose.Cells for .NET runs on any platform that supports .NET Framework 4.0+, .NET Core 2.0+, .NET 5/6/7, Mono, or Xamarin. Development can be performed on Windows, macOS, or Linux using Visual Studio, Visual Studio Code, or any other IDE that supports C#.
- Install the library from the command line:
nuget install Aspose.Cells
or via the Package Manager Console:
Install-Package Aspose.Cells
- Alternatively, download the offline MSI installer or the ZIP package from the Aspose.Cells download page.
Create LineStacked chart in XLSX – C#
Aspose.Cells for .NET is a comprehensive spreadsheet programming library that enables developers to build cross‑platform applications capable of creating, modifying, converting, rendering, and printing Excel files. In addition to chart creation, the API supports a wide range of features such as formula calculation, data validation, pivot tables, and document protection.
XLSX What is XLSX File Format?
XLSX is the primary file format for Microsoft Excel workbooks, introduced with Office 2007. It follows the Open Packaging Conventions (OPC) defined in the OOXML standard (ECMA‑376) and stores workbook data as a collection of XML parts inside a ZIP container.
Read More