ShapeCollection

ShapeCollection class

Representa todas las formas en una hoja de cálculo/gráfico.

public class ShapeCollection : CollectionBase<Shape>

Propiedades

NombreDescripción
Capacity { get; set; }
Count { get; }
Item { get; }Obtiene el objeto de forma en el índice específico. (2 indexers)
Item { get; set; }

Métodos

NombreDescripción
AddActiveXControl(ControlType, int, int, int, int, int, int)Crea un Control Activex.
AddArc(int, int, int, int, int, int)Agrega un ArcShape a la hoja de trabajo.
AddAutoShape(AutoShapeType, int, int, int, int, int, int)Agrega una autoforma a la hoja de trabajo.
AddAutoShapeInChart(AutoShapeType, int, int, int, int)Agrega una autoforma al gráfico.
AddButton(int, int, int, int, int, int)Agrega un Botón a la hoja de cálculo.
AddCheckBox(int, int, int, int, int, int)Agrega una casilla de verificación a la hoja de cálculo.
AddComboBox(int, int, int, int, int, int)Agrega un ComboBox a la hoja de trabajo.
AddCopy(Shape, int, int, int, int)Agrega y copia una forma a la hoja de trabajo.
AddFreeFloatingShape(MsoDrawingType, int, int, int, int, byte[], bool)Agrega una forma flotante libre a la hoja de cálculo. Solo se aplica a la forma de línea/imagen.
AddGroupBox(int, int, int, int, int, int)Agrega un GroupBox a la hoja de trabajo.
AddIcons(int, int, int, int, int, int, byte[], byte[])Agrega imagen svg.
AddLabel(int, int, int, int, int, int)Agrega una etiqueta a la hoja de cálculo.
AddLabelInChart(int, int, int, int)Agrega una etiqueta al gráfico.
AddLine(int, int, int, int, int, int)Agrega una forma de línea a la hoja de trabajo.
AddLinkedPicture(int, int, int, int, string)Agregar una imagen vinculada.
AddListBox(int, int, int, int, int, int)Agrega un ListBox a la hoja de trabajo.
AddOleObject(int, int, int, int, int, int, byte[])
AddOleObjectWithLinkedImage(int, int, int, int, string)Agregar una imagen vinculada.
AddOval(int, int, int, int, int, int)Agrega un óvalo a la hoja de cálculo.
AddPicture(int, int, int, int, Stream)Agrega una imagen a la colección.
AddPicture(int, int, Stream, int, int)Agrega una imagen a la colección.
AddPictureInChart(int, int, Stream, int, int)Agrega una imagen al gráfico.
AddRadioButton(int, int, int, int, int, int)Agrega un RadioButton a la hoja de trabajo.
AddRectangle(int, int, int, int, int, int)Agrega un RectangleShape a la hoja de trabajo.
AddScrollBar(int, int, int, int, int, int)Agrega una barra de desplazamiento a la hoja de cálculo.
AddShape(MsoDrawingType, int, int, int, int, int, int)Agrega una Forma a la hoja de cálculo.
AddShapeInChart(MsoDrawingType, PlacementType, int, int, int, int)Agregue una forma al gráfico. Todas las unidades son 1/4000 del área del gráfico.
AddShapeInChart(MsoDrawingType, PlacementType, int, int, int, int, byte[])Agregue una forma al gráfico. Todas las unidades son 1/4000 del área del gráfico.
AddShapeInChartByScale(MsoDrawingType, PlacementType, double, double, double, double)Agrega una forma al gráfico. Todas las unidades son la escala porcentual del área del gráfico.
AddShapeInChartByScale(MsoDrawingType, PlacementType, double, double, double, double, byte[])Agregue una forma al gráfico. Todas las unidades son 1/4000 del área del gráfico.
AddSpinner(int, int, int, int, int, int)Agrega un Spinner a la hoja de trabajo.
AddSvg(int, int, int, int, int, int, byte[], byte[])Agrega imagen svg.
AddTextBox(int, int, int, int, int, int)Agrega un cuadro de texto a la hoja de cálculo.
AddTextBoxInChart(int, int, int, int)Agrega un cuadro de texto al gráfico.
AddTextEffect(MsoPresetTextEffect, string, string, int, bool, bool, int, int, int, int, int, int)Inserta un objeto de WordArt.
AddTextEffectInChart(MsoPresetTextEffect, string, string, int, bool, bool, int, int, int, int)Inserta un objeto de WordArt en el gráfico
AddWordArt(PresetWordArtStyle, string, int, int, int, int, int, int)Agrega WordArt predeterminado desde Excel 2007.s
BinarySearch(Shape)
BinarySearch(Shape, IComparer<Shape>)
BinarySearch(int, int, Shape, IComparer<Shape>)
Clear()Borrar todas las formas. (2 methods)
Contains(Shape)
CopyCommentsInRange(ShapeCollection, CellArea, int, int)Copia todos los comentarios del rango.
CopyInRange(ShapeCollection, CellArea, int, int, bool)Copie formas en el rango al rango de destino.
CopyTo(Shape[])
CopyTo(Shape[], int)
CopyTo(int, Shape[], int, int)
DeleteInRange(CellArea)Eliminar formas en el rango. Las formas de comentarios no se eliminarán.
DeleteShape(Shape)Eliminar una forma. Si la forma está en el grupo o es una forma de comentario, no se eliminará.
Exists(Predicate<Shape>)
Find(Predicate<Shape>)
FindAll(Predicate<Shape>)
FindIndex(Predicate<Shape>)
FindIndex(int, Predicate<Shape>)
FindIndex(int, int, Predicate<Shape>)
FindLast(Predicate<Shape>)
FindLastIndex(Predicate<Shape>)
FindLastIndex(int, Predicate<Shape>)
FindLastIndex(int, int, Predicate<Shape>)
GetEnumerator()
Group(Shape[])Agrupa las formas.
IndexOf(Shape)
IndexOf(Shape, int)
IndexOf(Shape, int, int)
LastIndexOf(Shape)
LastIndexOf(Shape, int)
LastIndexOf(Shape, int, int)
Remove(Shape)Eliminar la forma.
RemoveAt(int)Eliminar la forma. (2 methods)
Ungroup(GroupShape)Desagrupa los elementos de forma.
UpdateSelectedValue()Actualiza el valor seleccionado por el valor de la celda vinculada de las formas.

Ejemplos


[C#]

// Instanciando un objeto Workbook
Workbook workbook = new Workbook();

// obtener ShapeCollection
ShapeCollection shapes = workbook.Worksheets[0].Shapes;

//haz tu negocio

//Guardar el archivo de Excel.
workbook.Save("result.xlsx");

Ver también