Method Add
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
Add(XlsxSparklineType, string, string)
Adds a group of sparklines as Excel adds one from its Sparklines command: one sparkline for each cell of the location, each drawing a row of the data when the location is a column of cells, a column of it when the location is a row, the whole of it when the location is one cell.
public XlsxSparklineGroup Add(XlsxSparklineType type, string dataRange, string locationRange)
Parameters
typeXlsxSparklineTypeThe group's type.
dataRangestringThe data, as
Data!B2:E5(a range of this workbook; the sheet named or this sheet).locationRangestringThe cells the sparklines are drawn in, on this sheet, as
G2:G5: one row or one column.
Returns
- XlsxSparklineGroup
The group.
Exceptions
- ArgumentNullException
A range is null.
- ArgumentException
A range is not a reference; the location is not one row or one column; the data does not have a row (or a column) for each location cell, as Excel requires.
- InvalidOperationException
The sheet is not a worksheet.