Syncfusion.XlsIO.Base
Example 


OptionButtons Property

Gets the IOptionButtons collection with all IOptionButtonShape inside the sheet. Read-only.
Syntax
'Declaration
 
ReadOnly Property OptionButtons As IOptionButtons
'Usage
 
Dim instance As ITabSheet
Dim value As IOptionButtons
 
value = instance.OptionButtons
IOptionButtons OptionButtons {get;}
Example
The following code illustrates how to access 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);
            worksheet.OptionButtons.AddOptionButton(5, 5, 20, 100);
            
            //Get count
            Console.Write(worksheet.OptionButtons.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