To add a comment to a cell, complete the following steps:
<// Create a new workbook
C1XLBook book = new C1XLBook();
book.Sheets[0][2, 3].Value = "test";
book.Sheets[0].Comments.Add(2, 3, "John", "Test comment");
book.Sheets[0].Comments[0].TextBox.Rectangle = new Rect(220, 210, 1900, 1200);
C# |
Copy Code
|
---|---|
// Save and open the file book.Save(@"C:\test.xlsx"); System.Diagnostics.Process.Start(@"C:\test.xlsx"); |