Syncfusion.XlsIO.Base
Example 


Name Property (IShape)

Name of the shape.
Syntax
'Declaration
 
Property Name As String
'Usage
 
Dim instance As IShape
Dim value As String
 
instance.Name = value
 
value = instance.Name
string Name {get; set;}
Example
The following code illustrates how to access Name 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 name
            Console.WriteLine(checkBox.Name);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//CheckBox1
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.47

See Also