# Connector Shapes

DsExcel supports controlling the transparency of an image. Learn more in DsExcel docs.

## Content

A connector is used when you need to connect or disconnect two general shapes. In DsExcel, you can add connectors at specific coordinates or a specific range of a worksheet using the **AddConnector** method. You can also use the [BeginConnect method](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.Drawing.IConnectorFormat.BeginConnect.html), [EndConnect method](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.Drawing.IConnectorFormat.EndConnect.html), [BeginDisconnect method](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.Drawing.IConnectorFormat.BeginDisconnect.html) and [EndDisconnect method](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.Drawing.IConnectorFormat.EndDisconnect.html) of the [IConnectorFormat interface](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.Drawing.IConnectorFormat.html) to attach and detach the ends of the connector to other shapes.
Refer to the following code to connect general shapes using the connector format. You can add a Connector by providing the connector position in points, or add a connector directly to a range.

```csharp
// To config the connector shape.
// Add shapes using points
IShape shapeBegin = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 1, 1, 100, 100);
IShape endBegin = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 200, 200, 100, 100);

//Add connector for shapeBegin and endShape, by providing connector position in points
IShape connectorShape = worksheet.Shapes.AddConnector(ConnectorType.Straight, 1, 1, 101, 101);
connectorShape.Width = 10;

// To detach the ends of the connector to other shapes.
connectorShape.ConnectorFormat.BeginConnect(shapeBegin, 3);
connectorShape.ConnectorFormat.EndConnect(endBegin, 0);

// Add shape using range
IShape rectangle3 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, worksheet.Range["B12"]);
IShape rectangle4 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, worksheet.Range["D12"]);

//Add connector for rectangle3 and rectangle4, by adding connector directly to a range
IShape rangeConnectorShape = worksheet.Shapes.AddConnector(ConnectorType.Curve, worksheet.Range["B12:D12"]);
```

>type=note
> **Note:** One of the limitations of using connector format is that you can add a connector to connect two general shapes and export it but the connector will be shown only after you drag the shape to your spreadsheet.