Syncfusion.XlsIO.Base
Example 


Shapes Property (ITabSheet)

Gets the IShapes collection in the sheet. Read-only.
Syntax
'Declaration
 
ReadOnly Property Shapes As IShapes
'Usage
 
Dim instance As ITabSheet
Dim value As IShapes
 
value = instance.Shapes
IShapes Shapes {get;}
Example
The following code illustrates how to access the IShapes collection.
using Syncfusion.XlsIO;
using System;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add shapes
            worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 2, 2, 40, 100);
            worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 5, 5, 40, 100);
            
            //Check count
            Console.Write(worksheet.Shapes.Count);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//2
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also