Skip to content
Mats Alm edited this page Nov 2, 2023 · 20 revisions

Shapes

Supports adding 187 different types of shapes with multiple ways of formatting.

Example

var shape = worksheet.Drawings.AddShape("myShape", eShapeStyle.Rect);
shape.SetPosition(1, 5, 6, 5);       //Position Row, RowOffsetPixels, Column, ColumnOffsetPixels
shape.SetSize(400, 200);             //Size in pixels
//Add some effects and set the text
shape.Effect.SetPresetShadow(ePresetExcelShadowType.OuterBottomRight);
shape.Effect.OuterShadow.Distance = 10;
shape.Effect.SetPresetSoftEdges(ePresetExcelSoftEdgesType.SoftEdge5Pt);
shape.Text = "This is a rectangular shape.";

See also

Sample 5.1 (C#) or Sample 5.1 (VB)

EPPlus wiki

Versions

Worksheet & Ranges

Styling

Import/Export data

Formulas and filters

Charts & Drawing objects

Tables & Pivot Tables

VBA & Protection

Clone this wiki locally