Syncfusion.XlsIO.Base
Example 


Id Property (IShape)

Shape id.
Syntax
'Declaration
 
ReadOnly Property Id As Integer
'Usage
 
Dim instance As IShape
Dim value As Integer
 
value = instance.Id
int Id {get;}
Example
The following code illustrates how to access Id property.
using Syncfusion.XlsIO;
using System;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add shapes
            IShape checkBox = worksheet.Shapes.AddCheckBox();
            
            //Set dimensions
            checkBox.Left = 150;
            checkBox.Top = 150;
            checkBox.Width = 70;
            checkBox.Height = 20;
            
            //Get ID
            Console.WriteLine(checkBox.Id);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//0
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.47

See Also