

Workbook workbook = new Workbook(WorkbookFormat.Excel2007) Data in above screenshot is assumed to already exist. Create workbook and worksheet to place the chart. ' Get the cells for the four charts that will placed in the Worksheet.ĭim cell1 As WorksheetCell = sheet.GetCell("A1")ĭim cell2 As WorksheetCell = sheet.GetCell("B1")ĭim cell3 As WorksheetCell = sheet.GetCell("C1")ĭim cell4 As WorksheetCell = sheet.GetCell("D1")ĭim chart1 As WorksheetChart = (.ChartType.Line, cell1, New Point(0, 0), cell1, New Point(100, 100))ĭim chart2 As WorksheetChart = (.ChartType.ColumnClustered, cell2, New Point(0, 0), cell2, New Point(100, 100))ĭim chart3 As WorksheetChart = (.ChartType.Area, cell3, New Point(0, 0), cell3, New Point(100, 100))ĭim chart4 As WorksheetChart = (.ChartType.Pie, cell4, New Point(0, 0), cell4, New Point(100, 100))


Data in above screenshot is assumed to already exist.ĭim workbook As Workbook = New Workbook(WorkbookFormat.Excel2007)ĭim sheet As Worksheet = ("Sheet1") ' Create workbook and worksheet to place the chart.
