Syncfusion.XlsIO.Base
Example 


CheckState Property (ICheckBoxShape)

Indicates whether check box is checked.
Syntax
'Declaration
 
Property CheckState As ExcelCheckState
'Usage
 
Dim instance As ICheckBoxShape
Dim value As ExcelCheckState
 
instance.CheckState = value
 
value = instance.CheckState
ExcelCheckState CheckState {get; set;}
Example
By default, ExcelCheckState.Unchecked is set to CheckState property. Here for example, we set ExcelCheckState.Checked to CheckState.
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
            ICheckBoxShape checkbox = worksheet.Shapes.AddCheckBox();
            
            //Set checkbox state
            checkbox.CheckState = ExcelCheckState.Checked;
            
            //Set text
            checkbox.Text = "Checkbox select";
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also