This short tutorial guides on how to add check mark in Excel using C#. It has details to set the IDE, a list of steps, and a sample code demonstrating how to add tick mark in Excel using C#. You will learn multiple options to add a tick mark in different ways in an Excel file.
Steps to Add Checkmark in Excel using C#
- Set the environment to use Aspose.Cells for .NET to insert a check mark in a sheet
- Load the license to avoid trial limitations
- Create a Workbook and access the first default sheet from it
- Access a cell, insert a Unicode tick in it, and set the cell font that supports this tick mark
- Use the second method by accessing the list of checkboxes in the sheet and adding a new checkbox to it
- Set its text and default checked state to true for displaying a tick mark
- Save the workbook with check marks in it
These steps summarize how to make tick mark in Excel using C#. Create a workbook, access the first default sheet, and use tick mark Unicode value along with font to display a tick mark in a cell. On the other hand, if you want to add an active control where a check can be shown/hidden, use a checkbox control by adding it to the collection of checkboxes in the selected sheet.
Code to Insert a Tick in Excel using C#
The above code has demonstrated the process for inserting check symbol in Excel using C#. Note that while using a Unicode value to display a tick mark, you need to set a font that supports the tick mark. If the requirement is to create a responsive control where a check mark can be set or removed, then you may opt for the second method only.
This article has taught us the process to insert a check mark in an Excel file. To add a threaded comment in an Excel file, refer to the article Add Threaded Comments in Excel using C#.