[]
To add a comment to a cell, complete the following steps:
Add a reference to C1.WPF.Excel.dll and create a C1XLBook.
<// Create a new workbook
C1XLBook book = new C1XLBook();
Add text to a cell in the worksheet using the following code:
book.Sheets[0][2, 3].Value = "test";
Add a comment to the XLCommentCollection and create a box to show it in using the following code:
book.Sheets[0].Comments.Add(2, 3, "John", "Test comment");<br /> book.Sheets[0].Comments[0].TextBox.Rectangle = new Rect(220, 210, 1900, 1200);
Save and open the book:
// Save and open the file
book.Save(@"C:\test.xlsx");
System.Diagnostics.Process.Start(@"C:\test.xlsx");
Run the program. The spreadsheet will open and look similar to the following: