Checkbox on Excel

Hello,

I need to manage check box on excel cells thanks to the new feature provide per Excel.
image.png (7.4 KB)
Which permit to have checkbox like this:
image.png (491 Bytes)

We are developing a web application and your solution is used by our application for customers. They want to be able to keep their checkbox when we manipulate their document.

Thanks by advanced.

@BASSETTI

Could you please clarify what specific functionality you are looking for regarding managing checkboxes in Excel using Aspose.Cells? Are you looking to add, remove, or modify checkboxes?

All of this point.
I need to add, remove or update a checkBox.

@BASSETTI

Please use Cell.IsCheckBoxStyle to insert(set this property as true) or remove(set this property as false) the required checkbox. To update its status, please set corresponding cell’s value as true(checked) or false(unchecked).

@BASSETTI,

Moreover, please see the sample code on how to add, update or remove checkbox feature for your reference.
e.g.,
Sample code:

// Instantiate a new Workbook
Workbook workbook = new Workbook();

// Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.Worksheets[0];

// Insert checkbox to the cell A5
Aspose.Cells.Cell a5 = worksheet.Cells["A5"];
a5.IsCheckBoxStyle = true;
a5.Value = true;

// Insert checkbox to the cell A6
Aspose.Cells.Cell a6 = worksheet.Cells["A6"];
a6.IsCheckBoxStyle = true;
a6.Value = true;

// Insert checkbox to the cell A7
Aspose.Cells.Cell a7 = worksheet.Cells["A7"];
a7.IsCheckBoxStyle = true;

Console.WriteLine("a5 check box style: " + a5.IsCheckBoxStyle);
Console.WriteLine("a6 check box style: " + a6.IsCheckBoxStyle);
Console.WriteLine("a7 check box style: " + a7.IsCheckBoxStyle);
Console.WriteLine("a8 check box style: " + worksheet.Cells["A8"].IsCheckBoxStyle);//false

if (a5.IsCheckBoxStyle)
{
Console.WriteLine("a5 is checked: " + a5.BoolValue);
}

if (a6.IsCheckBoxStyle)
{
Console.WriteLine("a6 is checked: " + a6.BoolValue);
}

// Now update A6 checkbox checked value to unchecked
a6.Value= false;

// Remove checkbox from A7 cell.
a7.IsCheckBoxStyle = false;


// Save the Excel file
workbook.Save("e:\\test2\\out1.xlsx");

Hope, this helps a bit.

Thanks you for you answer it’s good now.

@BASSETTI
Thank you for your feedback. You are welcome. I’m glad you solved the issue with the suggested code. If you have any questions, please feel free to contact us at any time.