Last active
February 15, 2026 06:03
-
-
Save aspose-com-kb/5f5513c1ec214458141a2a38acda4b7b to your computer and use it in GitHub Desktop.
Add Check Mark in Excel using C#. For details: https://kb.aspose.com/cells/net/add-check-mark-in-excel-using-csharp/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Aspose.Cells; | |
| namespace CheckMarkDemo | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| // Apply Aspose.Cells license | |
| License license = new License(); | |
| license.SetLicense("license.lic"); | |
| InsertTickSymbol(); | |
| } | |
| static void InsertTickSymbol() | |
| { | |
| // Load or create a workbook | |
| Workbook workbook = new Workbook(); | |
| Worksheet sheet = workbook.Worksheets[0]; | |
| // Method 1: Use Unicode tick (✓ U+2713) | |
| Cell a1 = sheet.Cells["A1"]; | |
| a1.PutValue("\u2713"); // Insert Unicode tick | |
| Style styleA1 = a1.GetStyle(); | |
| styleA1.Font.Name = "Segoe UI Symbol"; // Use a font that supports ✓ | |
| a1.SetStyle(styleA1); | |
| // Method 2: Insert a checkbox instead of a static symbol | |
| int index = sheet.CheckBoxes.Add(2, 0, 20, 100); | |
| Aspose.Cells.Drawing.CheckBox checkBox = sheet.CheckBoxes[index]; | |
| checkBox.Value = true; // Checked by default | |
| checkBox.Text = "Checked"; | |
| // Save the workbook | |
| workbook.Save("output_with_checkmarks.xlsx"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment