CopyCommentsInRange

ShapeCollection.CopyCommentsInRange method

Kopiera alla kommentarer i intervallet.

public void CopyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn)
ParameterTypBeskrivning
shapesShapeCollectionKällformen.
caCellAreaKällomfånget.
destRowInt32Dest range start rad.
destColumnInt32Målintervallets startkolumn.

Exempel


[C#]
CommentCollection comments = workbook.Worksheets[0].Comments;

//Lägg till kommentar i cell A1
int commentIndex = comments.Add(0, 0);
Comment comment = comments[commentIndex];
comment.Note = "First note.";
comment.Font.Name = "Times New Roman";

//Lägg till kommentar i cell B2
comments.Add("B2");
comment = comments["B2"];
comment.Note = "Second note.";

CellArea area1 = new CellArea();
area1.StartColumn = 1;
area1.StartRow = 1;
area1.EndColumn = 5;
area1.EndRow = 4;

//kopiera
shapes.CopyCommentsInRange(shapes, area1, 5, 1);

Se även