Method Add
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
Add(string, string, XlsxShapeOptions?)
Adds a shape of a preset geometry at a cell, as Excel's Insert Shapes adds one: its top-left corner at the cell's, the theme's look, and its text if given.
public XlsxShape Add(string preset, string cell, XlsxShapeOptions? options = null)
Parameters
presetstringA DrawingML preset name, as
rect,roundRect,ellipse,rightArrow(one of the 187 ECMA-376 presets).cellstringWhere its top-left corner goes, as
B3.optionsXlsxShapeOptionsIts name, text, size, fill, or that it is a text box.
Returns
- XlsxShape
The shape.
Exceptions
- ArgumentNullException
presetorcellis null.- ArgumentException
The preset is not one of DrawingML's; the cell is not a reference; a size is not positive.
- InvalidOperationException
The sheet is not a worksheet.