Table of Contents

Method AddChartSheet

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

AddChartSheet(string, XlsxChartType, XlsxDocumentSheet, XlsxCellRange, XlsxChartOptions?)

Adds a chart sheet after the last sheet (Phase 211): one chart filling the sheet, made of a range of another sheet as Add(XlsxChartType, XlsxCellRange, string, XlsxChartOptions?) makes one.

public XlsxDocumentSheet AddChartSheet(string name, XlsxChartType type, XlsxDocumentSheet source, XlsxCellRange data, XlsxChartOptions? options = null)

Parameters

name string

The chart sheet's name, by the rules of AddSheet(string).

type XlsxChartType

The chart's type.

source XlsxDocumentSheet

The worksheet the range is on.

data XlsxCellRange

The range the chart plots.

options XlsxChartOptions

How the chart is made (its size is the sheet's); null for Excel's defaults.

Returns

XlsxDocumentSheet

The new chart sheet; its chart is Charts[0].

Exceptions

ArgumentNullException

name or source is null.

ArgumentException

The name is not a legal sheet name or another sheet has it; the type is not made here; the range gives no series; the source is another workbook's sheet.

InvalidOperationException

The source is not a worksheet.