CopyCommentsInRange

ShapeCollection.CopyCommentsInRange method

Copia todos los comentarios del rango.

public void CopyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn)
ParámetroEscribeDescripción
shapesShapeCollectionLa fuente da forma.
caCellAreaEl rango de la fuente.
destRowInt32La fila de inicio del rango dest.
destColumnInt32La columna de inicio del rango de destino.

Ejemplos


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

//Añadir comentario a la celda A1
int commentIndex = comments.Add(0, 0);
Comment comment = comments[commentIndex];
comment.Note = "First note.";
comment.Font.Name = "Times New Roman";

//Añadir comentario a la celda 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;

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

Ver también