Chart inside a worksheet

EasyXLS™ library allows you to create Excel charts that can be positioned inside a worksheet. A chart can have two positions, as a distinct sheet or as an object in a worksheet. This chapter explains the second situation.

The Excel chart that is an object inside a worksheet has the position relative to sheet cells and the width and height of the Excel chart is specified in pixels.

EasyXLS also allows you to read Excel files that contain charts and extract chart information.

Source code sample

The below example shows how to export the chart to Excel and how the chart is placed inside a worksheet.


The screen shot provides an example of an exported column chart placed inside a worksheet.

Exported Excel chart inside a sheet

Chart type

EasyXLS™ library provides a large number of chart types, such as column chart, line chart, bar chart, pie chart, scatter chart, area chart, doughnut chart, radar chart, surface chart, bubble chart, stock chart, cylinder chart, cone chart and pyramid chart.

Chart data source

A chart data source is composed of two sections:
   - Category axis labels (X axis)
   - Series (Y axis)

As presented in the above code sample, ExcelChart.easy_setCategoryXAxisLabels method is used for setting the labels on the category X axis. The series for Y axis values are added using ExcelChart.easy_addSeries method.

Formatting chart

EasyXLS lets you format the chart elements such as chart area, plot area, series, category X axis, value Y axis, gridlines, data table, legend, titles and 3D rotation.

Getting started with EasyXLS Excel library

To download the trial version of EasyXLS Excel Library, press the below button:

Download EasyXLS™ Excel Library for .NET and Java

If you already own a license key, you may login and download EasyXLS from your account.


Available for: Professional, Excel Writer, Excel Reader
Go to top

EasyXLS Excel libraries:

.NET Excel Library
full .NET version to import, export or convert Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
Java Excel Library
full Java version to import, export or convert Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

Office 365
MS Excel 2021 - 2024
MS Excel 2007 - 2019
MS Excel 97 - 2003