Holen Sie sich Verbindungspunkte aus der Form

Contents
[ ]

Aspose.Cells bieten umfangreiche Funktionen zum Verwalten von Formen in der Tabelle. Manchmal müssen die Verbindungspunkte einer Form abgerufen werden, um die Formen an der entsprechenden Stelle auszurichten oder zu platzieren. Dazu werden alle Verbindungspunkte benötigt. Der folgende Code kann verwendet werden, um die Liste der Verbindungspunkte einer Form mithilfe von zu erhaltenShape.ConnectionPoints Eigentum.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Instantiate a new Workbook.
Workbook workbook = new Workbook();
// Get the first worksheet in the book.
Worksheet worksheet = workbook.Worksheets[0];
// Add a new textbox to the collection.
int textboxIndex = worksheet.TextBoxes.Add(2, 1, 160, 200);
// Access your text box which is also a shape object from shapes collection
Shape shape = workbook.Worksheets[0].Shapes[0];
// Get all the connection points in this shape
float[][] ConnectionPoints = shape.GetConnectionPoints();
// Display all the shape points
foreach (float[] pt in ConnectionPoints)
{
System.Console.WriteLine(string.Format("X = {0}, Y = {1}", pt[0], pt[1]));
}