
ChartTitle = "Users" 'Save as Excel file workbook. Highlight the data you want to present in the pie chart, including the labels, by dragging the mouse across the. IsSeriesInRows = False 'Position chart in the worksheet chart. Value2 = 12000 'Add a pie chart and set data range in the worksheet Dim chart As IChartShape = worksheet. Value = "Users" 'Add data from A2 till B4 worksheet. Worksheets ( 0 ) 'Add sample data for pie chart 'Add headings in A1 and B1. Add a second data series from another sheet.

In this example, we will be creating the Stack Column chart: 2. Open your first Excel worksheet, select the data you want to plot in the chart, go to the Insert tab > Charts group, and choose the chart type you want to make. Right after clicking the Doughnut chart option, you will notice that there is a doughnut chart with multiple layers presented now. Then from the dropdown menu, click on the Doughnut chart option.

Create ( 1 ) 'Get the first sheet Dim worksheet As IWorksheet = workbook. 1) First, select the data for the chart, like this 2) Next, from the top menu in your Excel workbook, select the Insert tab. Create a chart based on your first sheet. To begin with, we need to select the dataset, and then from the Insert tab, click on the Insert Pie or Doughnut Chart. Excel 'Create a workbook Dim workbook As IWorkbook = application. Private Sub CreatePieChart () Using excelEngine As ExcelEngine = New ExcelEngine () 'Instantiate the application object Dim application As IApplication = excelEngine.
