Syncfusion.XlsIO.Base
Example 


Name of the item to get.

Item(String) Property

Gets single IOptionButtonShape from the IOptionButtons collection.
Syntax
'Declaration
 
Overloads ReadOnly Property Item( _
   ByVal name As String _
) As IOptionButtonShape
'Usage
 
Dim instance As IOptionButtons
Dim name As String
Dim value As IOptionButtonShape
 
value = instance.Item(name)
IOptionButtonShape Item( 
   string name
) {get;}

Parameters

name
Name of the item to get.

Property Value

Single item from the collection.
Example
The following code illustrates how to access a IOptionButtonShape from the IOptionButtons 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 option button
            worksheet.OptionButtons.AddOptionButton(1, 1, 20, 100);
            
            //Set text
            worksheet.OptionButtons[0].Name = "OptionButton1";
            
            //Get width
            Console.Write(worksheet.OptionButtons["OptionButton1"].Width);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//100
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also