Syncfusion.XlsIO.Base
Example 


Remove Method (IShape)

Removes this IShape from IShapes collection.
Syntax
'Declaration
 
Sub Remove() 
'Usage
 
Dim instance As IShape
 
instance.Remove()
void Remove()
Example
The following code illustrates how to remove a IShape from the IShapes collection.
using Syncfusion.XlsIO;
            
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 shape
            worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 2, 2, 20, 100);
            worksheet.Shapes.AddAutoShapes(AutoShapeType.Cube, 5, 5, 20, 100);
            
            //Remove a shape
            worksheet.Shapes[0].Remove();
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also